]> git.tdb.fi Git - r2c2.git/blobdiff - source/libmarklin/intellibox.h
Reserve two ids for double-address turnouts
[r2c2.git] / source / libmarklin / intellibox.h
index a6b7cda966a50141026af672311b3ab07936e1b3..c5c7e7af031e4761bd9fbc2fd1dbaef8853167e4 100644 (file)
@@ -98,6 +98,7 @@ private:
 
        int serial_fd;
        bool power;
+       bool halted;
        std::map<unsigned, Locomotive> locos;
        std::map<unsigned, Turnout> turnouts;
        std::map<unsigned, Sensor> sensors;
@@ -111,6 +112,8 @@ public:
 
        virtual void set_power(bool);
        virtual bool get_power() const { return power; }
+       virtual void halt(bool);
+       virtual bool is_halted() const { return halted; }
 
        virtual void add_loco(unsigned);
        virtual void set_loco_speed(unsigned, unsigned);
@@ -136,6 +139,8 @@ private:
        void turnout_command(unsigned, bool, bool);
        void process_reply(const Msp::Time::TimeStamp &);
        unsigned read_all(unsigned char *, unsigned);
+       unsigned read_status(Error *);
+       void error(Command, Error);
 };
 
 } // namespace Marklin