4namespace RoboidControl {
6constexpr int MAX_THING_COUNT = 256;
36 const std::list<Participant*>&
GetAll()
const;
42 std::list<Participant*> participants;
71 unsigned char thingCount = 0;
72 Thing* things[MAX_THING_COUNT];
84 void Add(
Thing* thing,
bool checkId =
true);
91 virtual void Update(
unsigned long currentTimeMs = 0);
A participant is a device which manages things. It can communicate with other participant to synchron...
Definition Participant.h:52
void Add(Thing *thing, bool checkId=true)
Add a new thing for this participant.
Definition Participant.cpp:51
Thing * Get(unsigned char thingId)
Find a thing managed by this participant.
Definition Participant.cpp:40
unsigned char networkId
The network Id to identify the participant.
Definition Participant.h:60
unsigned int port
The port number for UDP communication with the participant.
Definition Participant.h:57
const char * ipAddress
The Ip Address of a participant.
Definition Participant.h:55
void Remove(Thing *thing)
Remove a thing for this participant.
Definition Participant.cpp:89
~Participant()
Destructor for the participant.
Definition Participant.cpp:28
std::list< Thing * > things
The things managed by this participant.
Definition Participant.h:75
virtual void Update(unsigned long currentTimeMs=0)
Update all things for this participant.
Definition Participant.cpp:33
class which manages all known participants
Definition Participant.h:9
const std::list< Participant * > & GetAll() const
Get all participants.
Definition Participant.cpp:175
Participant * Add(const char *ipAddress, unsigned int port)
Add a participant with the given details.
Definition Participant.cpp:142
Participant * Get(const char *ipAddress, unsigned int port)
Retrieve a participant by its address.
Definition Participant.cpp:114
void Remove(Participant *participant)
Remove a participant.
Definition Participant.cpp:171
A thing is the primitive building block.
Definition Thing.h:20