2 summary:: A uniform class to a slot of an HID device
3 related:: Classes/HIDDeviceService, Classes/LID, Classes/GeneralHID, Classes/GeneralHIDSpec
7 GeneralHID is a cross platform wrapper for accessing HID devices. Currently the MacOSX and Linux HID support has been wrapped. Some of the code is inspired by the GUI wrapper.
8 A GeneralHIDSlot accesses one specific capability of a device, such as a button, an axis or an LED. Its value can be retrieved, an action can be set to be performed when data comes in, and the slot can be mapped to a control bus to use the value directly on the server. Slots are automatically created when a device is opened, so it is not necessary for a user to create a new slot.
10 See link::Classes/GeneralHID:: for a complete explanation and an example of how to access an HID device.
13 It is advised to use this class instead of the platform specific classes: link::Classes/HIDDeviceService:: (on MacOSX) and link::Classes/LID:: (on Linux)
16 subsection::Some outstanding issues
17 This class is not completely finished yet. Common slot numbers across platforms are not yet guaranteed. On Windows there is not yet a proper implementation available.
26 Turns on debugging for the slot.
29 Get or set the current value of the slot. Setting is only sensible when the slot represents an LED on the device.
32 Return the unscaled value of the slot.
35 Assign a function to the slot. The function has as an argument the slot.
38 Create a control bus on the specified server, and map the incoming values to this bus.
41 Returns the bus to which this slot is mapped, if a bus has been created.
44 Free the bus on the server.
47 JITLib support. This calls .createBus, and returns an In.kr on the bus for you.
51 See link::Classes/GeneralHID::. for a complete example of using an HID device.