Node Payload Design

From Glacsweb Wiki
Jump to: navigation, search

Sensor Reading Packet Design

*Message Type (1 bytes)
*Time Stamp (4 bytes) milliseconds
*Temp (2 bytes)
*X Axis (2 bytes)
*Y Axis (2 bytes)
*Z Axis (2 bytes)
*Conductivity (2 bytes)
*Light Sensor (2 bytes)
Total 17 Hex

For Example,

| 00 | 01 07 AC 00 | 00 FF | 00 0A | 00 34 | 01 05 | 00 F5 | 00 1A |

Time Stamp will be based on the Unix Epoch technique that is used by so many systems, logging the number of seconds past the 1st January 1970. As we want to have a better resolution than standard Epoch but we only have 4 bytes available we will log timestamps with our version of Epoch as the number of milliseconds past the 1st January 2010.

Sensor Debug Packet Design

*Message Type (1 bytes)
*Battery Voltage (2 bytes)

For Example,

| 01 | 00 FF |

QUESTIONS!

  • Can temp move to after timestamp - makes slightly more sense (already Done)
  • Can we transmit a nodeId as 1 x Hex? Makes life easier when not using nodeviewer (can but easyier done in node viewer)