Vuo  1.2.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Classes | Typedefs | Functions | Variables
VuoHidIo.cc File Reference

Description

VuoHidIo implementation.

Classes

struct  _VuoHid_internal
 Private data for a VuoHid instance. More...
 

Typedefs

typedef struct _VuoHid_internalVuoHid_internal
 Private data for a VuoHid instance.
 

Functions

static void __attribute__ ((constructor)) VuoHidIo_init()
 Initializes VuoHid_pendingDevicesQueue.
 
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.
 
static void VuoHid_openDevice (VuoHid_internal si)
 Attempts to open the specified device.
 
void VuoHid_checkPendingDevices (void)
 Attempts to open each device that has been requested but hasn't yet been successfully opened.
 
static void VuoHid_destroy (VuoHid_internal si)
 Frees the reference-counted HID device object.
 
VuoHid VuoHid_make (const VuoHidDevice device, const VuoBoolean exclusive)
 Creates a reference-counted object for the specified HID device.
 
void VuoHid_addReceiveTrigger (VuoHid device, VuoOutputTrigger(receivedControl, VuoHidControl))
 Adds a trigger callback, to be invoked whenever the specified HID device receives data.
 
void VuoHid_removeReceiveTrigger (VuoHid device, VuoOutputTrigger(receivedControl, VuoHidControl))
 Removes a trigger callback previously added by VuoHid_addReceiveTrigger.
 

Variables

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

Class Documentation

struct _VuoHid_internal
Class Members
VuoHidDevice device The target device this instance represents.
VuoBoolean exclusive Whether the user wants this device opened for exclusive access.
IOHIDManagerRef manager
VuoTriggerSet< VuoHidControl > triggerSet

Typedef Documentation

Private data for a VuoHid instance.

Function Documentation

static void __attribute__ ( (constructor)  )
static

Initializes VuoHid_pendingDevicesQueue.

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.

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.

static void VuoHid_destroy ( VuoHid_internal  si)
static

Frees the reference-counted HID device object.

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.

VuoHid VuoHid_make ( const VuoHidDevice  device,
const VuoBoolean  exclusive 
)

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

static void VuoHid_openDevice ( VuoHid_internal  si)
static

Attempts to open the specified device.

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.

Variable Documentation

std::set<VuoHid_internal> VuoHid_pendingDevices
static

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

dispatch_queue_t VuoHid_pendingDevicesQueue
static

Serializes access to VuoHid_pendingDevices.