Hi
What would the best way of unpacking a python string into fields
I have data received from a tcp socket, it is packed as follows, I believe it will be in a string from the socket recv function
It has the following format
uint8 - header
uint8 - length
uint32 - typeID
uint16 -param1
uint16 -param2
uint16 -param3
uint16 -param4
char[24] - name string
uint32 - checksum
uint8 - footer
(I also need to unpack other packets with different formats to the above)
How do I unpack these?
I am new to python, have done a bit of 'C'. If I was using 'C' I would probably use a structure, would this be the way to go with Python?
Regards
X