]> git.tdb.fi Git - r2c2.git/blobdiff - source/libmarklin/train.h
Implement train priority system
[r2c2.git] / source / libmarklin / train.h
index 866454164ee1592b9cb794f8413cc9509c3571a5..8087745f3dd29f03b9d3b3bfb4eec75859c246e8 100644 (file)
@@ -71,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;
@@ -104,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);
@@ -136,6 +139,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;