]> git.tdb.fi Git - r2c2.git/blobdiff - source/libmarklin/train.h
Don't clear timetable before all rows are successfully parsed
[r2c2.git] / source / libmarklin / train.h
index 5960c27d16b78164da022a40e0c79e7529647244..ccfcbec1058f0dd6c12ab5409ad66415e4c27298 100644 (file)
@@ -38,6 +38,7 @@ public:
                void real_speed(unsigned, float, float);
                void route(const std::string &);
                void timetable();
+               void vehicle(unsigned);
        };
 
        sigc::signal<void, const std::string &> signal_name_changed;
@@ -70,6 +71,7 @@ private:
        const LocoType &loco_type;
        unsigned address;
        std::string name;
+       int priority;
        std::vector<Vehicle *> vehicles;
        std::list<BlockRef> cur_blocks;
        std::list<BlockRef> rsv_blocks;
@@ -91,6 +93,8 @@ private:
        float travel_dist;
        bool pure_speed;
        std::vector<RealSpeed> real_speed;
+       bool accurate_position;
+       float overshoot_dist;
 
 public:
        Train(Layout &, const LocoType &, unsigned);
@@ -101,6 +105,8 @@ public:
        unsigned get_address() const { return address; }
        void set_name(const std::string &);
        const std::string &get_name() const { return name; }
+       void set_priority(int);
+       int get_priority() const { return priority; }
        ControlModel &get_control() const { return *control; }
 
        Vehicle &get_vehicle(unsigned);
@@ -114,6 +120,9 @@ public:
        bool get_function(unsigned) const;
        unsigned get_functions() const { return functions; }
 
+       void set_timetable(Timetable *);
+       Timetable *get_timetable() { return timetable; }
+
        void set_route(const Route *);
        void go_to(const Track &);
        const Route *get_route() const { return route; }
@@ -133,6 +142,7 @@ private:
        void loco_func_event(unsigned, unsigned, bool);
        void sensor_event(unsigned, bool);
        void turnout_event(unsigned, bool);
+       void halt_event(bool);
        void block_reserved(const Block &, const Train *);
        unsigned reserve_more();
        float get_real_speed(unsigned) const;