|
Re: Custom Dashboard
This isn't a spec, but I can tell you a bit about the data format. For more specifics, the easiest route will be to open the LV dashboard and examine the diagrams for how it decodes things. Sorry, but we wrote the dashboard in LV, and I don't believe any has been written in C/C++/Java, etc. They certainly can be, the protocol is easy to do in any programming tool, but there is that time thing...
The data is sent back using UDP on port 1165. I'm not certain I have the latest code on the computer I'm looking at, but this code reads 1018 bytes and breaks it into several chunks. The first chunk is described by the first image. This image is what the LV help window shows when you hover over a wire going into the type cast function which takes the first piece and casts and returns the rest of the buffer string for other processing.
The rest of the buffer is decoded as a byte, two strings, and a byte array. The byte is simply used to recognize duplicates and skips, the strings are error strings and user strings. The byte array is true custom user data.
The first structure is further ripped apart, manipulated, and scaled for better presentation.
As for the data packing, the data is sent in network byte order, or big endian, with no spacing between any bytes. The I8 or U8 is one byte, I16 and U16 are two bytes, etc. A string is a counted string, not null terminated. The count is four bytes. The dimension sizes for arrays is the same four byte count of elements. There is more documentation for this in the LV manuals describing the LV binary format. Or of course you can ask detailed questions here.
Greg McKaskle
|