3#include "Participant.h"
7#include <unordered_map>
10namespace RoboidControl {
19 template <
typename ThingClass>
void Register(
unsigned char thingType) {
20 thingMsgProcessors[thingType] = [](
unsigned char networkId,
21 unsigned char thingId) {
22 return new ThingClass(
networkId, thingId);
27 unsigned long nextPublishMe = 0;
33 using ThingConstructor =
34 std::function<
Thing *(
unsigned char networkId,
unsigned char thingId)>;
35 std::unordered_map<unsigned char, ThingConstructor> thingMsgProcessors;
40using namespace Passer::RoboidControl;
A message communicating the network ID for that participant.
Definition NetworkIdMsg.h:7
A participant is device which can communicate with other participants.
Definition Participant.h:31
A participant messages notifies other participants of its presence When received by another participa...
Definition ParticipantMsg.h:11
A reference to a participant, possibly on a remote location.
Definition RemoteParticipant.h:8
unsigned char networkId
The network ID of the participant.
Definition RemoteParticipant.h:16
int port
The UDP port on which the participant can be reached.
Definition RemoteParticipant.h:13
A participant is device which can communicate with other participants.
Definition SiteServer.h:13
A thing is the primitive building block.
Definition Thing.h:17
Message providing generic information about a Thing.
Definition ThingMsg.h:7