C# Class ScpControl.ScpDevice

Low-level representation of an Scp-compatible Usb device.
Afficher le fichier Open project: nefarius/ScpToolkit Class Usage Examples

Protected Properties

Свойство Type Description
BulkIn byte
BulkOut byte
FileHandle IntPtr
IntIn byte
IntOut byte
Log ILog

Méthodes publiques

Méthode Description
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

Méthodes protégées

Méthode Description
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

Method Details

Close() public méthode

public Close ( ) : bool
Résultat bool

FindDevice() protected static méthode

protected static FindDevice ( Guid target, string &path, int instance ) : bool
target Guid
path string
instance int
Résultat bool

GetDeviceHandle() protected méthode

protected GetDeviceHandle ( string path ) : bool
path string
Résultat bool

GetDeviceInstance() protected méthode

protected GetDeviceInstance ( string &instance ) : bool
instance string
Résultat bool

GetHardwareId() protected méthode

protected GetHardwareId ( string devicePath ) : void
devicePath string
Résultat void

GetHardwareId() public static méthode

public static GetHardwareId ( string devicePath, short &vendorId, short &productId ) : void
devicePath string
vendorId short
productId short
Résultat void

InitializeDevice() protected méthode

protected InitializeDevice ( ) : bool
Résultat bool

IsBitSet() protected méthode

protected IsBitSet ( byte value, int offset ) : bool
value byte
offset int
Résultat bool

Open() public méthode

public Open ( int instance ) : bool
instance int
Résultat bool

Open() public méthode

public Open ( string devicePath ) : bool
devicePath string
Résultat bool

ReadBulkPipe() protected méthode

protected ReadBulkPipe ( byte buffer, int length, int &transfered ) : bool
buffer byte
length int
transfered int
Résultat bool

ReadIntPipe() protected méthode

protected ReadIntPipe ( byte buffer, int length, int &transfered ) : bool
buffer byte
length int
transfered int
Résultat bool

RegisterNotify() public static méthode

public static RegisterNotify ( IntPtr form, Guid Class, IntPtr &handle, bool window = true ) : bool
form IntPtr
Class Guid
handle IntPtr
window bool
Résultat bool

RestartDevice() protected méthode

protected RestartDevice ( string instanceId ) : bool
instanceId string
Résultat bool

ScpDevice() protected méthode

protected ScpDevice ( ) : System
Résultat System

ScpDevice() protected méthode

protected ScpDevice ( Guid Class ) : System
Class Guid
Résultat System

SendTransfer() protected méthode

protected SendTransfer ( UsbHidRequestType requestType, UsbHidRequest request, ushort value, byte buffer, int &transfered ) : bool
requestType UsbHidRequestType
request UsbHidRequest
value ushort
buffer byte
transfered int
Résultat bool

SendTransfer() protected méthode

protected SendTransfer ( byte requestType, byte request, ushort value, byte buffer, int &transfered ) : bool
requestType byte
request byte
value ushort
buffer byte
transfered int
Résultat bool

Start() public méthode

public Start ( ) : bool
Résultat bool

Stop() public méthode

public Stop ( ) : bool
Résultat bool

ToValue() protected static méthode

protected static ToValue ( UsbHidClassDescriptorType type, byte index = 0x00 ) : ushort
type UsbHidClassDescriptorType
index byte
Résultat ushort

ToValue() protected static méthode

protected static ToValue ( UsbHidReportRequestType type ) : ushort
type UsbHidReportRequestType
Résultat ushort

ToValue() protected static méthode

protected static ToValue ( UsbHidReportRequestType type, UsbHidReportRequestId id ) : ushort
type UsbHidReportRequestType
id UsbHidReportRequestId
Résultat ushort

UnregisterNotify() public static méthode

public static UnregisterNotify ( IntPtr handle ) : bool
handle IntPtr
Résultat bool

UsbEndpointDirectionIn() protected méthode

protected UsbEndpointDirectionIn ( int addr ) : bool
addr int
Résultat bool

UsbEndpointDirectionOut() protected méthode

protected UsbEndpointDirectionOut ( int addr ) : bool
addr int
Résultat bool

WriteBulkPipe() protected méthode

protected WriteBulkPipe ( byte buffer, int length, int &transfered ) : bool
buffer byte
length int
transfered int
Résultat bool

WriteIntPipe() protected méthode

protected WriteIntPipe ( byte buffer, int length, int &transfered ) : bool
buffer byte
length int
transfered int
Résultat bool

Property Details

BulkIn protected_oe property

protected byte BulkIn
Résultat byte

BulkOut protected_oe property

protected byte BulkOut
Résultat byte

FileHandle protected_oe property

protected IntPtr FileHandle
Résultat IntPtr

IntIn protected_oe property

protected byte IntIn
Résultat byte

IntOut protected_oe property

protected byte IntOut
Résultat byte

Log protected_oe static_oe property

protected static ILog Log
Résultat ILog