]> git.tdb.fi Git - r2c2.git/blobdiff - source/libmarklin/train.h
Make LCD output selectable at runtime through an extra I/O pin
[r2c2.git] / source / libmarklin / train.h
index 5f852564074f37b5247c29f0e04a8974e569341f..a13c422a9d8c2d35f989d2704e11447152d908f5 100644 (file)
@@ -75,6 +75,7 @@ private:
        Layout &layout;
        const VehicleType &loco_type;
        unsigned address;
+       std::string protocol;
        std::string name;
        int priority;
        const Train *yielding_to;
@@ -88,7 +89,7 @@ private:
        Controller *controller;
        Timetable *timetable;
        bool active;
-       unsigned current_speed;
+       unsigned current_speed_step;
        bool speed_changing;
        bool reverse;
        Msp::Time::TimeStamp stop_timeout;
@@ -105,12 +106,13 @@ private:
        float overshoot_dist;
 
 public:
-       Train(Layout &, const VehicleType &, unsigned);
+       Train(Layout &, const VehicleType &, unsigned, const std::string &);
        ~Train();
 
        Layout &get_layout() const { return layout; }
        const VehicleType &get_locomotive_type() const { return loco_type; }
        unsigned get_address() const { return address; }
+       const std::string &get_protocol() const { return protocol; }
        void set_name(const std::string &);
        const std::string &get_name() const { return name; }
        void set_priority(int);
@@ -165,7 +167,7 @@ private:
        void check_turnout_paths(bool);
        float get_reserved_distance_until(const Block *, bool) const;
        float get_real_speed(unsigned) const;
-       unsigned find_speed(float) const;
+       unsigned find_speed_step(float) const;
        float get_travel_speed() const;
        void set_status(const std::string &);
        void release_blocks();