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

Detailed Description

Message notifiying that a Thing no longer exists.

#include <DestroyMsg.h>

Inheritance diagram for Passer::RoboidControl::DestroyMsg:
Passer::RoboidControl::IMessage

Public Member Functions

 DestroyMsg (unsigned char networkId, Thing *thing)
 Create a message for sending.
 
 DestroyMsg (char *buffer)
 Create a message for receiving.
 
virtual ~DestroyMsg ()
 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.
 

Static Public Attributes

static const unsigned char id = 0x20
 The message ID.
 
static const unsigned length = 3
 The length of the message.
 

Constructor & Destructor Documentation

◆ DestroyMsg() [1/2]

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

Create a message for sending.

Parameters
networkIdThe network ID of the thing
thingThe ID of the thing

◆ DestroyMsg() [2/2]

Passer::RoboidControl::DestroyMsg::DestroyMsg ( char *  buffer)

Create a message for receiving.

Parameters
bufferThe byte array to parse

Member Function Documentation

◆ Serialize()

unsigned char Passer::RoboidControl::DestroyMsg::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.