1 #ifndef LIBMARKLIN_LOCOMOTIVE_H_
2 #define LIBMARKLIN_LOCOMOTIVE_H_
15 Locomotive(Control &, unsigned);
16 void set_speed(unsigned);
17 void set_reverse(bool);
18 void set_function(unsigned, bool);
19 unsigned get_address() const { return addr; }
20 unsigned get_speed() const { return speed; }
21 bool get_reverse() const { return reverse; }
22 bool get_function(unsigned f) const { return (funcs>>f)&1; }
23 void refresh_status();
31 void send_command(bool);
32 void status_reply(Error, const std::string &);
33 bool reverse_timeout();
35 typedef std::list<Locomotive *> LocomotiveSeq;
37 } // namespace Marklin