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

Detailed Description

Message providing generic information about a Thing.

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

Public Member Functions

 ThingMsg (byte networkId, Thing thing)
 Create a message for sending.
 
 ThingMsg (byte networkId, byte thingId, byte thingType, byte parentId)
 Create a message for sending.
 
 ThingMsg (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 of the thing.
 
byte thingId
 The ID of the thing.
 
byte thingType
 The Thing.Type of the thing.
 
byte parentId
 The parent of the thing in the hierarachy. This is null for root Things.
 

Static Public Attributes

const byte id = 0x80
 The message ID.
 
const byte length = 5
 The length of the message.
 

Constructor & Destructor Documentation

◆ ThingMsg() [1/3]

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

Create a message for sending.

Parameters
networkIdThe network ID of the thing
thingThe thing

◆ ThingMsg() [2/3]

Passer.RoboidControl.ThingMsg.ThingMsg ( byte  networkId,
byte  thingId,
byte  thingType,
byte  parentId 
)

Create a message for sending.

Parameters
networkIdThe network ID of the thing
thingIdThe ID of the thing
thingTypeThe type of thing
parentIdThe parent of the thing

◆ ThingMsg() [3/3]

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

Create a message for receiving.

Parameters
bufferThe byte array to parse

Member Function Documentation

◆ Serialize()

override byte Passer.RoboidControl.ThingMsg.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 bufer. 0 when the buffer was too small

Reimplemented from Passer.RoboidControl.IMessage.