#include "InvestigateMsg.h" namespace RoboidControl { InvestigateMsg::InvestigateMsg(char* buffer) { unsigned ix = 1; // first byte is msgId this->networkId = buffer[ix++]; this->thingId = buffer[ix++]; } InvestigateMsg::InvestigateMsg(unsigned char networkId, unsigned char thingId) { this->networkId = networkId; this->thingId = thingId; } InvestigateMsg::~InvestigateMsg() {} unsigned char InvestigateMsg::Serialize(char* buffer) { #if defined(DEBUG) std::cout << "Send InvestigateMsg [" << (int)this->networkId << "/" << (int)this->thingId << "] " << std::endl; #endif unsigned char ix = 0; buffer[ix++] = this->id; buffer[ix++] = this->networkId; buffer[ix++] = this->thingId; return ix; } } // namespace RoboidControl