◆ is_train_assigned()
| virtual bool openlcb::TractionThrottleInterface::is_train_assigned |
( |
| ) |
|
|
pure virtual |
Determine if a train is currently assigned to this trottle.
- Returns
- true if a train is assigned, else false
Implemented in openlcb::TractionThrottle.
◆ query_fn()
| virtual void openlcb::TractionThrottleInterface::query_fn |
( |
uint32_t |
fn | ) |
|
|
inlinevirtual |
◆ set_throttle_listener()
| virtual void openlcb::TractionThrottleInterface::set_throttle_listener |
( |
std::function< void(int fn)> |
update_callback | ) |
|
|
pure virtual |
Sets up a callback for listening for remote throttle updates.
When a different throttle modifies the train node's state, and the ASSIGN_TRAIN command was executed with "listen==true" parameter, we will get notifications about those remote changes. The notifications update the cached state in TractionThrottle, and call this update callback. Repeat with nullptr if the callbacks are not desired anymore.
- Parameters
-
| update_callback | will be executed when a different throttle changes the train state. fn is the function number changed, or -1 for speed update. |
Implemented in openlcb::TractionThrottle.
◆ target_node()
| virtual openlcb::NodeID openlcb::TractionThrottleInterface::target_node |
( |
| ) |
|
|
pure virtual |
◆ throttle_node()
| virtual openlcb::Node * openlcb::TractionThrottleInterface::throttle_node |
( |
| ) |
|
|
pure virtual |
◆ toggle_fn()
| virtual void openlcb::TractionThrottleInterface::toggle_fn |
( |
uint32_t |
fn | ) |
|
|
pure virtual |
The documentation for this class was generated from the following file: