Roboid Control for C++
Loading...
Searching...
No Matches
ModelUrlMsg.h
1#include "Messages.h"
2
3namespace Passer {
4namespace RoboidControl {
5
7class ModelUrlMsg : public IMessage {
8public:
10 static const unsigned char id = 0x90;
12 static const unsigned char length = 3;
13
15 unsigned char networkId;
17 unsigned char thingId;
18
20 unsigned char urlLength;
22 const char *url;
23
27 ModelUrlMsg(unsigned char networkId, Thing *thing);
29 ModelUrlMsg(const char *buffer);
30 // ModelUrlMsg(unsigned char networkId, unsigned char thingId,
31 // unsigned char urlLegth, const char *url, float scale = 1);
32
34 virtual ~ModelUrlMsg();
35
37 virtual unsigned char Serialize(char *buffer) override;
38};
39
40} // namespace Control
41} // namespace Passer
Root structure for all communcation messages.
Definition Messages.h:12
Message for communicating the URL for a model of the thing.
Definition ModelUrlMsg.h:7
unsigned char thingId
The ID of the thing.
Definition ModelUrlMsg.h:17
unsigned char networkId
The network ID of the thing.
Definition ModelUrlMsg.h:15
virtual unsigned char Serialize(char *buffer) override
Serialize the message into a byte array for sending.
Definition ModelUrlMsg.cpp:40
const char * url
The url of the model, not terminated by a null character.
Definition ModelUrlMsg.h:22
unsigned char urlLength
The length of the url st5ring, excluding the null terminator.
Definition ModelUrlMsg.h:20
static const unsigned char length
The length of the message without the URL string itself.
Definition ModelUrlMsg.h:12
virtual ~ModelUrlMsg()
Destructor for the message.
Definition ModelUrlMsg.cpp:38
A thing is the primitive building block.
Definition Thing.h:17