2025-02-19 17:54:55 +01:00

31 lines
612 B
C++

#pragma once
#include "Messages.h"
namespace Passer {
namespace RoboidControl {
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 RoboidControl
} // namespace Passer