31 lines
612 B
C++
31 lines
612 B
C++
#pragma once
|
|
|
|
#include "Messages.h"
|
|
|
|
namespace Passer {
|
|
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
|
|
} // namespace Passer
|