roscpp - Convert uint8[] into a known struct
Hi folks,
I've got a universal message type for all kinds of data that comes in through a UDP socket. This message just contains a fixed size array of uint8[16].
What I would like to do is to convert the uint8 array into a pre-defined struct
. I know what the struct has to look like so if I just had a usual C array of chars I'd just do a cast. But IIRC that doesn't work with a uint8[] since it is a more complex type of array.
So how do I do that? How do I kind of unmarshall that uint8 array into a struct?
Thanks a lot!