public:
virtual unsigned get_protocol_speed_steps(const std::string &) const;
+ virtual const DetectedLocomotive *enumerate_detected_locos(unsigned) const { return 0; }
virtual unsigned add_loco(unsigned, const std::string &, const VehicleType &);
virtual void remove_loco(unsigned);
virtual void set_loco_speed(unsigned, unsigned);
virtual const char *enumerate_protocols(unsigned) const;
virtual unsigned get_protocol_speed_steps(const std::string &) const;
+ virtual DetectedLocomotive *enumerate_detected_locos(unsigned) const { return 0; }
virtual unsigned add_loco(unsigned, const std::string &, const VehicleType &);
virtual void remove_loco(unsigned);
virtual void set_loco_speed(unsigned, unsigned);
class Driver
{
public:
+ struct DetectedLocomotive
+ {
+ std::string protocol;
+ unsigned address;
+ std::string name;
+ };
+
sigc::signal<void, bool> signal_power;
sigc::signal<void, bool> signal_halt;
+ sigc::signal<void, const DetectedLocomotive &> signal_locomotive_detected;
+ sigc::signal<void, const DetectedLocomotive &> signal_locomotive_gone;
sigc::signal<void, unsigned, unsigned, bool> signal_loco_speed;
sigc::signal<void, unsigned, unsigned, bool> signal_loco_function;
sigc::signal<void, unsigned, unsigned> signal_turnout;
virtual const char *enumerate_protocols(unsigned) const = 0;
virtual unsigned get_protocol_speed_steps(const std::string &) const = 0;
+
+ virtual const DetectedLocomotive *enumerate_detected_locos(unsigned) const = 0;
virtual unsigned add_loco(unsigned, const std::string &, const VehicleType &) = 0;
virtual void remove_loco(unsigned) = 0;
virtual void set_loco_speed(unsigned, unsigned) = 0;
virtual const char *enumerate_protocols(unsigned) const;
virtual unsigned get_protocol_speed_steps(const std::string &) const;
+ virtual DetectedLocomotive *enumerate_detected_locos(unsigned) const { return 0; }
virtual unsigned add_loco(unsigned a, const std::string &, const VehicleType &) { return a; }
virtual void remove_loco(unsigned) { }
virtual void set_loco_speed(unsigned, unsigned);
virtual const char *enumerate_protocols(unsigned) const;
virtual unsigned get_protocol_speed_steps(const std::string &) const;
+ virtual DetectedLocomotive *enumerate_detected_locos(unsigned) const { return 0; }
virtual unsigned add_loco(unsigned, const std::string &, const VehicleType &);
virtual void remove_loco(unsigned);
virtual void set_loco_speed(unsigned, unsigned);