X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Flibmarklin%2Ftrain.h;h=ccfcbec1058f0dd6c12ab5409ad66415e4c27298;hb=e2ecc5a6e8e8056cd09599e60140498f322b87b6;hp=635a9466b9c1cab90625dc0eef8287ec42ebefdc;hpb=6968273080fa2a1cbcfc506610d5f249299611e9;p=r2c2.git diff --git a/source/libmarklin/train.h b/source/libmarklin/train.h index 635a946..ccfcbec 100644 --- a/source/libmarklin/train.h +++ b/source/libmarklin/train.h @@ -71,6 +71,7 @@ private: const LocoType &loco_type; unsigned address; std::string name; + int priority; std::vector vehicles; std::list cur_blocks; std::list rsv_blocks; @@ -92,6 +93,8 @@ private: float travel_dist; bool pure_speed; std::vector real_speed; + bool accurate_position; + float overshoot_dist; public: Train(Layout &, const LocoType &, unsigned); @@ -102,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); @@ -115,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; } @@ -134,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;