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, 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 dataLength
 The length of the data.
 
byte[] data
 The binary data.
 

Static Public Attributes

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

Constructor & Destructor Documentation

◆ BinaryMsg() [1/2]

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() [2/2]

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 = 4
static

The length of the message in bytes, excluding the binary data.

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