Roboid Control for C++
Loading...
Searching...
No Matches
NetworkIdMsg.h
1#pragma once
2
3#include "IMessage.h"
4
5namespace RoboidControl {
6
8class NetworkIdMsg : public IMessage {
9public:
11 static const unsigned char id = 0xA1;
13 static const unsigned char length = 2;
15 unsigned char networkId;
16
19 NetworkIdMsg(unsigned char networkId);
21 NetworkIdMsg(const char *buffer);
23 virtual ~NetworkIdMsg();
24
26 virtual unsigned char Serialize(char *buffer) override;
27};
28
29} // namespace Control
Root structure for all communcation messages.
Definition IMessage.h:6
A message communicating the network ID for that participant.
Definition NetworkIdMsg.h:8
virtual unsigned char Serialize(char *buffer) override
Serialize the message into a byte array for sending.
Definition NetworkIdMsg.cpp:15
static const unsigned char length
The length of the message.
Definition NetworkIdMsg.h:13
virtual ~NetworkIdMsg()
Destructor for the message.
Definition NetworkIdMsg.cpp:13
unsigned char networkId
The network ID for the participant.
Definition NetworkIdMsg.h:15