A participant messages notifies other participants of its presence When received by another participant, it can be followed by a NetworkIdMsg to announce that participant to this client such that it can join privately.
#include <ParticipantMsg.h>
Inherits RoboidControl::IMessage.
|
| ParticipantMsg (char networkId) |
| Create a new message for sending.
|
|
| ParticipantMsg (const char *buffer) |
|
virtual | ~ParticipantMsg () |
| Destructor for the message.
|
|
virtual unsigned char | Serialize (char *buffer) override |
| Serialize the message into a byte array.
|
|
|
static unsigned char * | ReceiveMsg (unsigned char packetSize) |
|
|
unsigned char | networkId |
| The network ID known by the participant.
|
|
|
static const unsigned char | id = 0xA0 |
| The message ID.
|
|
static const unsigned char | length = 2 |
| The length of the message.
|
|
◆ ParticipantMsg() [1/2]
RoboidControl::ParticipantMsg::ParticipantMsg |
( |
char |
networkId | ) |
|
Create a new message for sending.
- Parameters
-
networkId | The network ID known by the participant |
◆ ParticipantMsg() [2/2]
RoboidControl::ParticipantMsg::ParticipantMsg |
( |
const char * |
buffer | ) |
|
◆ Serialize()
unsigned char RoboidControl::ParticipantMsg::Serialize |
( |
char * |
buffer | ) |
|
|
overridevirtual |
Serialize the message into a byte array.
- Parameters
-
buffer | The buffer to serialize into |
- Returns
- The length of the message in the buffer