|
Open Model Railroad Network (OpenMRN)
|
Train node class with a an OpenLCB Node ID from the DCC pool. Used for command stations. More...
#include <TractionTrain.hxx>
Public Member Functions | |
| TrainNodeForProxy (TrainService *service, TrainImpl *train) | |
| Constructor. | |
| ~TrainNodeForProxy () | |
| Destructor. | |
| NodeID | node_id () OVERRIDE |
Public Member Functions inherited from openlcb::DefaultTrainNode | |
| DefaultTrainNode (TrainService *service, TrainImpl *impl) | |
| NodeHandle | get_controller () override |
| void | set_controller (NodeHandle id) override |
| If * | iface () override |
| bool | is_initialized () override |
| void | set_initialized () override |
| Callback from the node initialization flow when the node finished initialization. | |
| void | clear_initialized () override |
| Callback from the simple stack when the node has to return to uninitialized state. | |
| TrainImpl * | train () override |
Public Member Functions inherited from openlcb::TrainNodeWithConsist | |
| bool | function_policy (NodeHandle src, uint8_t command_byte, uint32_t fnum, uint16_t value, Notifiable *done) override |
| Applies a policy to function change requests coming in from the OpenLCB bus. | |
| void | command_hook (NodeHandle src, const Payload &p) override |
| Invoked for every incoming traction command targeted to this node. | |
| bool | add_consist (NodeID tgt, uint8_t flags) override |
| Adds a node ID to the consist targets. | |
| bool | remove_consist (NodeID tgt) override |
| Removes a node ID from the consist targets. | |
| NodeID | query_consist (int id, uint8_t *flags) override |
| Returns the consist target with offset id, or NodeID(0) if there are fewer than id consist targets. | |
| int | query_consist_length () override |
| Returns the number of slaves in this consist. | |
Public Member Functions inherited from openlcb::Node | |
| void | initialize () |
| Callback from the simple stack to start the initialization process. | |
Additional Inherited Members | |
Public Attributes inherited from openlcb::TrainNodeWithConsist | |
| TypedQueue< ConsistEntry > | consistSlaves_ |
Protected Attributes inherited from openlcb::DefaultTrainNode | |
| TrainService * | service_ |
| Pointer to the traction service. | |
| TrainImpl * | train_ |
| Pointer to the train implementation object. | |
Train node class with a an OpenLCB Node ID from the DCC pool. Used for command stations.
Definition at line 309 of file TractionTrain.hxx.
| openlcb::TrainNodeForProxy::TrainNodeForProxy | ( | TrainService * | service, |
| TrainImpl * | train | ||
| ) |
Constructor.
| service | the traction service object that will own this node. |
| train | the implementation object that the traction messages should be forwarded to. |
Definition at line 69 of file TractionTrain.cxx.
| openlcb::TrainNodeForProxy::~TrainNodeForProxy | ( | ) |
Destructor.
Definition at line 75 of file TractionTrain.cxx.
|
virtual |
Implements openlcb::Node.
Definition at line 97 of file TractionTrain.cxx.