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

Detailed Description

Message to send thing-specific data.

#include <BinaryMsg.h>

Inherits RoboidControl::IMessage.

Public Member Functions

 BinaryMsg (unsigned char networkId, Thing *thing)
 Create a new message for sending.
 
 BinaryMsg (char *buffer)
 
virtual ~BinaryMsg ()
 Destructor for the message.
 
virtual unsigned char Serialize (char *buffer) override
 

Static Public Member Functions

static unsigned char * ReceiveMsg (unsigned char packetSize)
 

Public Attributes

unsigned char networkId
 The network ID of the thing.
 
unsigned char thingId
 The ID of the thing.
 
Thingthing
 The thing for which the binary data is communicated.
 
char * bytes = nullptr
 The binary data which is communicated.
 

Static Public Attributes

static const unsigned char id = 0xB1
 The message ID.
 
static const unsigned length = 3
 The length of the message without the binary data itslef.
 

Constructor & Destructor Documentation

◆ BinaryMsg() [1/2]

RoboidControl::BinaryMsg::BinaryMsg ( unsigned char  networkId,
Thing thing 
)

Create a new message for sending.

Parameters
networkIdThe network ID of the thing
thingThe thing for which binary data is sent

◆ BinaryMsg() [2/2]

RoboidControl::BinaryMsg::BinaryMsg ( char *  buffer)

Member Function Documentation

◆ Serialize()

unsigned char RoboidControl::BinaryMsg::Serialize ( char *  buffer)
overridevirtual