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 |
|
|||
|
PathResponseCodes Known response commands to path related commands |
||
|
TransferBuffer Represents raw (unstructured) data packets sent over the usb bus. |
||
|
field A Descriptor, that implements access to protocol packets in a human readable way. |
||
|
stringfield A field storing a variable length string. |
||
|
Command Defines the structure of command packets sent to the device. |
||
|
ShortCommand A Command whoose data section is 4 bytes long |
||
|
DirRead The command that asks the device to send the next item in the list |
||
|
DirClose Close a previously opened directory |
||
|
USBConnect Ask device to change status to 'USB connected' i.e., tell the device that the present sequence of commands is complete |
||
|
GetUSBProtocolVersion Get USB Protocol version used by device |
||
| SetBulkSize | ||
| UnlockDevice | ||
|
LongCommand A Command whoose data section is 16 bytes long |
||
|
PathCommand Abstract class that defines structure common to all path related commands. |
||
|
FreeSpaceQuery Query the free space available |
||
|
DirCreate Create a directory |
||
|
DirOpen Open a directory for reading its contents |
||
|
AcknowledgeBulkRead Must be sent to device after a bulk read |
||
|
DeviceInfoQuery The command used to ask for device information |
||
|
FileClose File close command |
||
|
FileCreate Create a file |
||
|
FileDelete Delete a file |
||
|
DirDelete Delete a directory |
||
|
FileOpen File open command |
||
|
FileIO Command to read/write from an open file |
||
|
PathQuery Defines structure of command that requests information about a path |
||
|
SetFileInfo Set File information |
||
|
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. |
||
| USBProtocolVersion | ||
|
IdAnswer Defines the structure of packets that contain identifiers for queries. |
||
|
DeviceInfo Defines the structure of the packet containing information about the device |
||
| FreeSpaceAnswer | ||
|
ListAnswer Defines the structure of packets that contain items in a list. |
|
|||
|
DWORD = '<I' Unsigned integer little endian encoded in 4 bytes |
||
|
DDWORD = '<Q' Unsigned long long little endian encoded in 8 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 Wed Nov 8 17:34:08 2006 | http://epydoc.sourceforge.net |