signal_power.emit(power);
}
+const char *Dummy::enumerate_protocols(unsigned i) const
+{
+ if(i==0)
+ return "dummy";
+ return 0;
+}
+
+unsigned Dummy::get_protocol_speed_steps(const string &) const
+{
+ return 0;
+}
+
void Dummy::add_turnout(unsigned addr)
{
turnouts[addr];
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;
+}
+
} // namespace Marklin