A simple wireless protocol to let my examples communicate each other. ssWi stands for Shared Slotted Wireless protocol

Dependents:   rover_car rover_pc supervisor watering_unit ... more

This library aims at implementing a simple communication protocol among nodes, abstracting from the hardware. The name ssWi stands for Shared Slotted Wireless. Wireless is part of the name, even though the library abstracts from the hardware, as the first version was entirely focused on the XBee modules and then the name has not been changed.

The communication channel is represented by ssWiChannel, an abstract class which models the channel that the transceivers access to. The concrete classes must implement the functions: init, read and write. The protocol automatically sends and receives data through the selected channel, exploiting the operting system timers. Addresses are not considered as the communication lays on broadcast transmissions.

The protocol provides the ssWiPort abstraction which is like memory areas shared among all the connected nodes. Reading from one port lets the node retrieve the last written value from the other nodes. Writing on one port means sending such value to other nodes.

Objects instantiated from ssWiSocket are the interface for allowing nodes to access the protocol ports.

/media/uploads/mariob/scheme.png

TODO:

  • improve the parsing of the received messages
  • communication tests with many nodes (so far, only 2 nodes have been tested)
Committer:
mariob
Date:
Wed Mar 06 23:13:31 2013 +0000
Revision:
15:fb0f6cbc0ed5
Parent:
13:69ff47a83260
Child:
25:83172a067b57
From threads to timers; MB

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mariob 15:fb0f6cbc0ed5 1 /** \file ssWiTypes.hpp
mariob 15:fb0f6cbc0ed5 2 * \brief type definition file
mariob 15:fb0f6cbc0ed5 3 */
mariob 15:fb0f6cbc0ed5 4
mariob 15:fb0f6cbc0ed5 5 #ifndef __SHARED_SLOTTED_TYPES_HPP__
mariob 15:fb0f6cbc0ed5 6 #define __SHARED_SLOTTED_TYPES_HPP__
mariob 15:fb0f6cbc0ed5 7
mariob 15:fb0f6cbc0ed5 8 /** \brief tyoe of the port IDentifier
mariob 15:fb0f6cbc0ed5 9 */
mariob 15:fb0f6cbc0ed5 10 typedef char PortID;
mariob 15:fb0f6cbc0ed5 11
mariob 15:fb0f6cbc0ed5 12 /** \brief type of the Value exchanged through the port
mariob 15:fb0f6cbc0ed5 13 */
mariob 15:fb0f6cbc0ed5 14 typedef int PortValue;
mariob 15:fb0f6cbc0ed5 15
mariob 15:fb0f6cbc0ed5 16 #endif //__SHARED_SLOTTED_TYPES_HPP__