
CHAPTER 3
Operations at the Application Level
97
analog values with 10-bit resolution and stores them as 12-bit
values. Also, the A723 contains two 16-bit pulse counters, that is, it
has more data to send. Due to the limited space available and to
minimize the radio traffic, the frames are slightly compressed, in
that six 12-bit values are packed in 9 bytes.
Type 3 9
SIZE 22 (including the type byte).
F
ORMAT struct tlg_type37 {
BYTE RF_LevelIn;
BYTE RF_LevelOut;
BYTE DigiByte;
WORD PulseCounter0;
WORD PulseCounter1;
BYTE BatteryLevel;
BYTE Analog[9];
};
DESCRIPTION The analog values are 12 bits and must be converted accordingly,
depending on the sensor connected, while the pulse counters are
16-bit values. Only the RF and battery levels are 8-bit values.
Analog[9] is an array of 9 unsigned bytes that is the result of
packing the six 12-bit values. These are the values returned by the
internal A/D converter from the respective I/O connectors.
Note: The integers (16-bit values) are sent using the big endian
convention, that is, first the most significant byte and then
the least significant byte.
The packing mechanism is shown in Figure 25.
Six 16-bit values
8-bit packed values
Analog1 Analog2
Analog3
Analog4
12 bits 12 bits 12 bits 12 bits
Byte 0 Byte 1 Byte 2 Byte 3 Byte 6Byte 5Byte 4 Byte 7 Byte 8
etc....
0
00
0
Comentários a estes Manuais