+void ArduControl::ControlThread::set_power(bool p)
+{
+ control.power.set(p);
+
+ Tag tag;
+ tag.type = Tag::GENERAL;
+ tag.command = POWER;
+ tag.serial = control.power.serial;
+ control.completed_commands.push(tag);
+}
+
+
+ArduControl::Loader::Loader(ArduControl &c):
+ DataFile::ObjectLoader<ArduControl>(c)
+{
+ add("mfx_announce_serial", &Loader::mfx_announce_serial);
+ add("mfx_locomotive", &Loader::mfx_locomotive);
+}
+
+void ArduControl::Loader::mfx_announce_serial(unsigned s)
+{
+ obj.mfx_announce.set_serial(s);
+}
+
+void ArduControl::Loader::mfx_locomotive(unsigned id)
+{
+ MfxInfo info;
+ info.id = id;
+ info.protocol = "MFX";
+ load_sub(info);
+ obj.add_mfx_info(info);
+}
+
+
+ArduControl::MfxInfo::Loader::Loader(MfxInfo &i):
+ DataFile::ObjectLoader<MfxInfo>(i)
+{
+ add("address", static_cast<unsigned MfxInfo::*>(&MfxInfo::address));
+ add("name", static_cast<string MfxInfo::*>(&MfxInfo::name));
+}
+