31 lines
851 B
C++
31 lines
851 B
C++
#include "InvestigateMsg.h"
|
|
#pragma region Investigate
|
|
|
|
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) {
|
|
unsigned char ix = 0;
|
|
buffer[ix++] = this->id;
|
|
buffer[ix++] = this->networkId;
|
|
buffer[ix++] = this->thingId;
|
|
return ix;
|
|
}
|
|
|
|
// bool InvestigateMsg::Send(Participant *participant, unsigned char networkId,
|
|
// unsigned char thingId) {
|
|
// InvestigateMsg msg = InvestigateMsg(networkId, thingId);
|
|
// return msg.Send(participant);
|
|
// }
|
|
|
|
// Investigate
|
|
#pragma endregion
|