31 lines
600 B
C++
31 lines
600 B
C++
#pragma once
|
|
|
|
#include "Messages.h"
|
|
|
|
namespace Passer {
|
|
namespace Control {
|
|
|
|
class CustomMsg : 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;
|
|
|
|
CustomMsg(char *buffer);
|
|
CustomMsg(unsigned char networkId, Thing *thing);
|
|
virtual ~CustomMsg();
|
|
|
|
virtual unsigned char Serialize(char *buffer) override;
|
|
|
|
static CustomMsg Receive(char *buffer, unsigned char bufferSize);
|
|
};
|
|
|
|
} // namespace Control
|
|
} // namespace Passer
|