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