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
bit 1 = DIO1
bit 2 = DIO2
bit 3 = DIO3
bit 4 = DIO4
bit 5 = DIO5
bit 6 = DIO6
bit 7 = DIO7
bit 8 = DIO8
bit 9 = DIO9
bit 10 = DIO10
bit 11 = DIO11
bit 12 = DIO12
bit 13 = DIO13
bit 14 = DIO14
bit 15 = N/A

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
bit 1 = AD1/DIO1
bit 2 = AD2/DIO2
bit 3 = AD3/DIO3

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.