1 #ifndef LIBMARKLIN_LOCOMOTIVE_H_
2 #define LIBMARKLIN_LOCOMOTIVE_H_
6 #include <sigc++/signal.h>
16 sigc::signal<void, unsigned> signal_speed_changed;
18 Locomotive(Control &, unsigned);
19 void set_speed(unsigned);
20 void set_reverse(bool);
21 void set_function(unsigned, bool);
22 unsigned get_address() const { return addr; }
23 unsigned get_speed() const { return speed; }
24 bool get_reverse() const { return reverse; }
25 bool get_function(unsigned f) const { return (funcs>>f)&1; }
26 void refresh_status();
34 void send_command(bool);
35 void status_reply(Error, const std::string &);
36 bool reverse_timeout();
38 typedef std::list<Locomotive *> LocomotiveSeq;
40 } // namespace Marklin