Vuo  2.1.2
Typedefs | Functions | Variables
VuoHidIo.cc File Reference

Description

VuoHidIo implementation.

Definition in file VuoHidIo.cc.

Go to the source code of this file.

Typedefs

typedef struct _VuoHid_internal * VuoHid_internal
 Private data for a VuoHid instance. More...
 

Functions

static void VuoHid_inputValueCallback (void *context, IOReturn result, void *manager, IOHIDValueRef value)
 Reads a HID controller value, and fires the triggers associated with its device. More...
 
static void VuoHid_openDevice (VuoHid_internal si)
 Attempts to open the specified device. More...
 
void VuoHid_checkPendingDevices (void)
 Attempts to open each device that has been requested but hasn't yet been successfully opened. More...
 
static void VuoHid_destroy (VuoHid_internal si)
 Frees the reference-counted HID device object. More...
 
VuoHid VuoHid_make (const VuoHidDevice device, const VuoBoolean exclusive)
 Creates a reference-counted object for the specified HID device. More...
 
void VuoHid_addReceiveTrigger (VuoHid device, VuoOutputTrigger(receivedControl, VuoHidControl))
 Adds a trigger callback, to be invoked whenever the specified HID device receives data. More...
 
void VuoHid_removeReceiveTrigger (VuoHid device, VuoOutputTrigger(receivedControl, VuoHidControl))
 Removes a trigger callback previously added by VuoHid_addReceiveTrigger. More...
 

Variables

static dispatch_queue_t VuoHid_pendingDevicesQueue
 Serializes access to VuoHid_pendingDevices. More...
 
static std::set< VuoHid_internalVuoHid_pendingDevices
 Devices that have been requested but haven't yet been successfully opened. More...
 

Typedef Documentation

◆ VuoHid_internal

typedef struct _VuoHid_internal * VuoHid_internal

Private data for a VuoHid instance.

Function Documentation

◆ VuoHid_addReceiveTrigger()

void VuoHid_addReceiveTrigger ( VuoHid  device,
VuoOutputTrigger(receivedControl, VuoHidControl  
)

Adds a trigger callback, to be invoked whenever the specified HID device receives data.

This function may be called from any thread.

Definition at line 272 of file VuoHidIo.cc.

◆ VuoHid_checkPendingDevices()

void VuoHid_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.

Definition at line 195 of file VuoHidIo.cc.

◆ VuoHid_destroy()

static void VuoHid_destroy ( VuoHid_internal  si)
static

Frees the reference-counted HID device object.

Definition at line 215 of file VuoHidIo.cc.

◆ VuoHid_inputValueCallback()

static void VuoHid_inputValueCallback ( void *  context,
IOReturn  result,
void *  manager,
IOHIDValueRef  value 
)
static

Reads a HID controller value, and fires the triggers associated with its device.

Definition at line 61 of file VuoHidIo.cc.

◆ VuoHid_make()

VuoHid VuoHid_make ( const VuoHidDevice  device,
const VuoBoolean  exclusive 
)

Creates a reference-counted object for the specified HID device.

Definition at line 239 of file VuoHidIo.cc.

◆ VuoHid_openDevice()

static void VuoHid_openDevice ( VuoHid_internal  si)
static

Attempts to open the specified device.

Definition at line 93 of file VuoHidIo.cc.

◆ VuoHid_removeReceiveTrigger()

void VuoHid_removeReceiveTrigger ( VuoHid  device,
VuoOutputTrigger(receivedControl, VuoHidControl  
)

Removes a trigger callback previously added by VuoHid_addReceiveTrigger.

This function may be called from any thread.

Definition at line 287 of file VuoHidIo.cc.

Variable Documentation

◆ VuoHid_pendingDevices

std::set<VuoHid_internal> VuoHid_pendingDevices
static

Devices that have been requested but haven't yet been successfully opened.

Definition at line 47 of file VuoHidIo.cc.

◆ VuoHid_pendingDevicesQueue

dispatch_queue_t VuoHid_pendingDevicesQueue
static

Serializes access to VuoHid_pendingDevices.

Definition at line 46 of file VuoHidIo.cc.