> Thank you for that answer, can you please explain in a bit more detail
> as to what you mean by prepending the sizes 50x100 to the front of the
> string? And how it would be used in the typecast node?
My assumption was that the flat binary string contains the bytes of the
doubles. You know the size is 50x100, but is that because it is a
constant size? Or are the dimension sizes written down?
Users often do the same sort of binary to string coversion within LV,
ship the string somewhere else in LV via UDP, serial, GPIB, or file I/O,
then unflatten the data back to the binary format. So, if your binary
encoding matches what LV expects, you can just use the typecase or the
unflatten from string to do the same to this buffer.
You migh
t play around with this a bit, making various 2D arrays,
flattening them to string, then displaying in a HEX string to see what
LV's format is. What you will find is that is is the dimension sizes,
using an int32 for each, followed by the data bytes in big-endian
format, with no additional alignment.
So what I meant was to take the binary string you received via UDP, use
the string concatonate node to add eight bytes to the front that
represent the sizes, if they aren't already there, and then rearrange
the bytes to be big-endian if they aren't already.
Greg McKaskle