Message providing generic details about a Thing.
#include <ThingMsg.h>
|
| ThingMsg (unsigned char networkId, Thing *thing) |
| Create a message for sending.
|
|
| ThingMsg (const char *buffer) |
|
virtual | ~ThingMsg () |
| Destructor for the message.
|
|
virtual unsigned char | Serialize (char *buffer) override |
| Serialize the message into a byte array for sending.
|
|
|
unsigned char | networkId |
| The network ID of the thing.
|
|
unsigned char | thingId |
| The ID of the thing.
|
|
unsigned char | thingType |
| The type of thing.
|
|
unsigned char | parentId |
| The ID of the parent thing in the hierarchy. This is zero for root things.
|
|
|
static const unsigned char | id = 0x80 |
| The message ID.
|
|
static const unsigned char | length = 5 |
| The length of the message.
|
|
◆ ThingMsg() [1/2]
RoboidControl::ThingMsg::ThingMsg |
( |
unsigned char |
networkId, |
|
|
Thing * |
thing |
|
) |
| |
Create a message for sending.
- Parameters
-
networkId | The network ID of the thing |
- Parameters
-
◆ ThingMsg() [2/2]
RoboidControl::ThingMsg::ThingMsg |
( |
const char * |
buffer | ) |
|
◆ Serialize()
unsigned char RoboidControl::ThingMsg::Serialize |
( |
char * |
buffer | ) |
|
|
overridevirtual |
Serialize the message into a byte array for sending.
- Parameters
-
buffer | The buffer to serilize into |
- Returns
- The length of the message in the buffer
Reimplemented from RoboidControl::IMessage.