Public Types | |
enum | Flags { CALLBACK_COMPLETED = 0x01, CALLBACK_CANCELLED = 0x02, CALLBACK_TIMEDOUT = 0x04, CALLBACK_FAILED = 0x08, CALLBACK_SUCCESS = 0x10, CALLBACK_ALL = 0x1F, FIRE_AND_FORGET = 0x20 } |
Transfer flags. More... | |
enum | Status { INPROGRESS = 0x01, CANCELLED = 0x02, TIMEDOUT = 0x04, FAILED = 0x08, SUCCESS = 0x10, COMPLETED = 0x80 } |
Transfer status. More... | |
Public Member Functions | |
AsyncIO (HANDLE hFile, OVERLAPPED *pOv, Data *pData, int Flags=0) | |
Constructor. | |
bool | Cancelled () |
True if the transfer was cancelled. | |
void | CheckState () |
Internally checks the transfer status. | |
bool | Completed () |
True if the transfer completed. | |
bool | Failed () |
True if the transfer failed. | |
Data | GetData () |
Gets a copy of the data used for the transfer. | |
unsigned int | GetFlags () |
Gets the flags for this transfer. | |
unsigned short | GetStatus () |
Gets the status of the transfer. | |
bool | Success () |
True if the transfer succeeded. | |
bool | TimedOut () |
True if the transfer timed out. | |
~AsyncIO () | |
Destructor. | |
Protected Member Functions | |
void | FreeData () |
Deletes the internal data copy. | |
Protected Attributes | |
unsigned long | m_BytesReturned |
The bytes actually transfered. | |
unsigned int | m_Flags |
Transfer flags. | |
Data * | m_pData |
Pointer to the data transfered. | |
unsigned short | m_Status |
Transfer status. |
The transfered data may be smaller than the supplied data object. In this case the data object is automatically truncated. The data object can never be greater than requested (driver-limitation).
Transfer flags.
EasyUSB::AsyncIO::AsyncIO | ( | HANDLE | hFile, | |
OVERLAPPED * | pOv, | |||
Data * | pData, | |||
int | Flags = 0 | |||
) |
Constructor.
hFile | Windows file handle to the endpoint. | |
pOv | Windows overlapped structure for asynchronous operations. | |
pData | USB data object containing the data to be send. | |
Flags | The transfer flags. |
EasyUSB::AsyncIO::~AsyncIO | ( | ) |
Destructor.
bool EasyUSB::AsyncIO::Cancelled | ( | ) |
True if the transfer was cancelled.
void EasyUSB::AsyncIO::CheckState | ( | ) |
Internally checks the transfer status.
bool EasyUSB::AsyncIO::Completed | ( | ) |
True if the transfer completed.
bool EasyUSB::AsyncIO::Failed | ( | ) |
True if the transfer failed.
void EasyUSB::AsyncIO::FreeData | ( | ) | [protected] |
Deletes the internal data copy.
Data EasyUSB::AsyncIO::GetData | ( | ) |
Gets a copy of the data used for the transfer.
unsigned int EasyUSB::AsyncIO::GetFlags | ( | ) |
Gets the flags for this transfer.
unsigned short EasyUSB::AsyncIO::GetStatus | ( | ) |
Gets the status of the transfer.
bool EasyUSB::AsyncIO::Success | ( | ) |
True if the transfer succeeded.
bool EasyUSB::AsyncIO::TimedOut | ( | ) |
True if the transfer timed out.
unsigned long EasyUSB::AsyncIO::m_BytesReturned [protected] |
The bytes actually transfered.
unsigned int EasyUSB::AsyncIO::m_Flags [protected] |
Transfer flags.
Data* EasyUSB::AsyncIO::m_pData [protected] |
Pointer to the data transfered.
unsigned short EasyUSB::AsyncIO::m_Status [protected] |
Transfer status.