11 void Dummy::set_power(bool p)
14 signal_power.emit(power);
17 const char *Dummy::enumerate_protocols(unsigned i) const
24 unsigned Dummy::get_protocol_speed_steps(const string &) const
29 void Dummy::add_turnout(unsigned addr, const TrackType &)
34 void Dummy::set_turnout(unsigned addr, unsigned state)
36 if(turnouts[addr]!=state)
38 turnouts[addr] = state;
39 signal_turnout.emit(addr, state);
43 unsigned Dummy::get_turnout(unsigned addr) const
45 map<unsigned, unsigned>::const_iterator i = turnouts.find(addr);
51 void Dummy::set_loco_speed(unsigned addr, unsigned speed)
53 LocoState &loco = locos[addr];
55 signal_loco_speed.emit(addr, speed, loco.reverse);
58 void Dummy::set_loco_reverse(unsigned addr, bool rev)
60 LocoState &loco = locos[addr];
62 signal_loco_speed.emit(addr, loco.speed, rev);
65 void Dummy::set_loco_function(unsigned addr, unsigned func, bool state)
67 signal_loco_function.emit(addr, func, state);
70 void Dummy::set_sensor(unsigned addr, bool state)
72 if(sensors[addr]!=state)
74 sensors[addr] = state;
75 signal_sensor.emit(addr, state);
79 bool Dummy::get_sensor(unsigned addr) const
81 map<unsigned, bool>::const_iterator i = sensors.find(addr);