lun. 23 oct. 2017 - 14h27
We would like to read data from a recording system through a socket connection. So far we managed to establish the connection and receive data. The actual data is binary though and we are not sure how we can read it and get the values as floating point numbers (single).
This is an example data set received:
dataStart$ 4$DataServerTCP $ 1$ 194621$ 2$ 7$3L H:7 HgP H~Mk3L H'9 HO HEMend$
Fields are delimeted by $. Before the data (3L H:7...) is some context information (e.g. nSamples, nChannels), that is readable as text. Is there a way to read the binary data and cast them in the right types (context->string; data->double)? Is there an example available for reading socket data with binary encoding?
The end goal is to read the values and use them to adapt the visual output.
Many thanks in advance
I did not find the right solution from the internet