|
Open Model Railroad Network (OpenMRN)
|
Trivial implementation of a virtual Node. More...
#include <DefaultNode.hxx>
Public Member Functions | |
| DefaultNode (If *iface, NodeID node_id, bool init=true) | |
| Constructor. | |
| virtual | ~DefaultNode () |
| Destructor. | |
| NodeID | node_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. | |
Public Member Functions inherited from openlcb::Node | |
| void | initialize () |
| Callback from the simple stack to start the initialization process. | |
Private Attributes | |
| NodeID | nodeId_: 48 |
| 48-bit node identifier of this node. | |
| unsigned | isInitialized_: 1 |
| 1 if the node has reached initialized state. | |
| If * | iface_ |
| Interface this node is bound to. | |
Trivial implementation of a virtual Node.
Stores all dynamic information in class member variables.
Definition at line 45 of file DefaultNode.hxx.
Constructor.
| iface | network interface to be bound to |
| node_id | 48-bit OpenLCB ID of the node |
| init | true to start the initialization flow upon construction |
Definition at line 42 of file DefaultNode.cxx.
|
virtual |
Destructor.
Definition at line 52 of file DefaultNode.cxx.
|
inlinevirtual |
Callback from the simple stack when the node has to return to uninitialized state.
Implements openlcb::Node.
Definition at line 77 of file DefaultNode.hxx.
|
inlinevirtual |
Implements openlcb::Node.
Definition at line 61 of file DefaultNode.hxx.
|
inlinevirtual |
Nodes not in initialized state may not send traffic to the bus.
Implements openlcb::Node.
Definition at line 65 of file DefaultNode.hxx.
|
inlinevirtual |
Implements openlcb::Node.
Definition at line 57 of file DefaultNode.hxx.
|
inlinevirtual |
Callback from the node initialization flow when the node finished initialization.
Nodes are not required to implement if they are not using NodeInitializationFlow.
Reimplemented from openlcb::Node.
Definition at line 71 of file DefaultNode.hxx.
|
private |
Interface this node is bound to.
Definition at line 88 of file DefaultNode.hxx.
|
private |
1 if the node has reached initialized state.
Definition at line 86 of file DefaultNode.hxx.
|
private |
48-bit node identifier of this node.
Definition at line 84 of file DefaultNode.hxx.