Its looking like I am going to need to be able to interface my Corona app with a data stream from another device. That device will be outputting the raw contents of a c structure over UDP which i need to capture and interpret.
The networking/socket side of things is no problems, but I’m not entirely sure what the best approach is to deserialise the raw struct data into something i can use in corona. The original struct is made up of floats, int
s (32 bit as far as i know) and char arrays for strings. The overall struct it quite large, ~7k.
I’m wondering if someone cant point me in the right direction as to what lua functions / features i should be using to do this. Ideally i would like a nice clean way to deserialise it into a table with the fields matching the original struct.
Any tips would be much appreciated.