]> git.tdb.fi Git - r2c2.git/blobdiff - source/libmarklin/sensor.h
Major code refactoring:
[r2c2.git] / source / libmarklin / sensor.h
index e5e1b43eea2dde6be8ebb2e295c7e71ad00c889f..d3db6367a2b7b40ed9d0a232906c2f23561b4513 100644 (file)
@@ -3,7 +3,8 @@
 
 #include <list>
 #include <map>
-#include <sigc++/sigc++.h>
+#include <sigc++/signal.h>
+#include <msp/time/timestamp.h>
 
 namespace Marklin {
 
@@ -17,15 +18,15 @@ public:
        Sensor(Control &, unsigned);
        unsigned get_address() const { return addr; }
        bool     get_state() const   { return state; }
+       void     tick();
 private:
        Control  &control;
        unsigned addr;
        bool     state;
+       Msp::Time::TimeStamp off_timeout;
 
        void sensor_event(unsigned, bool);
 };
-typedef std::list<Sensor *> SensorSeq;
-typedef std::map<unsigned, Sensor *> SensorMap;
 
 } // namespace Marklin