VuoHid interface.
Definition in file VuoHid.h.
Go to the source code of this file.
Typedefs | |
typedef void * | VuoHid |
Manages receiving HID control data. More... | |
Functions | |
char * | VuoHid_getUsageText (uint32_t usagePage, uint32_t usage) |
Returns a string containing a verbal description of the specified USB HID usage. More... | |
VuoList_VuoHidDevice | VuoHid_getDeviceList (void) |
Returns a list of the currently-avaialble HID devices. More... | |
VuoInteger | VuoHid_getLocation (void *device) |
Given an IOHIDDeviceRef , returns its hopefully-unique Vuo-specific location (based on kIOHIDLocationIDKey and kUSBInterfaceNumber). More... | |
bool | VuoHid_isElementValid (void *element) |
Returns true if the specified IOHIDElementRef is valid (contains usable data). More... | |
VuoHidControl | VuoHid_getControlForElement (void *element) |
Creates a VuoHidControl from the values of the specified IOHIDElementRef . More... | |
void | VuoHid_use (void) |
Indicates that the caller needs to get notifications about HID devices. More... | |
void | VuoHid_disuse (void) |
Indicates that the caller no longer needs notifications about HID devices. More... | |
void | VuoHid_addDevicesChangedTriggers (VuoOutputTrigger(devices, VuoList_VuoHidDevice)) |
Adds a trigger callback, to be invoked whenever the list of known HID devices changes. More... | |
void | VuoHid_removeDevicesChangedTriggers (VuoOutputTrigger(devices, VuoList_VuoHidDevice)) |
Removes a trigger callback previously added by VuoHid_addDevicesChangedTriggers. More... | |
VuoHid | VuoHid_make (const VuoHidDevice device, const VuoBoolean exclusive) |
Creates a reference-counted object for the specified HID device. More... | |
void | VuoHid_checkPendingDevices (void) |
Attempts to open each device that has been requested but hasn't yet been successfully opened. 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... | |
void VuoHid_addDevicesChangedTriggers | ( | VuoOutputTrigger(devices, VuoList_VuoHidDevice) | ) |
Adds a trigger callback, to be invoked whenever the list of known HID devices changes.
Call VuoHid_use()
before calling this.
This function may be called from any thread.
Definition at line 457 of file VuoHidDevices.cc.
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.
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.
void VuoHid_disuse | ( | void | ) |
Indicates that the caller no longer needs notifications about HID devices.
This function may be called from any thread.
Definition at line 437 of file VuoHidDevices.cc.
VuoHidControl VuoHid_getControlForElement | ( | void * | element | ) |
Creates a VuoHidControl from the values of the specified IOHIDElementRef
.
Definition at line 191 of file VuoHidDevices.cc.
VuoList_VuoHidDevice VuoHid_getDeviceList | ( | void | ) |
Returns a list of the currently-avaialble HID devices.
Definition at line 215 of file VuoHidDevices.cc.
VuoInteger VuoHid_getLocation | ( | void * | device | ) |
Given an IOHIDDeviceRef
, returns its hopefully-unique Vuo-specific location (based on kIOHIDLocationIDKey and kUSBInterfaceNumber).
Definition at line 136 of file VuoHidDevices.cc.
char* VuoHid_getUsageText | ( | uint32_t | usagePage, |
uint32_t | usage | ||
) |
Returns a string containing a verbal description of the specified USB HID usage.
The caller is responsible for freeing the returned string.
Based on "HID Usage Tables 10/28/2004 Version 1.12" (with a few spelling errors corrected), plus changes from Review Requests 28 through 57. Exceptions:
Definition at line 38 of file VuoHidUsage.c.
bool VuoHid_isElementValid | ( | void * | element | ) |
Returns true if the specified IOHIDElementRef
is valid (contains usable data).
Definition at line 162 of file VuoHidDevices.cc.
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.
void VuoHid_removeDevicesChangedTriggers | ( | VuoOutputTrigger(devices, VuoList_VuoHidDevice) | ) |
Removes a trigger callback previously added by VuoHid_addDevicesChangedTriggers.
This function may be called from any thread.
Definition at line 468 of file VuoHidDevices.cc.
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.
void VuoHid_use | ( | void | ) |
Indicates that the caller needs to get notifications about HID devices.
This function may be called from any thread.
Definition at line 380 of file VuoHidDevices.cc.