Keeping a connection alive with a midra, 1 usage, 2 detailed command sequence – Analog Way MIDRA PLATFORM TPP Current Programmer's Guide User Manual
Page 17: 3 example of ping command, Picture 9 : example of keeping a connection alive, 2 keeping a connection alive with a midra, Val2
17
PROGRAMMER'S GUIDE FOR v01.02.11
3.2 Keeping a connection alive with a Midra™
3.2.1 usage
This example gives you the proper way to maintain the connection alive with a Midra™ device. It is
recommended to use this method for future developments. It uses a single command allowing testing the
connection and that the device is alive.
The sending rate should be slow enough to avoid link overload, typically at “human rate”.
It is advised to “ping” the device only when no communication occurs.
3.2.2 detailed command sequence
Syntax : <val1>SYpig <val1> is any numerical value that will be used and returned inverted by the
device, showing that it is alive.
Answer : SYpig
<val2>
C
R
L
F
<val2> is computed by binary inverting <val1>.
Examples :
sending 0 (0x0000 0000) will return 4.294.967.295 (0xFFFF FFFF)
sending 1 (0x0000 0001) will return 4.294.967.294 (0xFFFF FFFE)
sending 170 (0x0000 00AA) will return 4.294.967.125 (0xFFFF FF55)
3.2.3 example of PING command
Picture 9 : example of keeping a connection alive