#include "IMessage.h" #include "Thing.h" namespace RoboidControl { /// @brief Message providing generic details about a Thing class ThingMsg : public IMessage { public: /// @brief The message ID static const unsigned char id = 0x80; /// @brief The length of the message static const unsigned char length = 5; /// @brief The network ID of the thing unsigned char networkId; /// @brief The ID of the thing unsigned char thingId; /// @brief The type of thing unsigned char thingType; /// @brief The ID of the parent thing in the hierarchy. This is zero for root things unsigned char parentId; /// @brief Create a message for sending /// @param networkId The network ID of the thing /// @param thing The thing ThingMsg(unsigned char networkId, Thing* thing); /// @copydoc RoboidControl::IMessage::IMessage(char*) ThingMsg(const char* buffer); /// @brief Destructor for the message virtual ~ThingMsg(); /// @copydoc RoboidControl::IMessage::Serialize virtual unsigned char Serialize(char* buffer) override; }; } // namespace RoboidControl