VLCB
Loading...
Searching...
No Matches
VLCB::VlcbMessage Struct Reference

VLCB message type. More...

#include <Controller.h>

Public Member Functions

 VlcbMessage ()=default
 VlcbMessage (uint8_t len, uint8_t data[])
 Construct a message from existing data.
 VlcbMessage (VlcbOpCodes opc)
 Construct a message and populate the message OP-code.
VlcbMessageaddData (byte b)
 Add a data byte to the message.
VlcbMessageadd2Bytes (unsigned int n)
 Add a number as two bytes of data to the message.
VlcbMessageaddNN (unsigned int nn)
 Add a node number (two bytes) to the message.
VlcbMessageaddEN (unsigned int en)
 Add an event number (two bytes) to the message.
VlcbMessageaddNNEN (byte nn_en[EE_HASH_BYTES])
 Add an event identifier (NN/EN) to the message.

Public Attributes

uint8_t len
uint8_t data [8]

Detailed Description

VLCB message type.

Describes messages send and received from other nodes on the LCB.

Construct the VlcbMessage object directly from a set of data bytes or use functions to add one data item to the message at a time.

Example:

VlcbMessage msg = VlcbMessage(OPC_ACON).addNN(eventNodeNumber).addEN(eventNumber);
VlcbMessage()=default
@ OPC_ACON
Definition vlcbdefs.hpp:282

Constructor & Destructor Documentation

◆ VlcbMessage() [1/3]

VLCB::VlcbMessage::VlcbMessage ( )
default

◆ VlcbMessage() [2/3]

VLCB::VlcbMessage::VlcbMessage ( uint8_t len,
uint8_t data[] )
inline

Construct a message from existing data.

◆ VlcbMessage() [3/3]

VLCB::VlcbMessage::VlcbMessage ( VlcbOpCodes opc)
inlineexplicit

Construct a message and populate the message OP-code.

Member Function Documentation

◆ addData()

VlcbMessage & VLCB::VlcbMessage::addData ( byte b)

Add a data byte to the message.

◆ add2Bytes()

VlcbMessage & VLCB::VlcbMessage::add2Bytes ( unsigned int n)

Add a number as two bytes of data to the message.

◆ addNN()

VlcbMessage & VLCB::VlcbMessage::addNN ( unsigned int nn)
inline

Add a node number (two bytes) to the message.

◆ addEN()

VlcbMessage & VLCB::VlcbMessage::addEN ( unsigned int en)
inline

Add an event number (two bytes) to the message.

◆ addNNEN()

VlcbMessage & VLCB::VlcbMessage::addNNEN ( byte nn_en[EE_HASH_BYTES])

Add an event identifier (NN/EN) to the message.

Member Data Documentation

◆ len

uint8_t VLCB::VlcbMessage::len

◆ data

uint8_t VLCB::VlcbMessage::data[8]

The documentation for this struct was generated from the following files: