namespace Passer::Control { class IMessage { public: static unsigned char buffer[256]; virtual unsigned char *Serialize(); static bool SendMsg(IMessage msg, unsigned char bufferSize); static bool SendMsg(unsigned char *buffer, unsigned char bufferSize); }; class InvestigateMsg : public IMessage { public: static const unsigned char id = 0x81; static const unsigned char length = 3; unsigned char networkId; unsigned char thingId; InvestigateMsg(unsigned char thingId); virtual unsigned char *Serialize() override; static bool Send(unsigned char thingId); }; } // namespace Passer::Control using namespace Passer::Control;