+void Dummy::set_loco_speed(unsigned addr, unsigned speed)
+{
+ LocoState &loco = locos[addr];
+ loco.speed = speed;
+ signal_loco_speed.emit(addr, speed, loco.reverse);
+}
+
+void Dummy::set_loco_reverse(unsigned addr, bool rev)
+{
+ LocoState &loco = locos[addr];
+ loco.reverse = rev;
+ signal_loco_speed.emit(addr, loco.speed, rev);
+}
+
+void Dummy::set_loco_function(unsigned addr, unsigned func, bool state)
+{
+ signal_loco_function.emit(addr, func, state);
+}
+
+void Dummy::set_sensor(unsigned addr, bool state)
+{
+ if(sensors[addr]!=state)
+ {
+ sensors[addr] = state;
+ signal_sensor.emit(addr, state);
+ }
+}
+
+bool Dummy::get_sensor(unsigned addr) const
+{
+ map<unsigned, bool>::const_iterator i = sensors.find(addr);
+ if(i!=sensors.end())
+ return i->second;
+ return false;
+}
+