Model Railroad System 2.2.2
Public Member Functions | Static Public Member Functions | Private Member Functions | List of all members
lcc::OpenLCBMessage Class Reference

OpenLCB Message type. More...

Public Member Functions

 OpenLCBMessage (name,...)
 Construct a OpenLCB Message oject. More...
 
 toString ()
 Return the object as a printable string. More...
 

Static Public Member Functions

static validate (object)
 Validate an OpenLCBMessage. More...
 

Private Member Functions

 _configuredata (option, value)
 Configure method for data. More...
 
 _cgetdata (option)
 Cget method for data. More...
 

Detailed Description

OpenLCB Message type.

Options (fields):

Constructor & Destructor Documentation

◆ OpenLCBMessage()

lcc::OpenLCBMessage::OpenLCBMessage ( name  ,
  ... 
)

Construct a OpenLCB Message oject.

Parameters
nameThe name of the object
...Options (fields):
  • -mti The MTI Header bitfield.
  • -sourcenid The source Node ID.
  • -destnid The destination Node ID or null if this is not an addressed message.
  • -eventid The Event ID or null if there is no Event ID associated with this message.
  • -data Any additional data associated with this message.

Member Function Documentation

◆ _cgetdata()

lcc::OpenLCBMessage::_cgetdata ( option  )
private

Cget method for data.

Parameters
optionAlways -data.
Returns
Data vector (a list of bytes).

◆ _configuredata()

lcc::OpenLCBMessage::_configuredata ( option  ,
value   
)
private

Configure method for data.

Parameters
optionAlways -data.
valueA list of bytes.

◆ toString()

lcc::OpenLCBMessage::toString ( )

Return the object as a printable string.

Returns
A string representation of the object.

References FileEntry::cget().

◆ validate()

static lcc::OpenLCBMessage::validate ( object  )
static

Validate an OpenLCBMessage.

Parameters
objectA possible OpenLCBMessage object.