EasyUSB::Detail::IO Class Reference

IO class for synchronous and asynchronous read/write operations. More...

Inheritance diagram for EasyUSB::Detail::IO:

EasyUSB::Detail::IOBase EasyUSB::Endpoint

Public Member Functions

 IO ()
 Constructor.
virtual Data Read (unsigned long Length)
 Reads data synchronously.
virtual AsyncIOReadAsync (unsigned long Length, unsigned int Flags=0)
 Reads data asynchronously.
virtual unsigned long Write (Data Data)
 Writes data synchronously.
virtual AsyncIOWriteAsync (Data Data, unsigned int Flags=0)
 Writes data asynchronously.

Protected Attributes

unsigned long m_Timeout
 Timeout for IO operations.

Detailed Description

IO class for synchronous and asynchronous read/write operations.

Constructor & Destructor Documentation

EasyUSB::Detail::IO::IO (  ) 

Constructor.


Member Function Documentation

virtual Data EasyUSB::Detail::IO::Read ( unsigned long  Length  )  [virtual]

Reads data synchronously.

Parameters:
Length The number of bytes to read from the endpoint.
Returns:
A Data object representing the bytes read.
Exceptions:
DeviceLost The device is not connected.
UnknownError An unknown (windows) error occured.
Note:
The actual bytes read can be less than specified.
See also:
Data::GetLength()

Reimplemented in EasyUSB::Endpoint.

virtual AsyncIO* EasyUSB::Detail::IO::ReadAsync ( unsigned long  Length,
unsigned int  Flags = 0 
) [virtual]

Reads data asynchronously.

Parameters:
Length The number of bytes to read from the endpoint.
Flags Asynchronous send options.
Returns:
A pointer to a AsyncIO object, representing the transfer.
Exceptions:
- Same as WriteAsync.
Note:
The actual bytes read can be less than specified.
See also:
WriteAsync(Data Data, unsigned int Flags), Data::GetLength(), AsyncIO::Flags

Reimplemented in EasyUSB::Endpoint.

virtual unsigned long EasyUSB::Detail::IO::Write ( Data  Data  )  [virtual]

Writes data synchronously.

Parameters:
Data The Data to send.
Returns:
The number of bytes transmitted.
Exceptions:
DeviceLost The device is not connected.
UnknownError An unknown (windows) error occured.

virtual AsyncIO* EasyUSB::Detail::IO::WriteAsync ( Data  Data,
unsigned int  Flags = 0 
) [virtual]

Writes data asynchronously.

Parameters:
Data The Data to send.
Flags Asynchronous send options.
Returns:
A pointer to a AsyncIO object, representing the transfer.
Exceptions:
NotEnoughMemory Not enough memory to complete the operation.
DeviceLost The device is not connected.
UnknownError An unknown (windows) error occured.
See also:
AsyncIO::Flags

Reimplemented in EasyUSB::Endpoint.


Field Documentation

unsigned long EasyUSB::Detail::IO::m_Timeout [protected]

Timeout for IO operations.

See also:
Endpoint::SetTimeout


Generated on Tue Nov 4 22:13:26 2008 for EasyUSB Connect by  doxygen 1.5.6