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

Detailed Description

Message for sending generic text.

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

Public Member Functions

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

Public Attributes

string text = ""
 The text.
 

Static Public Attributes

const byte Id = 0xB0
 The message ID.
 
const byte length = 2
 The length of the message without the text itself.
 

Constructor & Destructor Documentation

◆ TextMsg() [1/2]

Passer.RoboidControl.TextMsg.TextMsg ( string  text)

Create a new message for sending.

Parameters
textThe text to send

◆ TextMsg() [2/2]

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

Create a message for receiving.

Parameters
bufferThe byte array to parse

Member Function Documentation

◆ Serialize()

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

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.