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)

Files at this revision

API Documentation at this revision

Comitter:
mariob
Date:
Tue Apr 21 08:23:47 2020 +0000
Parent:
24:80345e511574
Commit message:
added comments

Changed in this revision

ssWiTypes.hpp Show annotated file Show diff for this revision Revisions of this file
diff -r 80345e511574 -r 83172a067b57 ssWiTypes.hpp
--- a/ssWiTypes.hpp	Mon Apr 20 20:27:01 2020 +0000
+++ b/ssWiTypes.hpp	Tue Apr 21 08:23:47 2020 +0000
@@ -5,11 +5,15 @@
 #ifndef __SHARED_SLOTTED_TYPES_HPP__
 #define __SHARED_SLOTTED_TYPES_HPP__
 
-/** \brief tyoe of the port IDentifier
+/** \brief type of the port identifier
+ *
+ * it must be one byte only
  */
 typedef char PortID;
 
 /** \brief type of the Value exchanged through the port
+ *
+ * it must be a type that can be used with std::atomic
  */
 typedef int PortValue;