35#ifndef _OPENLCB_TRAININTERFACE_HXX_
36#define _OPENLCB_TRAININTERFACE_HXX_
86 virtual void set_fn(uint32_t address, uint16_t value) = 0;
89 virtual uint16_t
get_fn(uint32_t address) = 0;
Abstract base class for train implementations.
virtual void set_speed(SpeedType speed)=0
Sets the speed of the locomotive.
virtual void set_emergencystop()=0
Sets the train to emergency stop.
virtual SpeedType get_commanded_speed()
virtual void set_fn(uint32_t address, uint16_t value)=0
Sets the value of a function.
virtual bool get_emergencystop()=0
Get the current E-Stop state.
virtual uint16_t get_fn(uint32_t address)=0
virtual uint32_t legacy_address()=0
virtual SpeedType get_speed()=0
virtual SpeedType get_actual_speed()
Returns the actual speed of the locomotive, as provided by feedback from the decoder.
virtual dcc::TrainAddressType legacy_address_type()=0
This class provides a mechanism for working with velocity in different forms.
TrainAddressType
Which address type this legacy train node uses.
Velocity SpeedType
Represents an OpenLCB speed value with accessors to convert to and from various formats.