X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Flibr2c2%2Ftrain.h;h=3c4176d3e3cf6de5fe816e484b51205546a359bb;hb=42a5c6606e82b1a27cb6d4d7afa630c75c869f97;hp=3aaf6b14137cf8401489c39918fbba135107a011;hpb=ab64a17394440c3cb18d0b30d75fb4ed6297a6b4;p=r2c2.git diff --git a/source/libr2c2/train.h b/source/libr2c2/train.h index 3aaf6b1..3c4176d 100644 --- a/source/libr2c2/train.h +++ b/source/libr2c2/train.h @@ -35,6 +35,7 @@ public: void name(const std::string &); void quantized_speed(); void router(); + void timetable(); void vehicle(ArticleNumber); }; @@ -51,6 +52,7 @@ private: const VehicleType &loco_type; unsigned address; std::string protocol; + unsigned loco_id; std::string name; const Train *preceding_train; std::vector vehicles; @@ -96,6 +98,7 @@ public: float get_speed() const; float get_quantized_speed() const; unsigned get_speed_step() const { return current_speed_step; } + float get_maximum_speed() const; bool get_function(unsigned) const; unsigned get_functions() const { return functions; } @@ -112,7 +115,7 @@ public: return 0; } - void place(const BlockIter &); + bool place(const BlockIter &); void unplace(); bool is_placed() const { return !allocator.empty(); } void stop_at(Block *); @@ -129,7 +132,7 @@ private: void control_changed(const Controller::Control &); void loco_speed_event(unsigned, unsigned, bool); void loco_func_event(unsigned, unsigned, bool); - void sensor_state_changed(Sensor &, Sensor::State); + void advanced(Block &, Sensor *); void halt_event(bool); void block_reserved(const Block &, const Train *); float get_reserved_distance_until(const Block *) const;