]> git.tdb.fi Git - r2c2.git/blobdiff - source/libr2c2/sensor.h
Don't crash if a train has no router
[r2c2.git] / source / libr2c2 / sensor.h
index f1525bf4d6a377d7e2b3fd6c1e07d462a9982ebf..24f0fff401184c471186a33b146b5bdcce78897a 100644 (file)
@@ -25,6 +25,7 @@ public:
 protected:
        Layout &layout;
        unsigned address;
+       unsigned id;
        bool invert;
        State state;
        Msp::Time::TimeDelta state_confirm_timeout;
@@ -33,6 +34,7 @@ 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; }