C# 클래스 NewTOAPIA.HidDevice

상속: IDisposable
파일 보기 프로젝트 열기: Wiladams/NewTOAPIA 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
DeviceFileHandle SafeFileHandle
DevicePath string
ProductID short
VendorID short

공개 메소드들

메소드 설명
CreateInputReport ( ) : InputReport

Virtual method to create an input report for this device. Override to use.

Dispose ( ) : void

Dispose method

GetDevices ( ) : IEnumerable
GetVendorName ( short vendorId ) : string
HidDevice ( string devicePathName ) : System
Initialize ( string devicePathName ) : void
ToString ( ) : string

보호된 메소드들

메소드 설명
Dispose ( bool bDisposing ) : void

Disposer called by both dispose and finalise

HandleDataReceived ( InputReport oInRep ) : void

virtual handler for any action to be taken when data is received. Override to use.

HandleDeviceRemoved ( ) : void

Virtual handler for any action to be taken when a device is removed. Override to use.

ReadCompleted ( IAsyncResult iResult ) : void

Callback for above. Care with this as it will be called on the background thread from the async read

Write ( OutputReport oOutRep ) : void

Write an output report to the device.

비공개 메소드들

메소드 설명
BeginAsyncRead ( ) : void

Kicks off an asynchronous read which completes when data is read or when the device is disconnected. Uses a callback.

메소드 상세

CreateInputReport() 공개 메소드

Virtual method to create an input report for this device. Override to use.
public CreateInputReport ( ) : InputReport
리턴 InputReport

Dispose() 공개 메소드

Dispose method
public Dispose ( ) : void
리턴 void

Dispose() 보호된 메소드

Disposer called by both dispose and finalise
protected Dispose ( bool bDisposing ) : void
bDisposing bool True if disposing
리턴 void

GetDevices() 공개 정적인 메소드

public static GetDevices ( ) : IEnumerable
리턴 IEnumerable

GetVendorName() 공개 정적인 메소드

public static GetVendorName ( short vendorId ) : string
vendorId short
리턴 string

HandleDataReceived() 보호된 메소드

virtual handler for any action to be taken when data is received. Override to use.
protected HandleDataReceived ( InputReport oInRep ) : void
oInRep InputReport The input report that was received
리턴 void

HandleDeviceRemoved() 보호된 메소드

Virtual handler for any action to be taken when a device is removed. Override to use.
protected HandleDeviceRemoved ( ) : void
리턴 void

HidDevice() 공개 메소드

public HidDevice ( string devicePathName ) : System
devicePathName string
리턴 System

Initialize() 공개 메소드

public Initialize ( string devicePathName ) : void
devicePathName string
리턴 void

ReadCompleted() 보호된 메소드

Callback for above. Care with this as it will be called on the background thread from the async read
protected ReadCompleted ( IAsyncResult iResult ) : void
iResult IAsyncResult Async result parameter
리턴 void

ToString() 공개 메소드

public ToString ( ) : string
리턴 string

Write() 보호된 메소드

Write an output report to the device.
protected Write ( OutputReport oOutRep ) : void
oOutRep OutputReport Output report to write
리턴 void

프로퍼티 상세

DeviceFileHandle 공개적으로 프로퍼티

public SafeFileHandle DeviceFileHandle
리턴 SafeFileHandle

DevicePath 공개적으로 프로퍼티

public string DevicePath
리턴 string

ProductID 공개적으로 프로퍼티

public short ProductID
리턴 short

VendorID 공개적으로 프로퍼티

public short VendorID
리턴 short