C# Класс 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.
Показать файл Открыть проект

Открытые методы

Метод Описание
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

Приватные методы

Метод Описание
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

Описание методов

HidDevice() публичный Метод

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
Результат System

Read() публичный Метод

public Read ( byte data ) : int
data byte
Результат int

Write() публичный Метод

public Write ( byte data ) : int
data byte
Результат int