C# Класс ScpControl.ScpDevice

Low-level representation of an Scp-compatible Usb device.
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
BulkIn byte
BulkOut byte
FileHandle IntPtr
IntIn byte
IntOut byte
Log ILog

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

Метод Описание
Close ( ) : bool
GetHardwareId ( string devicePath, short &vendorId, short &productId ) : void
Open ( int instance ) : bool
Open ( string devicePath ) : bool
RegisterNotify ( IntPtr form, Guid Class, IntPtr &handle, bool window = true ) : bool
Start ( ) : bool
Stop ( ) : bool
UnregisterNotify ( IntPtr handle ) : bool

Защищенные методы

Метод Описание
FindDevice ( Guid target, string &path, int instance ) : bool
GetDeviceHandle ( string path ) : bool
GetDeviceInstance ( string &instance ) : bool
GetHardwareId ( string devicePath ) : void
InitializeDevice ( ) : bool
IsBitSet ( byte value, int offset ) : bool
ReadBulkPipe ( byte buffer, int length, int &transfered ) : bool
ReadIntPipe ( byte buffer, int length, int &transfered ) : bool
RestartDevice ( string instanceId ) : bool
ScpDevice ( ) : System
ScpDevice ( Guid Class ) : System
SendTransfer ( UsbHidRequestType requestType, UsbHidRequest request, ushort value, byte buffer, int &transfered ) : bool
SendTransfer ( byte requestType, byte request, ushort value, byte buffer, int &transfered ) : bool
ToValue ( UsbHidClassDescriptorType type, byte index = 0x00 ) : ushort
ToValue ( UsbHidReportRequestType type ) : ushort
ToValue ( UsbHidReportRequestType type, UsbHidReportRequestId id ) : ushort
UsbEndpointDirectionIn ( int addr ) : bool
UsbEndpointDirectionOut ( int addr ) : bool
WriteBulkPipe ( byte buffer, int length, int &transfered ) : bool
WriteIntPipe ( byte buffer, int length, int &transfered ) : bool

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

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

public Close ( ) : bool
Результат bool

FindDevice() защищенный статический Метод

protected static FindDevice ( Guid target, string &path, int instance ) : bool
target Guid
path string
instance int
Результат bool

GetDeviceHandle() защищенный Метод

protected GetDeviceHandle ( string path ) : bool
path string
Результат bool

GetDeviceInstance() защищенный Метод

protected GetDeviceInstance ( string &instance ) : bool
instance string
Результат bool

GetHardwareId() защищенный Метод

protected GetHardwareId ( string devicePath ) : void
devicePath string
Результат void

GetHardwareId() публичный статический Метод

public static GetHardwareId ( string devicePath, short &vendorId, short &productId ) : void
devicePath string
vendorId short
productId short
Результат void

InitializeDevice() защищенный Метод

protected InitializeDevice ( ) : bool
Результат bool

IsBitSet() защищенный Метод

protected IsBitSet ( byte value, int offset ) : bool
value byte
offset int
Результат bool

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

public Open ( int instance ) : bool
instance int
Результат bool

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

public Open ( string devicePath ) : bool
devicePath string
Результат bool

ReadBulkPipe() защищенный Метод

protected ReadBulkPipe ( byte buffer, int length, int &transfered ) : bool
buffer byte
length int
transfered int
Результат bool

ReadIntPipe() защищенный Метод

protected ReadIntPipe ( byte buffer, int length, int &transfered ) : bool
buffer byte
length int
transfered int
Результат bool

RegisterNotify() публичный статический Метод

public static RegisterNotify ( IntPtr form, Guid Class, IntPtr &handle, bool window = true ) : bool
form IntPtr
Class Guid
handle IntPtr
window bool
Результат bool

RestartDevice() защищенный Метод

protected RestartDevice ( string instanceId ) : bool
instanceId string
Результат bool

ScpDevice() защищенный Метод

protected ScpDevice ( ) : System
Результат System

ScpDevice() защищенный Метод

protected ScpDevice ( Guid Class ) : System
Class Guid
Результат System

SendTransfer() защищенный Метод

protected SendTransfer ( UsbHidRequestType requestType, UsbHidRequest request, ushort value, byte buffer, int &transfered ) : bool
requestType UsbHidRequestType
request UsbHidRequest
value ushort
buffer byte
transfered int
Результат bool

SendTransfer() защищенный Метод

protected SendTransfer ( byte requestType, byte request, ushort value, byte buffer, int &transfered ) : bool
requestType byte
request byte
value ushort
buffer byte
transfered int
Результат bool

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

public Start ( ) : bool
Результат bool

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

public Stop ( ) : bool
Результат bool

ToValue() защищенный статический Метод

protected static ToValue ( UsbHidClassDescriptorType type, byte index = 0x00 ) : ushort
type UsbHidClassDescriptorType
index byte
Результат ushort

ToValue() защищенный статический Метод

protected static ToValue ( UsbHidReportRequestType type ) : ushort
type UsbHidReportRequestType
Результат ushort

ToValue() защищенный статический Метод

protected static ToValue ( UsbHidReportRequestType type, UsbHidReportRequestId id ) : ushort
type UsbHidReportRequestType
id UsbHidReportRequestId
Результат ushort

UnregisterNotify() публичный статический Метод

public static UnregisterNotify ( IntPtr handle ) : bool
handle IntPtr
Результат bool

UsbEndpointDirectionIn() защищенный Метод

protected UsbEndpointDirectionIn ( int addr ) : bool
addr int
Результат bool

UsbEndpointDirectionOut() защищенный Метод

protected UsbEndpointDirectionOut ( int addr ) : bool
addr int
Результат bool

WriteBulkPipe() защищенный Метод

protected WriteBulkPipe ( byte buffer, int length, int &transfered ) : bool
buffer byte
length int
transfered int
Результат bool

WriteIntPipe() защищенный Метод

protected WriteIntPipe ( byte buffer, int length, int &transfered ) : bool
buffer byte
length int
transfered int
Результат bool

Описание свойств

BulkIn защищенное свойство

protected byte BulkIn
Результат byte

BulkOut защищенное свойство

protected byte BulkOut
Результат byte

FileHandle защищенное свойство

protected IntPtr FileHandle
Результат IntPtr

IntIn защищенное свойство

protected byte IntIn
Результат byte

IntOut защищенное свойство

protected byte IntOut
Результат byte

Log защищенное статическое свойство

protected static ILog Log
Результат ILog