C# Class SolarCar.HidDevice

Wrapper to native USB HID API. Internally, Acquire the api_lock before calling ANY DllImport function! @todo manage allocation/deallocation of devices internally, using RAII.
Afficher le fichier Open project: nusolar/sc6-telemetry-code

Méthodes publiques

Méthode Description
HidDevice ( ushort vendor_id, ushort product_id, string serial_number ) : System

Initializes a new instance of the SolarCar.HidApi class. The first instance must call this.init();

Read ( byte data ) : int
Write ( byte data ) : int

Private Methods

Méthode Description
StringToUtf32 ( string s ) : System.Int32[]
close ( IntPtr device ) : void
exit ( ) : bool
hid_close ( IntPtr device ) : void
hid_exit ( ) : int
hid_init ( ) : int
hid_open ( ushort vendor_id, ushort product_id, IntPtr serial_number ) : IntPtr
hid_read ( IntPtr device, [ data, [ length ) : int
hid_read_timeout ( IntPtr device, [ data, [ length, int milliseconds ) : int
hid_set_nonblocking ( IntPtr device, int nonblock ) : int
hid_write ( IntPtr device, [ data, [ length ) : int
init ( ) : bool
open ( ushort vendor_id, ushort product_id, string serial_number ) : IntPtr
read ( IntPtr device, byte data ) : int
read_timeout ( IntPtr device, byte data, int milliseconds ) : int
set_nonblocking ( IntPtr device, bool nonblock ) : bool
write ( IntPtr device, byte data ) : int

Method Details

HidDevice() public méthode

Initializes a new instance of the SolarCar.HidApi class. The first instance must call this.init();
public HidDevice ( ushort vendor_id, ushort product_id, string serial_number ) : System
vendor_id ushort
product_id ushort
serial_number string
Résultat System

Read() public méthode

public Read ( byte data ) : int
data byte
Résultat int

Write() public méthode

public Write ( byte data ) : int
data byte
Résultat int