34 lines
947 B
C++
34 lines
947 B
C++
#pragma once
|
|
|
|
#include "IMessage.h"
|
|
#include "Thing.h"
|
|
|
|
namespace RoboidControl {
|
|
|
|
/// @brief A Message notifiying that a Thing no longer exists
|
|
class DestroyMsg : public IMessage {
|
|
public:
|
|
/// @brief The message ID
|
|
static const unsigned char id = 0x20;
|
|
/// @brief The length of the message in bytes
|
|
static const unsigned length = 3;
|
|
/// @brief The network ID of the thing
|
|
unsigned char networkId;
|
|
/// @brief The ID of the thing
|
|
unsigned char thingId;
|
|
|
|
/// @brief Create a message for sending
|
|
/// @param networkId The network ID of the thing
|
|
/// @param thing The ID of the thing
|
|
DestroyMsg(unsigned char networkId, Thing* thing);
|
|
/// @copydoc RoboidControl::IMessage::IMessage(char*)
|
|
DestroyMsg(char* buffer);
|
|
/// @brief Destructor for the message
|
|
virtual ~DestroyMsg();
|
|
|
|
/// @copydoc RoboidControl::IMessage::Serialize
|
|
virtual unsigned char Serialize(char* buffer) override;
|
|
};
|
|
|
|
} // namespace RoboidControl
|