public class SerialComHID extends Object
The SCM library provides two set of APIs for communicating with a HID device. First is raw HID communication using methods in SerialComRawHID class. In raw mode, input reports received and sent output reports are not parsed. Second is SerialComParsedHID class in which reports are parsed.
In Windows, system supplied HID minidriver and HID class drivers provide most of the functionality and required support for HID-compliant devices. However we may have to write our own HID minidriver if it is difficult to make desired changes to HID-compliant device firmware or if we need to make a non-HID compliant device into a HID device without updating the firmware.
| Modifier and Type | Field and Description |
|---|---|
static String |
EXP_UNBLOCK_HIDIO
The exception message indicating that a blocked read method has been unblocked
and made to return to caller explicitly (irrespective there was data to read or not).
|
static int |
HID_BLUETOOTH
The value indicating instance of SerialComBluetoothHID class (HID over Bluetooth).
|
static int |
HID_GENERIC
The value indicating instance of SerialComHID class (HID transport neutral).
|
static int |
HID_I2C
The value indicating instance of SerialComI2CHID class (HID over I2C).
|
static int |
HID_USB
The value indicating instance of SerialComUSBHID class (HID over USB).
|
protected SerialComHIDJNIBridge |
mHIDJNIBridge |
static int |
MODE_PARSED
The value indicating instance of SerialComParsedHID class.
|
static int |
MODE_RAW
The value indicating instance of SerialComRawHID class.
|
protected int |
osType |
| Constructor and Description |
|---|
SerialComHID(SerialComHIDJNIBridge mHIDJNIBridge,
int osType)
Allocates a new SerialComHID object.
|
public static final int MODE_RAW
The value indicating instance of SerialComRawHID class. Integer constant with value 0x01.
public static final int MODE_PARSED
The value indicating instance of SerialComParsedHID class. Integer constant with value 0x02.
public static final int HID_GENERIC
The value indicating instance of SerialComHID class (HID transport neutral). Integer constant with value 0x03.
public static final int HID_USB
The value indicating instance of SerialComUSBHID class (HID over USB). Integer constant with value 0x04.
public static final int HID_BLUETOOTH
The value indicating instance of SerialComBluetoothHID class (HID over Bluetooth). Integer constant with value 0x05.
public static final int HID_I2C
The value indicating instance of SerialComI2CHID class (HID over I2C). Integer constant with value 0x06.
public static final String EXP_UNBLOCK_HIDIO
The exception message indicating that a blocked read method has been unblocked and made to return to caller explicitly (irrespective there was data to read or not).
protected SerialComHIDJNIBridge mHIDJNIBridge
protected int osType
public SerialComHID(SerialComHIDJNIBridge mHIDJNIBridge, int osType)
Allocates a new SerialComHID object.
mHIDJNIBridge - interface class to native library for calling platform specific routines.Copyright © 2016. All rights reserved.