]> git.tdb.fi Git - r2c2.git/blobdiff - source/libmarklin/dummy.h
Add a set_sensor function to the Driver interface
[r2c2.git] / source / libmarklin / dummy.h
index dab38ec157ea1b5cb7b2ad8518bef52d81efe3dc..3004c8bd1a8f768841bb42bb3df53db757726b3e 100644 (file)
@@ -25,6 +25,7 @@ private:
        bool power;
        std::map<unsigned, bool> turnouts;
        std::map<unsigned, LocoState> locos;
+       std::map<unsigned, bool> sensors;
 
 public:
        Dummy();
@@ -42,7 +43,8 @@ public:
        virtual bool get_turnout(unsigned) const;
 
        virtual void add_sensor(unsigned) { }
-       virtual bool get_sensor(unsigned) const { return false; }
+       virtual void set_sensor(unsigned, bool);
+       virtual bool get_sensor(unsigned) const;
 
        virtual void tick() { }
        virtual void flush() { }