ENLIGHTEN
Cross-platform desktop GUI for Wasatch Photonics spectrometers
Loading...
Searching...
No Matches
wasatch.TCPDevice.MessagePacket Class Reference

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
 

Detailed Description

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

Constructor & Destructor Documentation

◆ __init__()

wasatch.TCPDevice.MessagePacket.__init__ ( self,
bRequest = None,
wValue = 0,
wIndex = 0,
payload = None,
serialized = None )

Member Function Documentation

◆ __repr__()

wasatch.TCPDevice.MessagePacket.__repr__ ( self)

◆ deserialize()

wasatch.TCPDevice.MessagePacket.deserialize ( self,
serialized )

◆ serialize()

wasatch.TCPDevice.MessagePacket.serialize ( self)

Member Data Documentation

◆ bLength

wasatch.TCPDevice.MessagePacket.bLength = 0

◆ bRequest

wasatch.TCPDevice.MessagePacket.bRequest = bRequest

◆ payload

wasatch.TCPDevice.MessagePacket.payload = None

◆ wIndex

wasatch.TCPDevice.MessagePacket.wIndex = wIndex

◆ wValue

wasatch.TCPDevice.MessagePacket.wValue = wValue

The documentation for this class was generated from the following file: