1 #ifndef LIBMARKLIN_LOCOMOTIVE_H_
2 #define LIBMARKLIN_LOCOMOTIVE_H_
6 #include <sigc++/signal.h>
25 sigc::signal<void, unsigned> signal_speed_changed;
26 sigc::signal<void, unsigned, bool> signal_function_changed;
28 Locomotive(const LocoType &, Control &, unsigned);
30 const LocoType &get_type() const { return type; }
31 void set_speed(unsigned);
32 void set_reverse(bool);
33 void set_function(unsigned, bool);
34 unsigned get_address() const { return addr; }
35 unsigned get_speed() const { return speed; }
36 bool get_reverse() const { return reverse; }
37 bool get_function(unsigned f) const { return (funcs>>f)&1; }
38 void refresh_status();
40 void send_command(bool);
41 void status_reply(Error, const std::string &);
42 bool reverse_timeout();
45 } // namespace Marklin