Model Railroad System 2.2.2
|
CAN Header type. More...
Public Member Functions | |
CANHeader (name,...) | |
Constructor: create a 29-bit CAN header. More... | |
getHeader () | |
Generate and return the 29-bit header. More... | |
setHeader (header) | |
Decode a 29-bit CAN header. More... | |
Static Private Attributes | |
static | RESERVED_SHIFT |
Bit 28 is reserved and always 1. More... | |
static | OPENLCBFRAME_SHIFT |
Bit 27 is the OpenLCB bit: 1 == OpenLCB, 0 == other CAN. More... | |
static | OPENLCBFRAME_MASK |
Bit 27 is the OpenLCB bit: 1 == OpenLCB, 0 == other CAN. More... | |
static | VARIABLEFIELD_SHIFT |
Bits 12-26 are the variable field. More... | |
static | VARIABLEFIELD_MASK |
Bits 12-26 are the variable field. More... | |
static | SRCID_SHIFT |
Bits 0-11 are the source id. More... | |
static | SRCID_MASK |
Bits 0-11 are the source id. More... | |
CAN Header type.
Creates a 29-bit CAN header. The header is generated and decoded `‘on the fly’' from/to the supplied options:
lcc::CANHeader::CANHeader | ( | name | , |
... | |||
) |
Constructor: create a 29-bit CAN header.
Creates a CAN header object from the supplied options.
name | The name of the object. |
... | Options:
|
lcc::CANHeader::getHeader | ( | ) |
Generate and return the 29-bit header.
Creates a 29-bit header from the supplied options.
lcc::CANHeader::setHeader | ( | header | ) |
Decode a 29-bit CAN header.
The 29-bit CAN header is decoded and the various options set.
header | The 29-bit CAN header. |
|
staticprivate |
Bit 27 is the OpenLCB bit: 1 == OpenLCB, 0 == other CAN.
|
staticprivate |
Bit 27 is the OpenLCB bit: 1 == OpenLCB, 0 == other CAN.
|
staticprivate |
Bit 28 is reserved and always 1.
|
staticprivate |
Bits 0-11 are the source id.
|
staticprivate |
Bits 0-11 are the source id.
|
staticprivate |
Bits 12-26 are the variable field.
|
staticprivate |
Bits 12-26 are the variable field.