]> git.tdb.fi Git - r2c2.git/blobdiff - source/libr2c2/trackcircuit.cpp
Move driver.add_sensor call where it belongs
[r2c2.git] / source / libr2c2 / trackcircuit.cpp
index 2bdfe8b2fe4ba63666472f71a1888fac015c5d94..7efe4d094cae020a88e7e154e2ecd38f105f2b09 100644 (file)
@@ -1,13 +1,21 @@
+#include <stdexcept>
 #include "block.h"
 #include "trackcircuit.h"
 
+using namespace std;
+
 namespace R2C2 {
 
 TrackCircuit::TrackCircuit(Layout &l, Block &b):
        Sensor(l),
        block(b)
 {
-       address = block.get_sensor_id();
+       Sensor::set_address(block.get_sensor_id());
+}
+
+void TrackCircuit::set_address(unsigned)
+{
+       throw logic_error("use Track::set_sensor_id");
 }
 
 } // namespace R2C2