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

Detailed Description

A message containing binary data for custom communication.

Inheritance diagram for RoboidControl.BinaryMsg:
RoboidControl.IMessage

Public Member Functions

 BinaryMsg (byte networkId, byte thingId, byte[] bytes)
 Create a new message for sending.
 
 BinaryMsg (byte networkId, Thing thing)
 Create an empty message for sending.
 
 BinaryMsg (byte[] buffer)
 
override byte Serialize (ref byte[] buffer)
 

Public Attributes

byte networkId
 The network ID identifying the thing.
 
byte thingId
 The ID of the thing.
 
Thing thing
 
byte[] bytes
 The binary data.
 

Static Public Attributes

const byte Id = 0xB1
 The message ID.
 
const byte length = 2
 The length of the message, excluding the binary data.
 

Constructor & Destructor Documentation

◆ BinaryMsg() [1/3]

RoboidControl.BinaryMsg.BinaryMsg ( byte  networkId,
byte  thingId,
byte[]  bytes 
)

Create a new message for sending.

Parameters
networkIdThe netowork ID of the thing
thingIdThe ID of the thing
bytesThe binary data for the thing

◆ BinaryMsg() [2/3]

RoboidControl.BinaryMsg.BinaryMsg ( byte  networkId,
Thing  thing 
)

Create an empty message for sending.

Parameters
networkIdThe netowork ID of the thing
thingIdThe ID of the thing

◆ BinaryMsg() [3/3]

RoboidControl.BinaryMsg.BinaryMsg ( byte[]  buffer)

Member Function Documentation

◆ Serialize()

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

Reimplemented from RoboidControl.IMessage.

Member Data Documentation

◆ length

const byte RoboidControl.BinaryMsg.length = 2
static

The length of the message, excluding the binary data.

For the total size of the message this.bytes.Length should be added to this value.