Initialization of 30 components changed, done in Initialize( ).

This commit is contained in:
Milan Hanajik
2021-04-03 00:54:27 +02:00
parent cb1a66381f
commit a58fe1f997
30 changed files with 347 additions and 445 deletions
+13 -10
View File
@@ -26,9 +26,8 @@ namespace TBF.Rig.Modbus.QuidoRS
UInt32 watchdogBitMask;
public QuidoRS()
{
}
public QuidoRS() { }
public QuidoRS(Generic.IComponentCfg cfg, IList<Generic.IComponent> components)
: base(cfg)
@@ -38,18 +37,17 @@ namespace TBF.Rig.Modbus.QuidoRS
modbus = (GenericDevices.IModbus)TbfComponents.FindComponent(cfg.ParentName, components);
if (modbus == null) throw new Exception("Cannot find " + Name + " parent");
watchdogBitMask = (ushort)(quidoRSCfg.WatchdogEnabled ? (1 << quidoRSCfg.WatchdogBitNr) : 0);
log.Warn(this.ToString());
}
public override void Initialize()
{
watchdogBitMask = (ushort)(quidoRSCfg.WatchdogEnabled ? (1 << quidoRSCfg.WatchdogBitNr) : 0);
}
///
/// IDevice interface
///
public void Initialize() { }
/// <summary>
/// Run this device
/// </summary>
public void RunDeviceBefore()
{
if (quidoRSCfg.DebugLevel == Config.Entities.DebugMode.Simulate) return;
@@ -78,8 +76,13 @@ namespace TBF.Rig.Modbus.QuidoRS
}
}
}
public void RunDeviceAfter() { }
public void StopDevice() { SendOutputs(0); }
public void StopDevice()
{
SendOutputs(0);
}
public void StopDevice2() { }