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

Implements a CAN Alias. More...

Public Member Functions

 getNextAlias ()
 Compute next alias. More...
 
 _peelnid (value)
 Peel the Node ID into bytes and initializing the 48 bit random number seed for alias generation. More...
 
 CanAlias (name,...)
 Construct a CAN Alias. More...
 
 getMyAlias ()
 Return the current alias value. More...
 
 getMyNIDList ()
 Return the NID list. More...
 

Static Public Member Functions

static validate (object)
 Validate the object as a CanAlias object. More...
 

Public Attributes

 lfsr1
 Sequence value, upper 24 bits. More...
 
 lfsr2
 Sequence value, lower 24 bits. More...
 
 nidlist
 The Node ID as a list of 6 bytes. More...
 
 myalias
 My node alias. More...
 

Detailed Description

Implements a CAN Alias.

Options:

Constructor & Destructor Documentation

◆ CanAlias()

lcc::CanAlias::CanAlias ( name  ,
  ... 
)

Construct a CAN Alias.

Parameters
nameThe NodeID
...Options
  • -nid The Node ID that the computer will assume in the format of hh:hh:hh:hh:hh:hh which is a 48 bit number expressed as 6 pairs of hexadecimal digits separacted by colons (:).

References i.

Member Function Documentation

◆ _peelnid()

lcc::CanAlias::_peelnid ( value  )

Peel the Node ID into bytes and initializing the 48 bit random number seed for alias generation.

◆ getMyAlias()

lcc::CanAlias::getMyAlias ( )

Return the current alias value.

Returns
The 12 bit node id alias.

◆ getMyNIDList()

lcc::CanAlias::getMyNIDList ( )

Return the NID list.

Returns
The 6 byte list containing the NID.

◆ getNextAlias()

lcc::CanAlias::getNextAlias ( )

Compute next alias.

◆ validate()

static lcc::CanAlias::validate ( object  )
static

Validate the object as a CanAlias object.

Parameters
objectA possible CanAlias object.

Member Data Documentation

◆ lfsr1

lcc::CanAlias::lfsr1

Sequence value, upper 24 bits.

◆ lfsr2

lcc::CanAlias::lfsr2

Sequence value, lower 24 bits.

◆ myalias

lcc::CanAlias::myalias

My node alias.

◆ nidlist

lcc::CanAlias::nidlist

The Node ID as a list of 6 bytes.