Roboid Control for C++
Loading...
Searching...
No Matches
DestroyMsg.h
1#include "Messages.h"
2namespace Passer {
3namespace RoboidControl {
4
6class DestroyMsg : public IMessage {
7public:
9 static const unsigned char id = 0x20;
11 static const unsigned length = 3;
13 unsigned char networkId;
15 unsigned char thingId;
16
20 DestroyMsg(unsigned char networkId, Thing *thing);
22 DestroyMsg(char * buffer);
24 virtual ~DestroyMsg();
25
27 virtual unsigned char Serialize(char *buffer) override;
28};
29
30} // namespace RoboidControl
31} // namespace Passer
Message notifiying that a Thing no longer exists.
Definition DestroyMsg.h:6
static const unsigned length
The length of the message.
Definition DestroyMsg.h:11
virtual ~DestroyMsg()
Destructor for the message.
Definition DestroyMsg.cpp:13
unsigned char thingId
The ID of the thing.
Definition DestroyMsg.h:15
virtual unsigned char Serialize(char *buffer) override
Serialize the message into a byte array for sending.
Definition DestroyMsg.cpp:15
unsigned char networkId
The network ID of the thing.
Definition DestroyMsg.h:13
Root structure for all communcation messages.
Definition Messages.h:12
A thing is the primitive building block.
Definition Thing.h:17