RoboidControl-cpp/Messages/ParticipantMsg.cpp
Pascal Serrarens f2f942d084 Refactoring
2025-02-28 15:01:23 +01:00

27 lines
620 B
C++

#include "ParticipantMsg.h"
namespace RoboidControl {
ParticipantMsg::ParticipantMsg(char networkId) {
this->networkId = networkId;
}
ParticipantMsg::ParticipantMsg(const char* buffer) {
this->networkId = buffer[1];
}
ParticipantMsg::~ParticipantMsg() {}
unsigned char ParticipantMsg::Serialize(char* buffer) {
unsigned char ix = 0;
buffer[ix++] = this->id;
buffer[ix++] = this->networkId;
return ParticipantMsg::length;
}
// bool ParticipantMsg::Send(LocalParticipant *participant, unsigned char networkId) {
// ParticipantMsg msg = ParticipantMsg()
// }
// Client Msg
} // namespace RoboidControl