07-04-2012 04:37 AM
I have TCP connection that is sending a great number of fixed size arrays that I need to convert. Is there a simpler way to do that than the one I have attached?
07-04-2012 05:03 AM
Okay, I found another way which is a bit simpler. At least I don't have to calculate the number of bytes. Please let me know if there is a simpler way.
07-04-2012 07:15 AM
Hello Teraj,
Have a look with attached example. I think this should enough for you.
07-04-2012 07:42 AM
Sorry, I didn't write my question clear enough.
I know how to do TCP data transfer. I also know how to unflatten the binary string back to data, but I was hoping there was a clearer way to do it than the way I suggested. For scalar values one can make a cluster containing the data in the binary string and only one "unflatten from string" is needed.
However, if the binary string is composed of arrays (even though they are fixed in size) I need one unflatten string for each array. In my case I have many small arrays. The attached example with only three arrays was only to illustrate what I wanted to do.
I have now found a way using a cluster of clusters. I don't know if this is the ideal way of doing this, but it works, and when enabling "view cluster as icon" I can make the code much more compact and easier to read