C# 클래스 LDHID, LitDev

파일 보기 프로젝트 열기: litdev1/LitDev 1 사용 예제들

공개 메소드들

메소드 설명
AddDevice ( Primitive, VID, Primitive, PID, Primitive, name ) : Primitive,

Add a HID connected device from its VID and PID. The VID and PID are 4 character (hex) values, and can be found from: Device Manager->Properties->Details->Hardware ids For example: HID\VID_046D PID_C215 REV_0204 has VID "046D" and PID "C215". Only add a device once.

FindDevices ( ) : Primitive,

List all found HID (Human Interface Devices).

GetBits ( Primitive, data ) : Primitive,

Get an 8 element array of 1s and 0s indicating which bit of a byte are set.

InputLength ( Primitive, name ) : Primitive,

Get the input record length for a HID device.

Output ( Primitive, name, Primitive, data ) : Primitive,

Send data to the HID device. This must be an array of bytes (0 to 255). The array must be indexed from 1 and have size OutputLength.

OutputLength ( Primitive, name ) : Primitive,

Get the output record length for a HID device.

SetBits ( Primitive, data ) : Primitive,

Set a byte from an 8 element array of 1s and 0s indicating which bit of a byte are set.

비공개 메소드들

메소드 설명
CreateDevice ( string VID, string PID, string name ) : bool
DeviceExists ( int VID, int PID, string name ) : bool
FindAllDevices ( ) : List>
GetDevice ( string name ) : HID_Device
_OnDeviceChanged ( object sender, HIDChangedEventArgs args ) : void
_OnDeviceRemoved ( object sender, EventArgs, args ) : void

메소드 상세

AddDevice() 공개 정적인 메소드

Add a HID connected device from its VID and PID. The VID and PID are 4 character (hex) values, and can be found from: Device Manager->Properties->Details->Hardware ids For example: HID\VID_046D PID_C215 REV_0204 has VID "046D" and PID "C215". Only add a device once.
public static AddDevice ( Primitive, VID, Primitive, PID, Primitive, name ) : Primitive,
VID Primitive, The device VID.
PID Primitive, The device PID.
name Primitive, A name for the device.
리턴 Primitive,

FindDevices() 공개 정적인 메소드

List all found HID (Human Interface Devices).
public static FindDevices ( ) : Primitive,
리턴 Primitive,

GetBits() 공개 정적인 메소드

Get an 8 element array of 1s and 0s indicating which bit of a byte are set.
public static GetBits ( Primitive, data ) : Primitive,
data Primitive, A byte number (0 to 255).
리턴 Primitive,

InputLength() 공개 정적인 메소드

Get the input record length for a HID device.
public static InputLength ( Primitive, name ) : Primitive,
name Primitive, The device name.
리턴 Primitive,

Output() 공개 정적인 메소드

Send data to the HID device. This must be an array of bytes (0 to 255). The array must be indexed from 1 and have size OutputLength.
public static Output ( Primitive, name, Primitive, data ) : Primitive,
name Primitive, The HID device name.
data Primitive, The data to send.
리턴 Primitive,

OutputLength() 공개 정적인 메소드

Get the output record length for a HID device.
public static OutputLength ( Primitive, name ) : Primitive,
name Primitive, The HID device name.
리턴 Primitive,

SetBits() 공개 정적인 메소드

Set a byte from an 8 element array of 1s and 0s indicating which bit of a byte are set.
public static SetBits ( Primitive, data ) : Primitive,
data Primitive, An 8 element array of 1s and 0s (small bit first).
리턴 Primitive,