The client establishes a connection to the server The client sends list of parameters as an ASCII string delimited by ampersands and terminated by a carriage return:
Code Block |
---|
per=<desired
sampling
period>&vars=<variable
#1
name>,<variable
#2
name>,...,<variable
#n
name>\r
3. The server responds with the true update rate and the size of each variable that will be returned: Code Block |
---|
1 byte = STX 0x02
3 bytes = all zero
4 bytes = number of bytes in this message from STX to ETX, inclusive
4 bytes = message type = 0x00000000
4 bytes = true sampling period in milliseconds in long integer format
2 bytes = fundamental type for variable #1
2 bytes = both zero
4 bytes = number of bytes for variable #1 in long integer format (a)
2 bytes = fundamental type for variable #2
2 bytes = both zero
4 bytes = number of bytes for variable #2 in long integer format (b)
…
2 bytes = fundamental type for variable #n
2 bytes = both zero
4 bytes = number of bytes for variable #n in long integer format (n)
1 byte = ETX 0x03 |
4. The Server the begins to send periodic updates to the binary data. Each update is formatted as: Code Block |
---|
1 byte = STX 0x02
3 bytes = all zero
4 bytes = number of bytes in this message from STX to ETX, inclusive
4 bytes = message type = 0x00000001
4 bytes = seconds timestamp for current data in long integer format
4 bytes = nanoseconds timestamp for current data in long integer format
a bytes = binary data for variable #1
x bytes = blank bytes to put following variable on 4 byte boundary
b bytes = binary data for variable #2
x bytes = blank bytes to put following variable on 4 byte boundary
…
n bytes = binary data for variable #n
x bytes = blank bytes to put following byte on 4 byte boundary
1 byte = ETX 0x03 |
5. The connection is closed |