| Home | Trees | Indices | Help |
|
|---|
|
|
Defines the structure of packets that are sent to/received from the device.
Packet structure is defined using classes and inheritance. Each class is a view that imposes structure on the underlying data buffer. The data buffer is encoded in little-endian format, but you don't have to worry about that if you are using the classes. The classes have instance variables with getter/setter functions defined to take care of the encoding/decoding. The classes are intended to mimic C structs.
There are three kinds of packets. Commands,
Responses, and Answers.
Commands are sent to the device on the control bus,
Responses are received from the device, also on the control
bus. Answers and their sub-classes represent data packets
sent to/received from the device via bulk transfers.
Commands are organized as follows:
|
| Class Hierarchy for Command |
You will typically only use sub-classes of Command.
Responses are organized as follows:
|
| Class Hierarchy for Response |
Responses inherit Command as they share header structure.
Answers are organized as follows:
|
| Class Hierarchy for Answer |
|
|||
|
TransferBuffer Represents raw (unstructured) data packets sent over the usb bus. |
||
|
Command Defines the structure of command packets sent to the device. |
||
|
ShortCommand A Command whoose data section is 4 bytes long |
||
|
DirOpen Open a directory for reading its contents |
||
|
DirRead The command that asks the device to send the next item in the list |
||
|
DirClose Close a previously opened directory |
||
|
LongCommand A Command whoose data section is 16 bytes long |
||
|
AcknowledgeBulkRead Must be sent to device after a bulk read |
||
|
DeviceInfoQuery The command used to ask for device information |
||
|
FileClose File close command |
||
|
FileOpen File open command |
||
|
FileRead Command to read from an open file |
||
|
PathQuery Defines structure of command that requests information about a path |
||
|
Response Defines the structure of response packets received from the device. |
||
|
ListResponse Defines the structure of response packets received during list (ll) queries. |
||
|
Answer Defines the structure of packets sent to host via a bulk transfer (i.e., bulk reads) |
||
|
FileProperties Defines the structure of packets that contain size, date and permissions information about files/directories. |
||
|
IdAnswer Defines the structure of packets that contain identifiers for queries. |
||
|
DeviceInfo Defines the structure of the packet containing information about the device |
||
|
ListAnswer Defines the structure of packets that contain items in a list. |
||
|
|||
|
BYTE = '<B'Unsigned char little endian encoded in 1 byte |
||
|
WORD = '<H'Unsigned short little endian encoded in 2 bytes |
||
|
DWORD = '<I'Unsigned integer little endian encoded in 4 bytes |
||
|
DDWORD = '<Q'Unsigned long long little endian encoded in 8 bytes |
||
|
|||
BYTEUnsigned char little endian encoded in 1 byte
|
WORDUnsigned short little endian encoded in 2 bytes
|
DWORDUnsigned integer little endian encoded in 4 bytes
|
DDWORDUnsigned long long little endian encoded in 8 bytes
|
| Home | Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0alpha3 on Mon Nov 6 20:50:45 2006 | http://epydoc.sourceforge.net |