ISEN Nimes CSI3 / RF24Network

Dependents:   ISEN_RF24Network_Node_01 ISEN_RF24Network_Node_02

Embed: (wiki syntax)

« Back to documentation index

Sync Class Reference

Sync Class Reference

Synchronizes a shared set of variables between multiple nodes. More...

#include <Sync.h>

Public Member Functions

 Sync (RF24Network &_network)
 Constructor.
void begin (uint16_t _to_node)
 Begin the object.
template<class T >
void register_me (T &_data)
 Declare the shared data set.
void reset (void)
 Reset the internal copy of the shared data set.
void update (void)
 Update the network and the shared data set.

Detailed Description

Synchronizes a shared set of variables between multiple nodes.

Definition at line 27 of file Sync.h.


Constructor & Destructor Documentation

Sync ( RF24Network _network )

Constructor.

Parameters:
_networkWhich network to syncrhonize over

Definition at line 43 of file Sync.h.


Member Function Documentation

void begin ( uint16_t  _to_node )

Begin the object.

Parameters:
_to_nodeWhich node we are syncing with

Definition at line 52 of file Sync.h.

void register_me ( T &  _data )

Declare the shared data set.

Parameters:
_dataLocation of shared data to be syncrhonized

Definition at line 62 of file Sync.h.

void reset ( void   )

Reset the internal copy of the shared data set.

Definition at line 73 of file Sync.h.

void update ( void   )

Update the network and the shared data set.

Definition at line 21 of file Sync.cpp.