Vuo  2.3.2
Classes | Macros | Enumerations | Functions
VuoHidDevice

Description

Information about a Hid I/O device.

Classes

struct  VuoHidDevice
 Information about a USB or Bluetooth HID device. More...
 

Enumerations

enum  VuoHidDevice_MatchType { VuoHidDevice_MatchName , VuoHidDevice_MatchLocation , VuoHidDevice_MatchVendorAndProduct , VuoHidDevice_MatchUsage }
 Which field to match on. More...
 

Functions

VuoHidDevice VuoHidDevice_makeFromJson (struct json_object *js)
 Decodes the JSON object js to create a new value. More...
 
struct json_objectVuoHidDevice_getJson (const VuoHidDevice value)
 Encodes value as a JSON object. More...
 
char * VuoHidDevice_getSummary (const VuoHidDevice value)
 Returns a compact string representation of value. More...
 
bool VuoHidDevice_areEqual (const VuoHidDevice valueA, const VuoHidDevice valueB)
 Returns true if the two values are equal. More...
 
bool VuoHidDevice_isLessThan (const VuoHidDevice valueA, const VuoHidDevice valueB)
 Returns true if valueA is less than valueB. More...
 
bool VuoHidDevice_realize (VuoHidDevice device, VuoHidDevice *realizedDevice) VuoWarnUnusedResult
 If device specifies a matchType of name, vendorAndProduct, or usage: More...
 
VuoHidDevice VuoHidDevice_makeFromString (const char *str)
 Automatically generated function. More...
 
char * VuoHidDevice_getString (const VuoHidDevice value)
 Automatically generated function. More...
 
void VuoHidDevice_retain (VuoHidDevice value)
 Automatically generated function. More...
 
void VuoHidDevice_release (VuoHidDevice value)
 Automatically generated function. More...
 

Class Documentation

◆ VuoHidDevice

struct VuoHidDevice
Class Members
VuoList_VuoHidControl controls All the device's controls.
VuoInteger location Where the device is connected in the system topology. kIOHIDLocationIDKey << 8 + kUSBInterfaceNumber
VuoHidDevice_MatchType matchType Which field to use for matching a VuoHidDevice structure to an actual device.
VuoText name The device's display name.
VuoInteger productID
VuoInteger usage
VuoInteger usagePage
VuoInteger vendorID

Enumeration Type Documentation

◆ VuoHidDevice_MatchType

Which field to match on.

Definition at line 28 of file VuoHidDevice.h.

Function Documentation

◆ VuoHidDevice_areEqual()

bool VuoHidDevice_areEqual ( const VuoHidDevice  valueA,
const VuoHidDevice  valueB 
)

Returns true if the two values are equal.

Definition at line 144 of file VuoHidDevice.c.

◆ VuoHidDevice_getJson()

struct json_object* VuoHidDevice_getJson ( const VuoHidDevice  value)

Encodes value as a JSON object.

Definition at line 89 of file VuoHidDevice.c.

◆ VuoHidDevice_getString()

char* VuoHidDevice_getString ( const VuoHidDevice  value)

Automatically generated function.

◆ VuoHidDevice_getSummary()

char* VuoHidDevice_getSummary ( const VuoHidDevice  value)

Returns a compact string representation of value.

Definition at line 262 of file VuoHidDevice.c.

◆ VuoHidDevice_isLessThan()

bool VuoHidDevice_isLessThan ( const VuoHidDevice  valueA,
const VuoHidDevice  valueB 
)

Returns true if valueA is less than valueB.

Definition at line 176 of file VuoHidDevice.c.

◆ VuoHidDevice_makeFromJson()

VuoHidDevice VuoHidDevice_makeFromJson ( json_object js)

Decodes the JSON object js to create a new value.

Example:
{
"matchType": "location",
"name": "Multi-axis Controller: 3Dconnexion SpaceNavigator",
"location": 337641472
}

Definition at line 72 of file VuoHidDevice.c.

◆ VuoHidDevice_makeFromString()

VuoHidDevice VuoHidDevice_makeFromString ( const char *  str)

Automatically generated function.

◆ VuoHidDevice_realize()

bool VuoHidDevice_realize ( VuoHidDevice  device,
VuoHidDevice realizedDevice 
)

If device specifies a matchType of name, vendorAndProduct, or usage:

  • If a matching HID device is connected, sets realizedDevice to a specific, existing device matched by its location, and returns true.
  • If no matching HID device is connected, returns false, leaving realizedDevice unset.

If device specifies location-matching, sets realizedDevice to a copy of device, and returns true. (Doesn't bother checking whether the location actually exists.)

Definition at line 190 of file VuoHidDevice.c.

◆ VuoHidDevice_release()

void VuoHidDevice_release ( VuoHidDevice  value)

Automatically generated function.

◆ VuoHidDevice_retain()

void VuoHidDevice_retain ( VuoHidDevice  value)

Automatically generated function.