Метод | Описание | |
---|---|---|
BulkTransfer ( [ deviceHandle, byte endpoint, object data, int length, int &actualLength, int timeout ) : int |
Perform a USB bulk transfer. The direction of the transfer is inferred from the direction bits of the endpoint address. For bulk reads, the length field indicates the maximum length of data you are expecting to receive. If less data arrives than expected, this function will return that data, so be sure to check the transferred output parameter. You should also check the transferred parameter for bulk writes. Not all of the data may have been written. Also check transferred when dealing with a timeout error code. libusb may have to split your transfer into a number of chunks to satisfy underlying O/S requirements, meaning that the timeout may expire after the first few chunks have completed. libusb is careful not to lose any data that may have been transferred; do not assume that timeout conditions indicate a complete lack of I/O. |
|
ControlTransfer ( [ deviceHandle, byte requestType, byte request, short value, short index, object data, short dataLength, int timeout ) : int |
Perform a USB control transfer. The direction of the transfer is inferred from the bmRequestType field of the setup packet. The wValue, wIndex and wLength fields values should be given in host-endian byte order. |
|
ControlTransferAsync ( [ deviceHandle, byte requestType, byte request, short value, short index, |
Perform a USB control transfer for multi-threaded applications using the MonoUsbEventHandler class. The direction of the transfer is inferred from the bmRequestType field of the setup packet. The wValue, wIndex and wLength fields values should be given in host-endian byte order. |
|
GetDescriptor ( |
Retrieve a descriptor from the default control pipe. This is a convenience function which formulates the appropriate control message to retrieve the descriptor. |
|
GetDescriptor ( |
Retrieve a descriptor from the default control pipe. This is a convenience function which formulates the appropriate control message to retrieve the descriptor. |
|
GetDevice ( |
Get a MonoUsbProfileHandle for a MonoUsbDeviceHandle. This function differs from the Libusb-1.0 C API in that when the new MonoUsbProfileHandle is returned, the device profile reference count is incremented ensuring the profile will remain valid as long as it is in-use. |
|
GetPollfds ( |
Retrieve a list of file descriptors that should be polled by your main loop as libusb event sources. |
|
InterruptTransfer ( [ deviceHandle, byte endpoint, object data, int length, int &actualLength, int timeout ) : int |
Perform a USB interrupt transfer. The direction of the transfer is inferred from the direction bits of the endpoint address. For interrupt reads, the length field indicates the maximum length of data you are expecting to receive. If less data arrives than expected, this function will return that data, so be sure to check the transferred output parameter. You should also check the transferred parameter for interrupt writes. Not all of the data may have been written. Also check transferred when dealing with a timeout error code. libusb may have to split your transfer into a number of chunks to satisfy underlying O/S requirements, meaning that the timeout may expire after the first few chunks have completed. libusb is careful not to lose any data that may have been transferred; do not assume that timeout conditions indicate a complete lack of I/O. |
|
MonoLibUsbErrorFromTransferStatus ( MonoUsbTansferStatus status ) : MonoUsbError |
Converts a MonoUsbTansferStatus enum to a MonoUsbError enum.
|
|
OpenDeviceWithVidPid ( [ sessionHandle, short vendorID, short productID ) : |
Convenience function for finding a device with a particular idVendor/idProduct combination. |
|
StrError ( MonoUsbError errcode ) : string |
Get a string describing a MonoUsbError.
|
|
libusb_control_transfer ( |
Perform a USB control transfer. The direction of the transfer is inferred from the bmRequestType field of the setup packet. The wValue, wIndex and wLength fields values should be given in host-endian byte order. |
Метод | Описание | |
---|---|---|
AllocTransfer ( int isoPackets ) : |
||
AttachKernelDriver ( [ deviceHandle, int interfaceNumber ) : int | ||
BulkTransfer ( [ deviceHandle, byte endpoint, |
||
CancelTransfer ( |
||
ClaimInterface ( [ deviceHandle, int interfaceNumber ) : int | ||
ClearHalt ( [ deviceHandle, byte endpoint ) : int | ||
Close ( |
||
ControlTransfer ( [ deviceHandle, byte requestType, byte request, short value, short index, |
||
DefaultAsyncCB ( MonoUsbTransfer transfer ) : void | ||
DetachKernelDriver ( [ deviceHandle, int interfaceNumber ) : int | ||
ErrorCodeFromLibUsbError ( int ret, string &description ) : ErrorCode | ||
EventHandlerActive ( [ sessionHandle ) : int | ||
EventHandlingOk ( [ sessionHandle ) : int | ||
Exit ( |
||
FreeConfigDescriptor ( |
||
FreeDeviceList ( |
||
FreeTransfer ( |
||
GetActiveConfigDescriptor ( [ deviceProfileHandle, [ configHandle ) : int | ||
GetBusNumber ( [ deviceProfileHandle ) : byte | ||
GetConfigDescriptor ( [ deviceProfileHandle, byte configIndex, [ configHandle ) : int | ||
GetConfigDescriptorByValue ( [ deviceProfileHandle, byte bConfigurationValue, [ configHandle ) : int | ||
GetConfiguration ( [ deviceHandle, int &configuration ) : int | ||
GetDeviceAddress ( [ deviceProfileHandle ) : byte | ||
GetDeviceDescriptor ( [ deviceProfileHandle, [ deviceDescriptor ) : int | ||
GetDeviceInternal ( [ devicehandle ) : |
||
GetDeviceList ( [ sessionHandle, [ monoUSBProfileListHandle ) : int | ||
GetMaxIsoPacketSize ( [ deviceProfileHandle, byte endpoint ) : int | ||
GetMaxPacketSize ( [ deviceProfileHandle, byte endpoint ) : int | ||
GetNextTimeout ( [ sessionHandle, |
||
GetPollfdsInternal ( [ sessionHandle ) : |
||
GetWindowsPriv ( |
||
HandleEvents ( |
||
HandleEvents ( [ sessionHandle ) : int | ||
HandleEventsLocked ( [ sessionHandle, |
||
HandleEventsTimeout ( [ sessionHandle, |
||
Init ( |
||
InitAndStart ( ) : void |
Calls MonoUsbEventHandler.Init() and MonoUsbEventHandler.Start if MonoUsbEventHandler.IsStopped = true.
|
|
InterruptTransfer ( [ deviceHandle, byte endpoint, |
||
KernelDriverActive ( [ deviceHandle, int interfaceNumber ) : int | ||
LockEventWaiters ( [ sessionHandle ) : void | ||
LockEvents ( [ sessionHandle ) : void | ||
Open ( [ deviceProfileHandle, |
||
OpenDeviceWithVidPidInternal ( [ sessionHandle, short vendorID, short productID ) : |
||
PollfdsHandleTimeouts ( [ sessionHandle ) : int | ||
RefDevice ( |
||
ReleaseInterface ( [ deviceHandle, int interfaceNumber ) : int | ||
ResetDevice ( [ deviceHandle ) : int | ||
SetConfiguration ( [ deviceHandle, int configuration ) : int | ||
SetDebug ( [ sessionHandle, int level ) : void | ||
SetInterfaceAltSetting ( [ deviceHandle, int interfaceNumber, int alternateSetting ) : int | ||
SetPollfdNotifiers ( [ sessionHandle, PollfdAddedDelegate addedDelegate, PollfdRemovedDelegate removedDelegate, |
||
StopAndExit ( ) : void |
Calls MonoUsbEventHandler.Stop and MonoUsbEventHandler.Exit.
|
|
StrError ( int errcode ) : |
||
SubmitTransfer ( |
||
TryLockEvents ( [ sessionHandle ) : int | ||
UnlockEventWaiters ( [ sessionHandle ) : void | ||
UnlockEvents ( [ sessionHandle ) : void | ||
UnrefDevice ( |
||
WaitForEvent ( [ sessionHandle, |
public static BulkTransfer ( [ deviceHandle, byte endpoint, object data, int length, int &actualLength, int timeout ) : int | ||
deviceHandle | [ | A handle for the device to communicate with. |
endpoint | byte | The address of a valid endpoint to communicate with. |
data | object |
///
|
length | int | For bulk writes, the number of bytes from data to be sent. for bulk reads, the maximum number of bytes to receive into the data buffer. |
actualLength | int | Output location for the number of bytes actually transferred. |
timeout | int | Timeout (in milliseconds) that this function should wait before giving up due to no response being received. For an unlimited timeout, use value 0. |
Результат | int |
public static ControlTransfer ( [ deviceHandle, byte requestType, byte request, short value, short index, object data, short dataLength, int timeout ) : int | ||
deviceHandle | [ | A handle for the device to communicate with. |
requestType | byte | The request type field for the setup packet. |
request | byte | The request field for the setup packet. |
value | short | The value field for the setup packet |
index | short | The index field for the setup packet. |
data | object |
///
|
dataLength | short | The length field for the setup packet. The data buffer should be at least this size. |
timeout | int | timeout (in milliseconds) that this function should wait before giving up due to no response being received. For an unlimited timeout, use value 0. |
Результат | int |
public static ControlTransferAsync ( [ deviceHandle, byte requestType, byte request, short value, short index, |
||
deviceHandle | [ | A handle for the device to communicate with. |
requestType | byte | The request type field for the setup packet. |
request | byte | The request field for the setup packet. |
value | short | The value field for the setup packet |
index | short | The index field for the setup packet. |
pData | A suitably-sized data buffer for either input or output (depending on direction bits within bmRequestType). | |
dataLength | short | The length field for the setup packet. The data buffer should be at least this size. |
timeout | int | timeout (in milliseconds) that this function should wait before giving up due to no response being received. For an unlimited timeout, use value 0. |
Результат | int |
public static GetDescriptor ( |
||
deviceHandle | Retrieve a descriptor from the default control pipe. | |
descType | byte | The descriptor type, |
descIndex | byte | The index of the descriptor to retrieve. |
pData | Output buffer for descriptor. | |
length | int | Size of data buffer. |
Результат | int |
public static GetDescriptor ( |
||
deviceHandle | Retrieve a descriptor from the default control pipe. | |
descType | byte | The descriptor type, |
descIndex | byte | The index of the descriptor to retrieve. |
data | object | Output buffer for descriptor. This object is pinned using |
length | int | Size of data buffer. |
Результат | int |
public static GetDevice ( |
||
devicehandle | A device handle. | |
Результат |
public static GetPollfds ( |
||
sessionHandle | A valid |
|
Результат | List |
public static InterruptTransfer ( [ deviceHandle, byte endpoint, object data, int length, int &actualLength, int timeout ) : int | ||
deviceHandle | [ | A handle for the device to communicate with. |
endpoint | byte | The address of a valid endpoint to communicate with. |
data | object |
///
|
length | int | For interrupt writes, the number of bytes from data to be sent. for interrupt reads, the maximum number of bytes to receive into the data buffer. |
actualLength | int | Output location for the number of bytes actually transferred. |
timeout | int | Timeout (in milliseconds) that this function should wait before giving up due to no response being received. For an unlimited timeout, use value 0. |
Результат | int |
public static MonoLibUsbErrorFromTransferStatus ( MonoUsbTansferStatus status ) : MonoUsbError | ||
status | MonoUsbTansferStatus | the |
Результат | MonoUsbError |
public static OpenDeviceWithVidPid ( [ sessionHandle, short vendorID, short productID ) : |
||
sessionHandle | [ | A valid |
vendorID | short | The idVendor value to search for. |
productID | short | The idProduct value to search for. |
Результат |
public static StrError ( MonoUsbError errcode ) : string | ||
errcode | MonoUsbError | The |
Результат | string |
public static libusb_control_transfer ( |
||
deviceHandle | A handle for the device to communicate with. | |
setupPacket | libusb_control_setup | The setup packet. |
pData | A suitably-sized data buffer for either input or output (depending on direction bits within bmRequestType). | |
dataLength | short | The length field for the setup packet. The data buffer should be at least this size. |
timeout | int | timeout (in millseconds) that this function should wait before giving up due to no response being received. For an unlimited timeout, use value 0. |
Результат | int |