diff --git a/Messages/BinaryMsg.cpp b/Messages/BinaryMsg.cpp index 7e8f6d8..0b0b940 100644 --- a/Messages/BinaryMsg.cpp +++ b/Messages/BinaryMsg.cpp @@ -31,6 +31,10 @@ unsigned char BinaryMsg::Serialize(char* buffer) { if (this->dataLength <= 0) // in this case, no data is actually sent return 0; +#if defined(DEBUG) + std::cout << "Send BinaryMsg [" << (int)this->networkId << "/" << (int)this->thingId + << "] " << (int)this->dataLength << std::endl; +#endif unsigned char ix = 0; buffer[ix++] = this->id; buffer[ix++] = this->networkId; diff --git a/Messages/ThingMsg.cpp b/Messages/ThingMsg.cpp index c22d58d..932530f 100644 --- a/Messages/ThingMsg.cpp +++ b/Messages/ThingMsg.cpp @@ -32,6 +32,10 @@ ThingMsg::ThingMsg(unsigned char networkId, Thing* thing) { ThingMsg::~ThingMsg() {} unsigned char ThingMsg::Serialize(char* buffer) { +#if defined(DEBUG) + std::cout << "Send ThingMsg [" << (int)this->networkId << "/" << (int)this->thingId + << "] " << (int)this->thingType << " " << (int)this->parentId << std::endl; +#endif unsigned char ix = 0; buffer[ix++] = this->id; buffer[ix++] = this->networkId;