|
ENLIGHTEN
Cross-platform desktop GUI for Wasatch Photonics spectrometers
|
Essentially a 6-byte simplified USB Setup Packet, with bmRequestType removed and wLength reduced to 1 byte. More...
Public Member Functions | |
| __init__ (self, bRequest=None, wValue=0, wIndex=0, payload=None, serialized=None) | |
| __repr__ (self) | |
| deserialize (self, serialized) | |
| serialize (self) | |
Public Attributes | |
| int | bLength = 0 |
| bRequest = bRequest | |
| payload = None | |
| tuple | wIndex = wIndex |
| tuple | wValue = wValue |
Essentially a 6-byte simplified USB Setup Packet, with bmRequestType removed and wLength reduced to 1 byte.
This format was deliberately chosen to minimize porting complexity from the existing ENG-0001 USB FID API.
Offset Length Datatype Field Description
0 1 uint8 bRequest The command/opcode 1 2 uint16 wValue Parameter #1 (or 2nd-tier opcode if bRequest was 0xff) 3 2 uint16 wIndex Parameter #2 5 1 uint8 bLength Payload length
| wasatch.TCPDevice.MessagePacket.__init__ | ( | self, | |
| bRequest = None, | |||
| wValue = 0, | |||
| wIndex = 0, | |||
| payload = None, | |||
| serialized = None ) |
| wasatch.TCPDevice.MessagePacket.__repr__ | ( | self | ) |
| wasatch.TCPDevice.MessagePacket.deserialize | ( | self, | |
| serialized ) |
| wasatch.TCPDevice.MessagePacket.serialize | ( | self | ) |
| wasatch.TCPDevice.MessagePacket.bLength = 0 |
| wasatch.TCPDevice.MessagePacket.bRequest = bRequest |
| wasatch.TCPDevice.MessagePacket.payload = None |
| wasatch.TCPDevice.MessagePacket.wIndex = wIndex |
| wasatch.TCPDevice.MessagePacket.wValue = wValue |