Roboid Control for C++
Loading...
Searching...
No Matches
NetworkIdMsg.h
1#include "Messages.h"
2
3namespace Passer {
4namespace RoboidControl {
5
7class NetworkIdMsg : public IMessage {
8public:
10 static const unsigned char id = 0xA1;
12 static const unsigned char length = 2;
14 unsigned char networkId;
15
18 NetworkIdMsg(unsigned char networkId);
20 NetworkIdMsg(const char *buffer);
22 virtual ~NetworkIdMsg();
23
25 virtual unsigned char Serialize(char *buffer) override;
26};
27
28} // namespace Control
29} // namespace Passer
Root structure for all communcation messages.
Definition Messages.h:12
A message communicating the network ID for that participant.
Definition NetworkIdMsg.h:7
static const unsigned char length
The length of the message.
Definition NetworkIdMsg.h:12
virtual ~NetworkIdMsg()
Destructor for the message.
Definition NetworkIdMsg.cpp:12
unsigned char networkId
The network ID for the participant.
Definition NetworkIdMsg.h:14
virtual unsigned char Serialize(char *buffer) override
Serialize the message into a byte array for sending.
Definition NetworkIdMsg.cpp:14