|
Open Model Railroad Network (OpenMRN)
|
Abstract class that is a packet source but not a TrainImpl. More...
#include <PacketSource.hxx>
Private Member Functions | |
| void | set_speed (SpeedType speed) override |
| Sets the speed of the locomotive. | |
| SpeedType | get_speed () override |
| void | set_emergencystop () override |
| Sets the train to emergency stop. | |
| bool | get_emergencystop () override |
| Get the current E-Stop state. | |
| void | set_fn (uint32_t address, uint16_t value) override |
| Sets the value of a function. | |
| uint16_t | get_fn (uint32_t address) override |
| uint32_t | legacy_address () override |
| dcc::TrainAddressType | legacy_address_type () override |
Additional Inherited Members | |
Public Member Functions inherited from dcc::PacketSource | |
| virtual void | get_next_packet (unsigned code, Packet *packet)=0 |
| Generates the next packet to send out to the track. | |
Public Member Functions inherited from openlcb::TrainImpl | |
| virtual SpeedType | get_commanded_speed () |
| virtual SpeedType | get_actual_speed () |
| Returns the actual speed of the locomotive, as provided by feedback from the decoder. | |
Abstract class that is a packet source but not a TrainImpl.
Provides dummy implementations for the TrainImpl interface virtual functions.
Definition at line 63 of file PacketSource.hxx.
|
inlineoverrideprivatevirtual |
Get the current E-Stop state.
Implements openlcb::TrainImpl.
Definition at line 76 of file PacketSource.hxx.
|
inlineoverrideprivatevirtual |
Implements openlcb::TrainImpl.
Definition at line 83 of file PacketSource.hxx.
|
inlineoverrideprivatevirtual |
Implements openlcb::TrainImpl.
Definition at line 69 of file PacketSource.hxx.
|
inlineoverrideprivatevirtual |
Implements openlcb::TrainImpl.
Definition at line 87 of file PacketSource.hxx.
|
inlineoverrideprivatevirtual |
Implements openlcb::TrainImpl.
Definition at line 91 of file PacketSource.hxx.
|
inlineoverrideprivatevirtual |
Sets the train to emergency stop.
Implements openlcb::TrainImpl.
Definition at line 73 of file PacketSource.hxx.
|
inlineoverrideprivatevirtual |
Sets the value of a function.
| address | is a 24-bit address of the function to set. For legacy DCC locomotives, see TractionDefs for the address definitions (0=light, 1-28= traditional function buttons). |
| value | is the function value. For binary functions, any non-zero value sets the function to on, zero sets it to off. |
Implements openlcb::TrainImpl.
Definition at line 80 of file PacketSource.hxx.
|
inlineoverrideprivatevirtual |
Sets the speed of the locomotive.
| speed | is the requested scale speed in m/s. The sign of the number means the direction. |
Implements openlcb::TrainImpl.
Definition at line 66 of file PacketSource.hxx.