HidSharp Makes a connection to the device, or throws an exception if the connection cannot be made. The stream to use to communicate with the device. Tries to make a connection to the device. The stream to use to communicate with the device. true if the connection was successful. Returns the file system path of the device. This can be used to check permissions on Linux hidraw, for instance. The file system path. Returns a name appropriate for display. The friendly name. Returns the manufacturer name. Returns the manufacturer name. Returns the product name. Returns the product name. Returns the device serial number. Returns the device serial number. Checks if a particular implementation detail, such as the use of the Linux hidraw API, applies to this device. See for a list of possible details. The detail to check. true if the implementation detail applies. The operating system's name for the device. If you have multiple devices with the same Vendor ID, Product ID, Serial Number, etc., this may be useful for differentiating them. Initializes a new instance of the class, and associates a with it. The device that caused the exception. A description of the error. The new . Initializes a new instance of the class, and associates a with it. The device that caused the exception. A description of the error. An integer identifying the error that has occurred. The new . Initializes a new instance of the class, and associates a with it. The device that caused the exception. A description of the error. The new . Gets the associated with the exception, if any. The exception to get the associated for. The associated , or null if none is associated with it. Provides a list of all available devices. Occurs when a device is connected or disconnected. Initializes a new instance of the class. Gets a list of all connected BLE devices. The device list. Gets a list of all connected HID devices. The device list. Gets a list of connected HID devices, filtered by some criteria. The vendor ID, or null to not filter by vendor ID. The product ID, or null to not filter by product ID. The device release number in binary-coded decimal, or null to not filter by device release number. The serial number, or null to not filter by serial number. The filtered device list. Gets a list of all connected serial devices. The device list. Gets a list of all connected HID, BLE, and serial devices. The device list. Gets a list of connected devices, filtered by some criteria. The filter criteria. The filtered device list. Gets the first connected HID device that matches specified criteria. The vendor ID, or null to not filter by vendor ID. The product ID, or null to not filter by product ID. The device release number in binary-coded decimal, or null to not filter by device release number. The serial number, or null to not filter by serial number. The device, or null if none was found. Gets the connected serial device with the specific device path or filesystem name. The device path or filesystem name. The device, or null if none was found. Gets the connected serial device with the specific device path or filesystem name. The device path or filesystem name. The serial number, or null to not filter by serial number. The device, or null if none was found. Raises the event. true if drivers are presently being installed. The list of devices on this computer. Occurs when the stream is closed. Occurs when is true and another process or thread with higher priority would like to open the stream. Gets the associated with this stream. The maximum amount of time, in milliseconds, to wait for the device to send some data. The default is 3000 milliseconds. To disable the timeout, set this to . The maximum amount of time, in milliseconds, to wait for the device to receive the data. The default is 3000 milliseconds. To disable the timeout, set this to . An object storing user-defined data about the stream. Represents a Bluetooth Low Energy device. Gets the associated with this stream. Gets the associated with this stream. Represents a USB HID class device. Returns the maximum input report length, including the Report ID byte. If the device does not use Report IDs, the first byte will always be 0. Returns the maximum output report length, including the Report ID byte. If the device does not use Report IDs, use 0 for the first byte. Returns the maximum feature report length, including the Report ID byte. If the device does not use Report IDs, use 0 for the first byte. Retrieves and parses the report descriptor of the USB device. The parsed report descriptor. Returns the raw report descriptor of the USB device. The raw report descriptor. Returns the serial ports of the composite USB device. Currently this is only supported on Windows. Serial ports of the USB device. The USB product ID. These are listed at: http://usb-ids.gowdy.us The device release number. The device release number, in binary-coded decimal. The USB vendor ID. These are listed at: http://usb-ids.gowdy.us Communicates with a USB HID class device. Sends a Get Feature setup request. The buffer to fill. Place the Report ID in the first byte. Sends a Get Feature setup request. The buffer to fill. Place the Report ID in the byte at index . The index in the buffer to begin filling with data. The number of bytes in the feature request. Reads HID Input Reports. The data read. Reads HID Input Reports. The buffer to place the reports into. The number of bytes read. Sends a Set Feature setup request. The buffer of data to send. Place the Report ID in the first byte. Sends a Set Feature setup request. The buffer of data to send. Place the Report ID in the byte at index . The index in the buffer to start the write from. The number of bytes in the feature request. Writes an HID Output Report to the device. The buffer containing the report. Place the Report ID in the first byte. Gets the associated with this stream. Specifies the 's low-level implementation. The device is running on Windows. The device is running on a Mac. The device is running on Linux. The device is a Bluetooth Low Energy device. The device is a HID device. The device is a serial device. The device is implemented using the Linux hidraw API. Describes all options for opening a device stream. Initializes a new instance of the class. Gets the current value of an option. The option. The option's value. Gets a list of all currently set options. The options list. Checks if an option has been set. The option. true if the option has been set. Sets the current value of an option. The option. The value to set it to. Options for opening a device stream. Use HIDSharp's exclusivity layer. This allows one process using HIDSharp to lock other processes out of using a HID device. Processes may request interruption, allowing interprocess cooperation. (For example, a data logging application can make itself interruptible and allow another process to use the HID device temporarily.) Defaults to false. Allow other processes to send interruption requests. If another other process with higher priority attempts to open the HID device this process is using, this process will receive an event on an arbitrary thread. must be true for this to work. Defaults to false. The priority of the process. This is used for interruption requests. must be true for this to work. Defaults to . The amount of time to wait for an interruptible process to give up the HID device before failing to open the stream. Defaults to 3000 milliseconds. The amount of time to wait for a transient process to give up the HID device before failing to open the stream. Defaults to 30000 milliseconds. If a HID device is opened by another process transiently, HIDSharp will wait some time for the process to give up the HID device before failing to open the stream. must be true for this to work. Defaults to false. The priority at which to open a device stream. The lowest priority. Very low priority. Low priority. The default priority. High priority. The highest priority. No flags are set. Constant values cannot be changed. Each variable field corresponds to a particular value. The alternative is an array, where each field specifies an index. For example, with eight buttons, a variable field would have eight bits. An array would have an index of which button is pressed. Mouse motion is in relative coordinates. Most sensors -- joysticks, accelerometers, etc. -- output absolute coordinates. The value wraps around in a continuous manner. Creates a appropriate for parsing reports for this device item. The new . Pair this with a for the . Describes the manner in which an item affects the descriptor. Main items determine the report being described. For example, a main item switches between Input and Output reports. Global items affect all reports later in the descriptor. Local items only affect the current report. Long items use this type. Level-triggered. A momentary button. 0 indicates not pressed, 1 indicates pressed. Level-triggered. Toggle buttons maintain their state. 0 indicates not pressed, 1 indicates pressed. Edge-triggered. A 0-to-1 transition should activate the one-shot function. Edge-triggered. Each report of -1 goes down. Each report of 1 goes up. Parses a received report. The buffer to read the report from. The offset to begin reading the report at. the buffer conforms to. true if the report is for this . The number of unique values in the . Starts the receiver. It will continue until the stream is closed or the device is disconnected. Be sure to call to read HID reports as they come in. The stream to receive on. Checks for pending HID reports. The buffer to write the report to. The offset to begin writing the report at. The the buffer conforms to. true if there was a pending report. true if the receiver is running. false if the receiver has stopped, or has not yet been started. The used to separate out reports. The stream associated with this receiver. This will be signaled any time there is data, or when the receiver has stopped due to stream closure or device disconnect. To clear the signal, call until there is no more data. If the receiver has stopped, the signal cannot be cleared. Reads and writes HID reports. Initializes a new instance of the class. Reads a HID report, calling back a provided function for each data item. The buffer containing the report. The offset to begin reading the report at. This callback will be called for each data item. Use this to read every value you need. Writes a HID report, calling back a provided function for each data item. This callback will be called for each report data item. Write to each data item to write a complete HID report. The length of this particular report. The Report ID is included in this length. The Report ID. Parses HID report descriptors. Initializes a new instance of the class. Initializes a new instance of the class, and parses a raw HID report descriptor. The buffer containing the report descriptor. Creates an appropriate for receiving reports from this device. The new . Pair this with a for your chosen . Resets the parser to its initial state. Updates derived data. Parses a raw HID report descriptor. The buffer containing the report descriptor. Parses all of the elements in a report descriptor. The items to parse. Parses a single . Call this repeatedly for every item to completely decode a report descriptor. The item to parse. The maximum input report length. The Report ID is included in this length. The maximum output report length. The Report ID is included in this length. The maximum feature report length. The Report ID is included in this length. True if the device sends Report IDs. Each physical HID device exposes a number of collections corresponding to logical devices. For a simple joystick, gamepad, etc. there will typically be one . Dual gamepad adapters will have two. Keyboards often have one for their keys and at least one for their volume and media controls. Defines the possible units of current. The unit system has no unit of current. The unit of current is the Ampere. Defines the possible units of length. The unit system has no unit of length. The unit of length is the centimeter (occurs in the SI Linear unit system). The unit of length is the radian (occurs in the SI Rotation unit system). The unit of length is the inch (occurs in the English Linear unit system). The unit of length is the degree (occurs in the English Rotation unit system). Defines the possible units of luminous intensity. The unit system has no unit of luminous intensity. The unit of luminous intensity is the candela. Defines the possible units of mass. The unit system has no unit of mass. The unit of mass is the gram (occurs in the SI Linear and Rotation unit systems). The unit of mass is the slug (occurs in the English Linear and Rotation unit systems). Defines the possible units of temperature. The unit system has no unit of temperature. The unit of temperature is Kelvin (occurs in SI Linear and Rotation unit systems). The unit of temperature is Fahrenheit (occurs in English Linear and Rotation unit systems). Defines the possible units of time. The unit system has no unit of time. The unit of time is seconds. Describes the units of a report value. Initializes a new instance of the class. The raw HID value describing the units. Decodes an encoded HID unit exponent. The encoded exponent. The exponent. Encodes an exponent in HID unit form. The exponent. The encoded exponent. Gets or sets the unit system. Gets or sets the exponent of the report value's units of length. Gets the units of length corresponding to . Gets or sets the exponent of the report value's units of mass. Gets the units of mass corresponding to . Gets or sets the exponent of the report value's units of time. Gets the units of time corresponding to . Gets or sets the exponent of the report value's units of temperature. Gets the units of temperature corresponding to . Gets or sets the exponent of the report value's units of current. Gets the units of current corresponding to . Gets or sets the exponent of the report value's units of luminous intensity. Gets the units of luminous intensity corresponding to . Gets or sets the raw HID value describing the units. Defines the possible unit systems. No units are used. The SI Linear unit system uses centimeters for length, grams for mass, seconds for time, Kelvin for temperature, Amperes for current, and candelas for luminous intensity. The SI Rotation unit system uses radians for length, grams for mass, seconds for time, Kelvin for temperature, Amperes for current, and candelas for luminous intensity. The English Linear unit system uses inches for length, slugs for mass, seconds for time, Fahrenheit for temperature, Amperes for current, and candelas for luminous intensity. The English Rotation unit system uses degrees for length, slugs for mass, seconds for time, Fahrenheit for temperature, Amperes for current, and candelas for luminous intensity. See http://www.usb.org/developers/hidpage for additional HID Usage Tables. Represents a serial device. Communicates with a serial device. Gets the associated with this stream. Converts USB device release numbers to and from binary-coded decimal. Converts a USB device release number to binary-coded decimal. The device release number. The device release number, in binary-coded decimal. Converts a USB device release number from binary-coded decimal. The device release number, in binary-coded decimal. The device release number. Normally, HIDSharp starts a thread to watch for device connection and disconnection. This is the thread that events are raised on. It cleans up this thread on program exit or AppDomain unload. If, however, your program exits in a way HIDSharp does not know about, you may call this method to request it to clean up. This function will return immediately, but shutdown may still take a small amount of time. A wait handle that will be signaled when shutdown is complete.