1#ifndef _UTILS_MOCKTRAIN_HXX_
2#define _UTILS_MOCKTRAIN_HXX_
4#include "gmock/gmock.h"
23 MOCK_METHOD2(
set_fn,
void(uint32_t address, uint16_t value));
24 MOCK_METHOD1(
get_fn, uint16_t(uint32_t address));
Test helper class for TrainImpl using GoogleMock.
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.