|
Open Model Railroad Network (OpenMRN)
|
TrainImpl class for a DCC locomotive. More...
#include <Loco.hxx>
Public Member Functions | |
| DccTrain (DccShortAddress a) | |
| Constructor. | |
| DccTrain (DccLongAddress a) | |
| Constructor. | |
| void | get_next_packet (unsigned code, Packet *packet) OVERRIDE |
| Generates next outgoing packet. | |
Public Member Functions inherited from dcc::AbstractTrain< Payload > | |
| void | set_speed (SpeedType speed) OVERRIDE |
| Sets the train speed (asking for a high-priority outgoing update packet to be generated). | |
| SpeedType | get_speed () OVERRIDE |
| SpeedType | get_commanded_speed () OVERRIDE |
| void | set_emergencystop () OVERRIDE |
| Sets the train to ESTOP state, generating an emergency stop packet. | |
| bool | get_emergencystop () OVERRIDE |
| Gets the train's ESTOP state. | |
| void | set_fn (uint32_t address, uint16_t value) OVERRIDE |
| Sets a function to a given value. | |
| uint16_t | get_fn (uint32_t address) OVERRIDE |
| uint32_t | legacy_address () OVERRIDE |
| TrainAddressType | legacy_address_type () OVERRIDE |
Public Member Functions inherited from openlcb::TrainImpl | |
| virtual SpeedType | get_actual_speed () |
| Returns the actual speed of the locomotive, as provided by feedback from the decoder. | |
Additional Inherited Members | |
Protected Member Functions inherited from dcc::AbstractTrain< Payload > | |
| unsigned | get_effective_f0 () |
| void | update_f0_direction_changed () |
| Updates the f0 states after a direction change occurred. | |
Protected Attributes inherited from dcc::AbstractTrain< Payload > | |
| Payload | p |
| Payload – actual data we know about the train. | |
Static Protected Attributes inherited from dcc::AbstractTrain< Payload > | |
| static constexpr unsigned | VIRTF0_DIRECTIONAL_ENABLE |
| Function number of "enable directional F0". | |
| static constexpr unsigned | VIRTF0_BLANK_FWD |
| Function number of "Blank F0 Forward". | |
| static constexpr unsigned | VIRTF0_BLANK_REV |
| Function number of "Blank F0 Reverse". | |
TrainImpl class for a DCC locomotive.
|
inline |
|
inline |
| dcc::DccTrain< Dcc28Payload >::~DccTrain | ( | ) |
| dcc::DccTrain< Dcc128Payload >::~DccTrain | ( | ) |
|
virtual |
Generates next outgoing packet.
| code | is the packet code (as requested by the previous cycle or the on-update notification). |
| packet | needs to be filled in for the output. |
Implements dcc::PacketSource.