3 This file is part of the MSP Märklin suite
4 Copyright © 2010 Mikkosoft Productions, Mikko Rasa
5 Distributed under the GPL
8 #ifndef LIBMARKLIN_DUMMY_H_
9 #define LIBMARKLIN_DUMMY_H_
16 class Dummy: public Driver
26 std::map<unsigned, bool> turnouts;
27 std::map<unsigned, LocoState> locos;
28 std::map<unsigned, bool> sensors;
33 virtual void set_power(bool);
34 virtual bool get_power() const { return power; }
35 virtual void halt(bool) { }
36 virtual bool is_halted() const { return false; }
38 virtual const char *enumerate_protocols(unsigned) const;
39 virtual unsigned get_protocol_speed_steps(const std::string &) const;
40 virtual void add_loco(unsigned, const std::string &) { }
41 virtual void set_loco_speed(unsigned, unsigned);
42 virtual void set_loco_reverse(unsigned, bool);
43 virtual void set_loco_function(unsigned, unsigned, bool);
45 virtual void add_turnout(unsigned);
46 virtual void set_turnout(unsigned, bool);
47 virtual bool get_turnout(unsigned) const;
49 virtual void add_sensor(unsigned) { }
50 virtual void set_sensor(unsigned, bool);
51 virtual bool get_sensor(unsigned) const;
53 virtual void tick() { }
54 virtual void flush() { }
57 } // namespace Marklin