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