Vuo
1.2.0
|
VuoSerialIO implementation.
Classes | |
struct | _VuoSerial_internal |
Private data for a VuoSerial instance. More... | |
Typedefs | |
typedef struct _VuoSerial_internal * | VuoSerial_internal |
Private data for a VuoSerial instance. | |
Functions | |
static void | __attribute__ ((constructor)) VuoSerialIO_init() |
Initializes VuoSerial_pendingDevicesQueue . | |
void | VuoSerial_processPacket (VuoSerial_internal si) |
Reads and parses a single serial packet from the Dispatch Source's file handle. | |
static void | VuoSerial_initSource (VuoSerial_internal si) |
Sets up a Dispatch Source for the specified file handle. | |
static int | VuoSerial_openDevice (const char *devicePath) |
Attempts to open the specified device. | |
void | VuoSerial_checkPendingDevices (void) |
Attempts to open each device that has been requested but hasn't yet been successfully opened. | |
VuoSerial | VuoSerial_getShared (const VuoText devicePath) |
Returns the reference-counted object for the specified serial device. | |
void | VuoSerial_addReceiveTrigger (VuoSerial device, VuoOutputTrigger(receivedData, VuoData)) |
Adds a trigger callback, to be invoked whenever the specified serial device receives data. | |
void | VuoSerial_removeReceiveTrigger (VuoSerial device, VuoOutputTrigger(receivedData, VuoData)) |
Removes a trigger callback previously added by VuoSerial_addReceiveTrigger. | |
void | VuoSerial_sendData (VuoSerial device, const VuoData data) |
Enqueues data for output on device . | |
void | VuoSerial_configureDevice (VuoSerial device, VuoInteger baudRate, VuoInteger dataBits, VuoParity parity, VuoInteger stopBits) |
Changes system-wide settings for the specified serial device. | |
VUOKEYEDPOOL (std::string, VuoSerial_internal) | |
static void | VuoSerial_destroy (VuoSerial_internal si) |
VuoSerial_internal | VuoSerial_make (std::string devicePath) |
VUOKEYEDPOOL_DEFINE (std::string, VuoSerial_internal, VuoSerial_make) | |
Variables | |
static dispatch_queue_t | VuoSerial_pendingDevicesQueue |
Serializes access to VuoSerial_pendingDevices . | |
static std::set < VuoSerial_internal > | VuoSerial_pendingDevices |
Devices that have been requested but haven't yet been successfully opened. | |
struct _VuoSerial_internal |
Class Members | ||
---|---|---|
VuoText | devicePath | The target device this instance represents. |
int | fileHandle | |
dispatch_queue_t | queue | |
dispatch_source_t | source | |
VuoTriggerSet< VuoData > | triggerSet |
typedef struct _VuoSerial_internal * VuoSerial_internal |
Private data for a VuoSerial instance.
|
static |
Initializes VuoSerial_pendingDevicesQueue
.
void VuoSerial_addReceiveTrigger | ( | VuoSerial | device, |
VuoOutputTrigger(receivedData, VuoData) | |||
) |
Adds a trigger callback, to be invoked whenever the specified serial device receives data.
This function may be called from any thread.
void VuoSerial_checkPendingDevices | ( | void | ) |
Attempts to open each device that has been requested but hasn't yet been successfully opened.
This function may be called from any thread.
void VuoSerial_configureDevice | ( | VuoSerial | device, |
VuoInteger | baudRate, | ||
VuoInteger | dataBits, | ||
VuoParity | parity, | ||
VuoInteger | stopBits | ||
) |
Changes system-wide settings for the specified serial device.
Returns the reference-counted object for the specified serial device.
|
static |
Sets up a Dispatch Source for the specified file handle.
|
static |
Attempts to open the specified device.
void VuoSerial_processPacket | ( | VuoSerial_internal | si | ) |
Reads and parses a single serial packet from the Dispatch Source's file handle.
This function may only be called on dispatch queue VuoSerial_internal::queue
.
void VuoSerial_removeReceiveTrigger | ( | VuoSerial | device, |
VuoOutputTrigger(receivedData, VuoData) | |||
) |
Removes a trigger callback previously added by VuoSerial_addReceiveTrigger.
This function may be called from any thread.
Enqueues data
for output on device
.
|
static |
Devices that have been requested but haven't yet been successfully opened.
|
static |
Serializes access to VuoSerial_pendingDevices
.