]> git.tdb.fi Git - r2c2.git/blobdiff - source/libmarklin/timetable.h
Make LCD output selectable at runtime through an extra I/O pin
[r2c2.git] / source / libmarklin / timetable.h
index 3abbf83149e87e256bb9852a1c146a49c833c629..b4f9cc1b2fd2972ed097926e54c31a45824101f5 100644 (file)
@@ -30,32 +30,42 @@ public:
                void arrive();
                void go_to(const std::string &);
                void route(const std::string &);
-               void speed(int);
+               void reverse();
+               void speed(unsigned);
                void travel(const std::string &);
                void wait(unsigned);
+               void wait_train(unsigned, const std::string &);
        };
 
        enum RowType
        {
                GOTO,
                TRAVEL,
-               WAIT,
+               WAIT_TIME,
+               WAIT_TRAIN,
                ARRIVE,
                SPEED,
+               REVERSE,
                ROUTE
        };
 
        struct Row
        {
                RowType type;
-               int intparam;
-               std::string strparam;
+               std::vector<Msp::Variant> params;
 
-               Row(RowType, int);
-               Row(RowType, const std::string &);
+               Row(RowType);
+
+               template<typename T>
+               Row(RowType, const T &);
+
+               template<typename T>
+               const T &get_param(unsigned) const;
 
                std::string str() const;
 
+               Msp::DataFile::Statement save() const;
+
                static Row parse(const std::string &);
        };
 
@@ -66,6 +76,7 @@ private:
        unsigned current_row;
        bool executing;
        Block *pending_block;
+       Train *pending_train;
        Msp::Time::TimeStamp wait_timeout;
 
 public: