fix readme

This commit is contained in:
Adrien Marquès 2018-12-02 21:57:31 +01:00
parent 4410b3fd38
commit 7c65091230
1 changed files with 18 additions and 7 deletions

View File

@ -1,14 +1,25 @@
# | Opportunistic ZigBee | # | Opportunistic ZigBee |
<!-- toc -->
- [I. Overview](#i-overview)
- [II. File structure](#ii-file-structure)
- [III. Algorithm](#iii-algorithm)
+ [1) Data structure](#1-data-structure)
- [Discover Request](#discover-request)
- [Data Message](#data-message)
+ [2) Well](#2-well)
+ [3) Nodes](#3-nodes)
<!-- tocstop -->
## I. Overview ## I. Overview
This project aims to design and optimize a solution for an optimistic network using Arduino and [XBee](https://www.digi.com/xbee). This project aims to design and optimize a solution for an optimistic network using [Arduino](https://www.arduino.cc/) and [XBee](https://www.digi.com/xbee).
The base scenario takes place in a mesh network of similar <u>nodes</u> ; each being subject to real-time motion. Every node has to transmit logging data (*i.e. periodically*) to a special node : the **well ** ; the well is unique in the network and is the only one that actually receives data, every other node has the same source code and behavior. > The base scenario takes place in a mesh network of similar <u>nodes</u> ; each being subject to real-time motion. Every node has to transmit logging data (*i.e. periodically*) to a special node : the **well ** ; the well is unique in the network and is the only one that actually receives data, every other node has the same source code and behavior.
@ -24,7 +35,7 @@ The base scenario takes place in a mesh network of similar <u>nodes</u> ; each b
- **distance** - the relative distance to the well. The well has a distance of 0, its direct neighbors a distance of 1 and so on. - **distance** - the relative distance to the well. The well has a distance of 0, its direct neighbors a distance of 1 and so on.
- **wave** - a distance propagation of distances throughout the network that share a common source. - **wave** - a propagation of distances throughout the network that share a common source.
@ -61,12 +72,12 @@ Every communication follows a consistent data format which can be split into 2 t
##### Discover Request ##### Discover Request
The `discover` data format is used to propagate the relative distances throughout the network. The **well** is the only node that can initiate a discover request, other nodes only make sure of the propagation. The `discover` request is used to propagate the relative distances throughout the network. The **well** is the only node that can initiate a discover request, other nodes only make sure of the propagation.
```c++ ```c++
struct discover { struct discover {
uint8_t opcode; // opcode = 0 uint8_t opcode; // opcode = 0
uint8_t wave; // id de la wave uint8_t wave; // wave id (overflows at 255 ; uint8_t)
uint8_t dist; // current node's distance uint8_t dist; // current node's distance
}; };
``` ```
@ -75,7 +86,7 @@ struct discover {
##### Data Message ##### Data Message
The `data` format is sent by nodes to submit messagesca to the well. The `data` format is sent by nodes to submit messages to the well.
```c++ ```c++
struct message { struct message {
@ -93,7 +104,7 @@ struct message {
The well features 2 routines : The well features 2 routines :
1. Send <u>[discover](#discover-request)</u> requests periodically 1. Send <u>[discover](#discover-request)</u> requests periodically.
2. Listen for incoming [data](#data-message). 2. Listen for incoming [data](#data-message).