Open Model Railroad Network (OpenMRN)
Loading...
Searching...
No Matches
dcc::MMOldTrain Class Reference

TrainImpl structure for Marklin-Motorola v1 protocol locomotives. More...

#include <Loco.hxx>

Inheritance diagram for dcc::MMOldTrain:
dcc::AbstractTrain< MMOldPayload > dcc::PacketSource openlcb::TrainImpl

Public Member Functions

 MMOldTrain (MMAddress a)
 Constructor.
 
void get_next_packet (unsigned code, Packet *packet) OVERRIDE
 Generates next outgoing packet.
 
- Public Member Functions inherited from dcc::AbstractTrain< MMOldPayload >
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< MMOldPayload >
unsigned get_effective_f0 ()
 
void update_f0_direction_changed ()
 Updates the f0 states after a direction change occurred.
 
- Protected Attributes inherited from dcc::AbstractTrain< MMOldPayload >
MMOldPayload p
 Payload – actual data we know about the train.
 
- Static Protected Attributes inherited from dcc::AbstractTrain< MMOldPayload >
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".
 

Detailed Description

TrainImpl structure for Marklin-Motorola v1 protocol locomotives.

Definition at line 638 of file Loco.hxx.

Constructor & Destructor Documentation

◆ MMOldTrain()

dcc::MMOldTrain::MMOldTrain ( MMAddress  a)

Constructor.

Parameters
ais the MM address.

Definition at line 166 of file Loco.cxx.

◆ ~MMOldTrain()

dcc::MMOldTrain::~MMOldTrain ( )

Definition at line 172 of file Loco.cxx.

Member Function Documentation

◆ get_next_packet()

void dcc::MMOldTrain::get_next_packet ( unsigned  code,
Packet packet 
)
virtual

Generates next outgoing packet.

Parameters
codeis the packet code (as requested by the previous cycle or the on-update notification).
packetneeds to be filled in for the output.

Implements dcc::PacketSource.

Definition at line 178 of file Loco.cxx.


The documentation for this class was generated from the following files: