User Tools

Site Tools


packet_format

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

packet_format [2014/08/22 17:39]
jcoxon
packet_format [2020/06/27 23:02]
Line 1: Line 1:
-====== Guide to Packet Format ====== 
  
-Example packet: 
-<code>2iL51.498,-0.0527T21R0[AB,AA]</code> 
- 
-  - **Repeat Number**: The first byte contains the number of repeats - most commonly this is set to 3 however if you want the packet to go further then you can increase this number. Everytime a packet is repeated the node subtracts 1 from this number, once it reaches 0 the packet will not be repeated. 
-  - **Sequence Count**: this cycles from 'b' to 'z' allowing packets to be distinguished, 'a' is only transmitted on boot of the node. 
-  - **Data**: this is where the main packet data is placed, for example location or temperature. Each data type starts with an identifying character and then each value separated by a comma. E.g. <code>T18.5,23,10</code> For more information see [[packet_data_types|Packet Data Types]]. The data section is variable in length but ideally the shorter the packet the better. 
-  - **Path**: enclosed within '[' and ']' each node adds its node ID separated by a comma at the end. Each node ID can be up to a maximum of 16 bytes. Nodes only repeat packets that they haven't repeated before (to avoid loops) so before repeating the node needs to check for its node ID in the path section. For example (pseudocode) <code> 
-1) detect final ] in string/array 
-2) replace ] with ,your_ID] (comma followed by your_ID followed by square end bracket) 
-</code> 
packet_format.txt ยท Last modified: 2020/06/27 23:02 (external edit)