Roboid Control for C++
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
Passer::RoboidControl::ModelUrlMsg Class Reference

Detailed Description

Message for communicating the URL for a model of the thing.

#include <ModelUrlMsg.h>

Inheritance diagram for Passer::RoboidControl::ModelUrlMsg:
Passer::RoboidControl::IMessage

Public Member Functions

 ModelUrlMsg (unsigned char networkId, Thing *thing)
 Create a new message for sending.
 
 ModelUrlMsg (const char *buffer)
 Create a message for receiving.
 
virtual ~ModelUrlMsg ()
 Destructor for the message.
 
virtual unsigned char Serialize (char *buffer) override
 Serialize the message into a byte array for sending.
 

Public Attributes

unsigned char networkId
 The network ID of the thing.
 
unsigned char thingId
 The ID of the thing.
 
unsigned char urlLength
 The length of the url st5ring, excluding the null terminator.
 
const char * url
 The url of the model, not terminated by a null character.
 

Static Public Attributes

static const unsigned char id = 0x90
 The message ID.
 
static const unsigned char length = 3
 The length of the message without the URL string itself.
 

Constructor & Destructor Documentation

◆ ModelUrlMsg() [1/2]

Passer::RoboidControl::ModelUrlMsg::ModelUrlMsg ( unsigned char  networkId,
Thing thing 
)

Create a new message for sending.

Parameters
networkIdThe network ID of the thing
thingThe thing for which to send the mode URL

◆ ModelUrlMsg() [2/2]

Passer::RoboidControl::ModelUrlMsg::ModelUrlMsg ( const char *  buffer)

Create a message for receiving.

Parameters
bufferThe byte array to parse

Member Function Documentation

◆ Serialize()

unsigned char Passer::RoboidControl::ModelUrlMsg::Serialize ( char *  buffer)
overridevirtual

Serialize the message into a byte array for sending.

Parameters
bufferThe buffer to serilize into
Returns
The length of the message in the buffer

Reimplemented from Passer::RoboidControl::IMessage.