RoboidControl-cpp/SiteServer.h
2025-01-14 20:19:02 +01:00

28 lines
770 B
C++

#pragma once
#include "Participant.h"
namespace Passer {
namespace Control {
/// @brief A participant is device which can communicate with other participants
class SiteServer : public Participant {
public:
SiteServer(int port = 7681);
virtual void Update(unsigned long currentTimeMs) override;
template <typename ThingClass> void Register(unsigned char thingType);
// template <typename ThingClass> void Register(Thing::Type thingType);
protected:
unsigned long nextPublishMe = 0;
virtual void Process(Participant *sender, ClientMsg *msg) override;
virtual void Process(Participant *sender, NetworkIdMsg *msg) override;
virtual void Process(ThingMsg *msg) override;
};
} // namespace Control
} // namespace Passer
using namespace Passer::Control;