]> git.tdb.fi Git - r2c2.git/blobdiff - source/libr2c2/sensor.h
Use beam gates for positioning vehicles
[r2c2.git] / source / libr2c2 / sensor.h
index 849f899a9687d1be8d3e6a3f12992753917e8c08..13aaca3fe8e9a060e94db659372ecfc3433cf13e 100644 (file)
@@ -6,6 +6,7 @@
 
 namespace R2C2 {
 
+class Block;
 class Layout;
 
 class Sensor: public sigc::trackable
@@ -24,6 +25,7 @@ public:
 protected:
        Layout &layout;
        unsigned address;
+       bool invert;
        State state;
        Msp::Time::TimeDelta state_confirm_timeout;
 
@@ -31,8 +33,10 @@ protected:
 public:
        virtual ~Sensor();
 
+       virtual void set_address(unsigned);
        unsigned get_address() const { return address; }
        State get_state() const { return state; }
+       virtual Block *get_block() const { return 0; }
 
        void tick(const Msp::Time::TimeDelta &);