29 lines
573 B
C++
29 lines
573 B
C++
#pragma once
|
|
|
|
#include "Messages.h"
|
|
|
|
namespace RoboidControl {
|
|
|
|
class BinaryMsg : public IMessage {
|
|
public:
|
|
static const unsigned char id = 0xB1;
|
|
static const unsigned length = 3;
|
|
|
|
unsigned char networkId;
|
|
unsigned char thingId;
|
|
Thing* thing;
|
|
|
|
unsigned char bytesSize;
|
|
char* bytes = nullptr;
|
|
|
|
BinaryMsg(char* buffer);
|
|
BinaryMsg(unsigned char networkId, Thing* thing);
|
|
virtual ~BinaryMsg();
|
|
|
|
virtual unsigned char Serialize(char* buffer) override;
|
|
|
|
static BinaryMsg Receive(char* buffer, unsigned char bufferSize);
|
|
};
|
|
|
|
} // namespace RoboidControl
|