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

Detailed Description

Message for communicating the name of a thing.

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

Public Member Functions

 NameMsg (byte networkId, Thing thing)
 Create a new message for sending.
 
 NameMsg (byte networkId, byte thingId, string name)
 Create a new message for sending.
 
 NameMsg (byte[] buffer)
 Create a message for receiving.
 
override byte Serialize (ref byte[] buffer)
 Serialize the message into a byte array for sending.
 

Public Attributes

byte networkId
 The network ID of the thing.
 
byte thingId
 The ID of the thing.
 
byte len
 The length of the name, excluding null terminator.
 
string name = ""
 The name of the thing, not terminated with a null character.
 

Static Public Attributes

const byte Id = 0x91
 The message ID.
 
const byte length = 4
 The length of the message.
 

Constructor & Destructor Documentation

◆ NameMsg() [1/3]

Passer.RoboidControl.NameMsg.NameMsg ( byte  networkId,
Thing  thing 
)

Create a new message for sending.

Parameters
networkIdThe network ID of the thing
thingThe thing

◆ NameMsg() [2/3]

Passer.RoboidControl.NameMsg.NameMsg ( byte  networkId,
byte  thingId,
string  name 
)

Create a new message for sending.

Parameters
networkIdThe network ID of the thing
thingIdThe ID of the thing
nameThe name of the thing

◆ NameMsg() [3/3]

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

Create a message for receiving.

Parameters
bufferThe byte array to parse

Member Function Documentation

◆ Serialize()

override byte Passer.RoboidControl.NameMsg.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.