RoboidControl-cpp/Participant.cpp
2025-01-01 22:32:56 +01:00

48 lines
1.3 KiB
C++

#include "Participant.h"
Passer::Control::Participant::Participant(const char *ipAddress, int port)
{
}
bool Participant::SendBuffer(unsigned char bufferSize) { return false; }
bool Participant::PublishBuffer(unsigned char bufferSize) { return false; }
void Participant::ReceiveData(unsigned char bufferSize) {
unsigned char msgId = this->buffer[0];
switch (msgId) {
case NetworkIdMsg::id: {
// NetworkIdMsg msg = NetworkIdMsg::Receive(this->buffer, bufferSize);
NetworkIdMsg msg = NetworkIdMsg(this->buffer);
ProcessNetworkIdMsg(msg);
} break;
case InvestigateMsg::id: {
InvestigateMsg msg = InvestigateMsg(this->buffer);
ProcessInvestigateMsg(msg);
} break;
case ThingMsg::id: {
ThingMsg msg = ThingMsg(this->buffer);
ProcessThingMsg(msg);
} break;
case PoseMsg::id: {
PoseMsg msg = PoseMsg(this->buffer);
ProcessPoseMsg(msg);
} break;
case CustomMsg::id: {
CustomMsg msg = CustomMsg(this->buffer);
ProcessCustomMsg(msg);
} break;
};
}
void Participant::ProcessNetworkIdMsg(NetworkIdMsg msg) {}
void Participant::ProcessInvestigateMsg(InvestigateMsg msg) {}
void Participant::ProcessThingMsg(ThingMsg msg) {}
void Passer::Control::Participant::ProcessPoseMsg(PoseMsg msg)
{
}
void Participant::ProcessCustomMsg(CustomMsg msg) {}