Mantracourt Electronics Limited
T24 Technical Manual
8
Data Packet Structures
The following structures show how the data is defined within the Data Packet Structure of the overall packet.
Data Provider
These packets are sent at intervals by some devices and contain data. There is no need to request these packets
as they arrive automatically. If you have multiple base stations and these are within the range of the transmitting
device the packets will arrive from each base station.
Packet Type
Data
Tag
Status
Data
Type
Data
RSSI
CV
03
00 00
00
00
[…]
00
00
Packet Type
This is 0x3 hex (3 decimal) and may have higher bits set which indicate Error, Low Battery and Broadcast.
Data Tag
Every device that transmits
Data Provider
packets has a configurable 2 byte
Data Tag
. Devices that consume Data
Provider Packets can be configured to look for specific Data Tags. The reason we use Data Tags and not just rely
on a devices ID for identification is that in a working system multiple devices may be relying on data from a single
device. If that device were ever replaced then its unique ID would change and therefore multiple devices would
have to be reconfigured. By using a Data Tag we only need to change this tag on the replacement device and the
rest of the system will work as required.
Status
The bit values in this byte are used to indicate certain things. Only two bits are allocated a global meaning. The
rest are device specific and you will need to refer to the device manual for clarification.
Status Byte
bit 7
bit 6
bit 5
bit 4
bit 3
bit 2
bit 1
bit0
X
X
X
X
X
X
Integrity
Shunt Cal
Data Type
This byte defines how the data is formatted in this packet and also indicates the best way to represent the data.
Function
Display As
Data Type
Bit
7
6
5
4
3
2
1
0
Sample
0
1
1
1
1
0
0
1
Display As
Type
Description
0
Undefined
1
Numeric
Numeric representation based on Data Type
2
Boolean
The data may be in any format but represents a boolean result
where non zero numeric is True and string length > 1 or > 0 is
True
3
Text
Can display as ascii text
4
Binary (unprintable)
Unprintable characters
5
Hex
Best represented as hex
6
Bit Map (10110101)
Each bit value should be shown
7
Percent
Numeric or string value has a value 0 - 100
Data Type
Description
Size In Bytes
0
No content/unknown
0
1
UINT8
1
2
UINT16
2
3
INT32
4
4
Float
4
5
String
0-64
6
Binary
0-64
NOTE:
See
Data Type Formats
in
Appendix A
The Display As bits should be used where possible as this can help in presenting the data for display purposes.