Roboid Control for C++
Loading...
Searching...
No Matches
SiteServer.h
1#pragma once
2
3#include "ParticipantUDP.h"
4
5#if !defined(NO_STD)
6#include <functional>
7#include <memory>
8#include <unordered_map>
9#endif
10
11namespace RoboidControl {
12
14class SiteServer : public ParticipantUDP {
15
16#pragma region Init
17
18 public:
21 SiteServer(int port = 7681);
22
23#pragma endregion Init
24
25#pragma region Update
26
27 virtual void UpdateMyThings(unsigned long currentTimeMs) override;
28
29#pragma endregion Update
30
31#pragma region Receive
32
33 protected:
34 unsigned long nextPublishMe = 0;
35
36 virtual void Process(Participant* sender, ParticipantMsg* msg) override;
37 virtual void Process(Participant* sender, NetworkIdMsg* msg) override;
38 virtual void Process(Participant* sender, ThingMsg* msg) override;
39
40#pragma endregion Receive
41
42};
43
44} // namespace RoboidControl
A message communicating the network ID for that participant.
Definition NetworkIdMsg.h:8
A participant is a device which manages things. It can communicate with other participant to synchron...
Definition Participant.h:52
unsigned int port
The port number for UDP communication with the participant.
Definition Participant.h:57
A participant messages notifies other participants of its presence When received by another participa...
Definition ParticipantMsg.h:10
A participant using UDP communication A local participant is the local device which can communicate w...
Definition ParticipantUDP.h:45
A participant is device which can communicate with other participants.
Definition SiteServer.h:14
Message providing generic details about a Thing.
Definition ThingMsg.h:7