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

Detailed Description

A participant messages notifies other participants of its presence.

Inheritance diagram for Passer.RoboidControl.ParticipantMsg:
Passer.RoboidControl.IMessage

Public Member Functions

 ParticipantMsg (byte networkId)
 Create a new message for sending.
 
 ParticipantMsg (byte[] buffer)
 Create a message for receiving.
 
override byte Serialize (ref byte[] buffer)
 Serialize the message into a byte array.
 

Public Attributes

byte networkId
 The network ID known by the participant.
 

Static Public Attributes

const byte Id = 0xA0
 The message ID.
 
const byte length = 2
 The length of the message.
 

Constructor & Destructor Documentation

◆ ParticipantMsg() [1/2]

Passer.RoboidControl.ParticipantMsg.ParticipantMsg ( byte  networkId)

Create a new message for sending.

Parameters
networkId

◆ ParticipantMsg() [2/2]

Passer.RoboidControl.ParticipantMsg.ParticipantMsg ( byte[]  buffer)

Create a message for receiving.

Parameters
bufferThe byte array to parse

Member Function Documentation

◆ Serialize()

override byte Passer.RoboidControl.ParticipantMsg.Serialize ( ref byte[]  buffer)
virtual

Serialize the message into a byte array.

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

Reimplemented from Passer.RoboidControl.IMessage.