Enhanced data format
If you set AO to 0 or 1 on the source node, then the data format is represented as a series of bytes in the following format which matches the DigiMesh and Zigbee firmwares:
Bytes |
Name |
Description |
---|---|---|
1 |
Sample sets |
Number of sample sets. There is always one sample set per frame. |
2 |
Digital channel mask |
Indicates which digital I/O lines have sampling enabled. Each bit corresponds to one digital I/O line on the device. bit 0 = DIO0 Example: a digital channel mask of 0x002F means DIO0, 1, 2, 3 and 5 are configured as digital inputs or outputs. |
1 |
Analog channel mask |
Indicates which lines have analog inputs enabled for sampling. Each bit in the analog channel mask corresponds to one analog input channel. If a bit is set, then a corresponding 2-byte analog data set is included. bit 0 = AD0/DIO0 |
2 |
Digital data set |
Each bit in the digital data set corresponds to a bit in the digital channel mask and indicates the digital state of the pin, whether high (1) or low (0). If the digital channel mask is 0x0000, then these two bytes are omitted as no digital I/O lines are enabled. |
2 |
Analog data set (multiple) |
Each enabled ADC line in the analog channel mask will have a separate 2-byte value based on the number of ADC inputs on the originating device. The data starts with AD0 and continues sequentially for each enabled analog input channel up to AD3. If the analog channel mask is 0x00, then no analog sample bytes is included. |