#include "Messages.h" namespace RoboidControl { /// @brief Message for communicating the name of a thing class NameMsg : public IMessage { public: /// @brief The message ID static const unsigned char id = 0x91; /// @brief The length of the message static const unsigned char length = 4; /// @brief The network ID of the thing unsigned char networkId; /// @brief The ID of the thing unsigned char thingId; /// @brief The length of the name, excluding the null terminator unsigned char nameLength; /// @brief The name of the thing, not terminated with a null character const char* name; /// @brief Create a new message for sending /// @param networkId The network ID of the thing /// @param thing The ID of the thing NameMsg(unsigned char networkId, Thing* thing); // NameMsg(unsigned char networkId, unsigned char thingId, const char *name, // unsigned char nameLength); /// @copydoc RoboidControl::IMessage::IMessage(char*) NameMsg(const char* buffer); /// @brief Destructor for the message virtual ~NameMsg(); /// @copydoc RoboidControl::IMessage::Serialize virtual unsigned char Serialize(char* buffer) override; }; } // namespace RoboidControl