Initialization( ) changed, is abstract in ComponentBase, builds OK.
This commit is contained in:
@@ -85,7 +85,7 @@ namespace TBF.Rig.Ambient.Greco
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
|
||||
public override void Initialize()
|
||||
public override void Initialize()
|
||||
{
|
||||
temperature = DefaultTemperature;
|
||||
pressure = DefaultPressure;
|
||||
|
||||
@@ -47,5 +47,7 @@ namespace TBF.Rig.BuiltIn.Pump
|
||||
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
|
||||
public override void Initialize() { }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -63,6 +63,8 @@ namespace TBF.Rig.BuiltIn.Valve
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
|
||||
public override void Initialize() { }
|
||||
|
||||
#region Configuration Change Handling
|
||||
|
||||
public static void OnCfgChange(object sender, CfgChangeArgs args)
|
||||
|
||||
@@ -7,16 +7,15 @@ using TBF.Rig.GenericDevices;
|
||||
|
||||
namespace TBF.Rig.BuiltIn
|
||||
{
|
||||
public class ValveBase : ComponentBase
|
||||
public abstract class ValveBase : ComponentBase
|
||||
{
|
||||
public ValveBase()
|
||||
{
|
||||
}
|
||||
public ValveBase() { }
|
||||
|
||||
/// <summary>
|
||||
/// Invokes ComponentBase constructor
|
||||
/// </summary>
|
||||
public ValveBase(Generic.IComponentCfg cfg) : base(cfg)
|
||||
public ValveBase(Generic.IComponentCfg cfg)
|
||||
: base(cfg)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -47,6 +47,8 @@ namespace TBF.Rig.BuiltIn.ValveEx
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
|
||||
public override void Initialize() { }
|
||||
|
||||
|
||||
public void UpdateRoute(ref UInt128 route)
|
||||
{
|
||||
|
||||
@@ -8,18 +8,18 @@ using TBF.Rig.Generic;
|
||||
|
||||
namespace TBF.Rig
|
||||
{
|
||||
public class ComponentBase : IComponent
|
||||
public abstract class ComponentBase : IComponent
|
||||
{
|
||||
readonly Generic.IComponentCfg cfg;
|
||||
public Generic.IComponentCfg Cfg { get { return cfg; } }
|
||||
|
||||
public string Name { get { return cfg.Name; } }
|
||||
public string ClassName { get { return cfg.Factory.ClassName; } }
|
||||
public string ParentName { get { return cfg.ParentName; } }
|
||||
public Generic.IComponentFactory Factory { get { return cfg.Factory; } }
|
||||
public int ItemNr { get { return cfg.ItemNr; } }
|
||||
public DebugMode DebugLevel { get { return cfg.DebugLevel; } set { cfg.DebugLevel = value; } }
|
||||
public LogLevel LogLevel { get { return cfg.LogLevel; } }
|
||||
public string Name { get { return cfg.Name; } }
|
||||
public string ClassName { get { return cfg.Factory.ClassName; } }
|
||||
public string ParentName { get { return cfg.ParentName; } }
|
||||
public IComponentFactory Factory { get { return cfg.Factory; } }
|
||||
public int ItemNr { get { return cfg.ItemNr; } }
|
||||
public DebugMode DebugLevel { get { return cfg.DebugLevel; } set { cfg.DebugLevel = value; } }
|
||||
public LogLevel LogLevel { get { return cfg.LogLevel; } }
|
||||
|
||||
public IList<MeasurementCorrection> Corrections
|
||||
{
|
||||
@@ -49,8 +49,7 @@ namespace TBF.Rig
|
||||
this.cfg = cfg;
|
||||
}
|
||||
|
||||
/// <summary> Empty implementation, might be overriden in derived classes </summary>
|
||||
public virtual void Initialize() { }
|
||||
public abstract void Initialize();
|
||||
|
||||
/// <summary> Empty implementation, might be overriden in derived classes </summary>
|
||||
public virtual void StartChangeHandler() { }
|
||||
|
||||
@@ -35,6 +35,8 @@ namespace TBF.Rig.DataContainer.Evaporation
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
|
||||
public override void Initialize() { }
|
||||
|
||||
|
||||
public IList<Config.CalendarEvent.ICalendarEvent> GetCalendarEvents()
|
||||
{
|
||||
|
||||
@@ -60,25 +60,26 @@ namespace TBF.Rig.DataEntry.Combined
|
||||
CurrentOp currentOp;
|
||||
|
||||
|
||||
public EntryForm()
|
||||
{
|
||||
}
|
||||
public EntryForm() { }
|
||||
|
||||
public EntryForm(Generic.IComponentCfg cfg)
|
||||
: base(cfg)
|
||||
{
|
||||
entryFormCfg = cfg as EntryFormCfg;
|
||||
|
||||
disabled = new bool[Config.Data.CompoundWMsCount];
|
||||
wmStartState = new double[Config.Data.CompoundWMsCount * 2];
|
||||
wmStartStateStr = new string[Config.Data.CompoundWMsCount * 2];
|
||||
wmEndState = new double[Config.Data.CompoundWMsCount * 2];
|
||||
wmCycleEndState = new string[Config.Data.CompoundWMsCount * 2];
|
||||
|
||||
currentOp = CurrentOp.None;
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
disabled = new bool[Config.Data.CompoundWMsCount];
|
||||
wmStartState = new double[Config.Data.CompoundWMsCount * 2];
|
||||
wmStartStateStr = new string[Config.Data.CompoundWMsCount * 2];
|
||||
wmEndState = new double[Config.Data.CompoundWMsCount * 2];
|
||||
wmCycleEndState = new string[Config.Data.CompoundWMsCount * 2];
|
||||
currentOp = CurrentOp.None;
|
||||
}
|
||||
|
||||
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation ShowCycleBeginFormOp()
|
||||
{
|
||||
|
||||
@@ -60,25 +60,26 @@ namespace TBF.Rig.DataEntry.Fewa
|
||||
CurrentOp currentOp;
|
||||
|
||||
|
||||
public EntryFormNoStartEnd()
|
||||
{
|
||||
}
|
||||
public EntryFormNoStartEnd() { }
|
||||
|
||||
public EntryFormNoStartEnd(Generic.IComponentCfg cfg)
|
||||
: base(cfg)
|
||||
{
|
||||
entryFormCfg = cfg as EntryFormCfg;
|
||||
|
||||
disabled = new bool[Config.Data.WMsCount];
|
||||
wmStartState = new double[Config.Data.WMsCount];
|
||||
wmStartStateStr = new string[Config.Data.WMsCount];
|
||||
wmEndState = new double[Config.Data.WMsCount];
|
||||
wmCycleEndState = new string[Config.Data.WMsCount];
|
||||
|
||||
currentOp = CurrentOp.None;
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
disabled = new bool[Config.Data.WMsCount];
|
||||
wmStartState = new double[Config.Data.WMsCount];
|
||||
wmStartStateStr = new string[Config.Data.WMsCount];
|
||||
wmEndState = new double[Config.Data.WMsCount];
|
||||
wmCycleEndState = new string[Config.Data.WMsCount];
|
||||
currentOp = CurrentOp.None;
|
||||
}
|
||||
|
||||
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation ShowCycleBeginFormOp()
|
||||
{
|
||||
|
||||
@@ -75,28 +75,29 @@ namespace TBF.Rig.DataEntry.HeatMeters12
|
||||
CurrentOp currentOp;
|
||||
|
||||
|
||||
public EntryForm()
|
||||
{
|
||||
}
|
||||
public EntryForm() { }
|
||||
|
||||
public EntryForm(Generic.IComponentCfg cfg)
|
||||
: base(cfg)
|
||||
{
|
||||
entryFormCfg = cfg as EntryFormCfg;
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
disabled = new bool[Config.Data.HeatMetersCount];
|
||||
wmStartState = new double[Config.Data.HeatMetersCount];
|
||||
wmStartState = new double[Config.Data.HeatMetersCount];
|
||||
wmStartStateStr = new string[Config.Data.HeatMetersCount];
|
||||
wmEndState = new double[Config.Data.HeatMetersCount];
|
||||
wmEndState = new double[Config.Data.HeatMetersCount];
|
||||
energyStartState = new double[Config.Data.HeatMetersCount];
|
||||
energyStartStateStr = new string[Config.Data.HeatMetersCount];
|
||||
energyEndState = new double[Config.Data.HeatMetersCount];
|
||||
wmCycleEndState = new string[Config.Data.HeatMetersCount];
|
||||
|
||||
currentOp = CurrentOp.None;
|
||||
log.Warn(this.ToString());
|
||||
currentOp = CurrentOp.None;
|
||||
}
|
||||
|
||||
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation ShowCycleBeginFormOp()
|
||||
{
|
||||
|
||||
@@ -75,26 +75,26 @@ namespace TBF.Rig.DataEntry.HeatMeters6
|
||||
CurrentOp currentOp;
|
||||
|
||||
|
||||
public EntryForm()
|
||||
{
|
||||
}
|
||||
public EntryForm() { }
|
||||
|
||||
public EntryForm(Generic.IComponentCfg cfg)
|
||||
: base(cfg)
|
||||
{
|
||||
entryFormCfg = cfg as EntryFormCfg;
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
disabled = new bool[Config.Data.HeatMetersCount];
|
||||
wmStartState = new double[Config.Data.HeatMetersCount];
|
||||
wmStartState = new double[Config.Data.HeatMetersCount];
|
||||
wmStartStateStr = new string[Config.Data.HeatMetersCount];
|
||||
wmEndState = new double[Config.Data.HeatMetersCount];
|
||||
wmEndState = new double[Config.Data.HeatMetersCount];
|
||||
energyStartState = new double[Config.Data.HeatMetersCount];
|
||||
energyStartStateStr = new string[Config.Data.HeatMetersCount];
|
||||
energyEndState = new double[Config.Data.HeatMetersCount];
|
||||
wmCycleEndState = new string[Config.Data.HeatMetersCount];
|
||||
|
||||
currentOp = CurrentOp.None;
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
|
||||
/// <returns>Reference to the operation</returns>
|
||||
|
||||
@@ -60,25 +60,26 @@ namespace TBF.Rig.DataEntry.Single
|
||||
CurrentOp currentOp;
|
||||
|
||||
|
||||
public EntryFormNoStartEnd()
|
||||
{
|
||||
}
|
||||
public EntryFormNoStartEnd() { }
|
||||
|
||||
public EntryFormNoStartEnd(Generic.IComponentCfg cfg)
|
||||
: base(cfg)
|
||||
{
|
||||
entryFormCfg = cfg as EntryFormCfg;
|
||||
|
||||
disabled = new bool[Config.Data.WMsCount];
|
||||
wmStartState = new double[Config.Data.WMsCount];
|
||||
wmStartStateStr = new string[Config.Data.WMsCount];
|
||||
wmEndState = new double[Config.Data.WMsCount];
|
||||
wmCycleEndState = new string[Config.Data.WMsCount];
|
||||
|
||||
currentOp = CurrentOp.None;
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
disabled = new bool[Config.Data.WMsCount];
|
||||
wmStartState = new double[Config.Data.WMsCount];
|
||||
wmStartStateStr = new string[Config.Data.WMsCount];
|
||||
wmEndState = new double[Config.Data.WMsCount];
|
||||
wmCycleEndState = new string[Config.Data.WMsCount];
|
||||
currentOp = CurrentOp.None;
|
||||
}
|
||||
|
||||
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation ShowCycleBeginFormOp()
|
||||
{
|
||||
|
||||
@@ -60,25 +60,26 @@ namespace TBF.Rig.DataEntry.Standard12
|
||||
CurrentOp currentOp;
|
||||
|
||||
|
||||
public EntryFormNoStartEnd()
|
||||
{
|
||||
}
|
||||
public EntryFormNoStartEnd() { }
|
||||
|
||||
public EntryFormNoStartEnd(Generic.IComponentCfg cfg)
|
||||
: base(cfg)
|
||||
{
|
||||
entryFormCfg = cfg as EntryFormCfg;
|
||||
|
||||
disabled = new bool[Config.Data.WMsCount];
|
||||
wmStartState = new double[Config.Data.WMsCount];
|
||||
wmStartStateStr = new string[Config.Data.WMsCount];
|
||||
wmEndState = new double[Config.Data.WMsCount];
|
||||
wmCycleEndState = new string[Config.Data.WMsCount];
|
||||
|
||||
currentOp = CurrentOp.None;
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
disabled = new bool[Config.Data.WMsCount];
|
||||
wmStartState = new double[Config.Data.WMsCount];
|
||||
wmStartStateStr = new string[Config.Data.WMsCount];
|
||||
wmEndState = new double[Config.Data.WMsCount];
|
||||
wmCycleEndState = new string[Config.Data.WMsCount];
|
||||
currentOp = CurrentOp.None;
|
||||
}
|
||||
|
||||
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation ShowCycleBeginFormOp()
|
||||
{
|
||||
|
||||
@@ -60,25 +60,26 @@ namespace TBF.Rig.DataEntry.Standard24
|
||||
CurrentOp currentOp;
|
||||
|
||||
|
||||
public EntryFormNoStartEnd()
|
||||
{
|
||||
}
|
||||
public EntryFormNoStartEnd() { }
|
||||
|
||||
public EntryFormNoStartEnd(Generic.IComponentCfg cfg)
|
||||
: base(cfg)
|
||||
{
|
||||
entryFormCfg = cfg as EntryFormCfg;
|
||||
|
||||
disabled = new bool[Config.Data.WMsCount];
|
||||
wmStartState = new double[Config.Data.WMsCount];
|
||||
wmStartStateStr = new string[Config.Data.WMsCount];
|
||||
wmEndState = new double[Config.Data.WMsCount];
|
||||
wmEndStateStr = new string[Config.Data.WMsCount];
|
||||
|
||||
currentOp = CurrentOp.None;
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
disabled = new bool[Config.Data.WMsCount];
|
||||
wmStartState = new double[Config.Data.WMsCount];
|
||||
wmStartStateStr = new string[Config.Data.WMsCount];
|
||||
wmEndState = new double[Config.Data.WMsCount];
|
||||
wmEndStateStr = new string[Config.Data.WMsCount];
|
||||
currentOp = CurrentOp.None;
|
||||
}
|
||||
|
||||
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation ShowCycleBeginFormOp()
|
||||
{
|
||||
|
||||
@@ -60,25 +60,26 @@ namespace TBF.Rig.DataEntry.Standard48
|
||||
CurrentOp currentOp;
|
||||
|
||||
|
||||
public EntryFormNoStartEnd()
|
||||
{
|
||||
}
|
||||
public EntryFormNoStartEnd() { }
|
||||
|
||||
public EntryFormNoStartEnd(Generic.IComponentCfg cfg)
|
||||
: base(cfg)
|
||||
{
|
||||
entryFormCfg = cfg as EntryFormCfg;
|
||||
|
||||
disabled = new bool[Config.Data.WMsCount];
|
||||
wmStartState = new double[Config.Data.WMsCount];
|
||||
wmStartStateStr = new string[Config.Data.WMsCount];
|
||||
wmEndState = new double[Config.Data.WMsCount];
|
||||
wmCycleEndState = new string[Config.Data.WMsCount];
|
||||
|
||||
currentOp = CurrentOp.None;
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
disabled = new bool[Config.Data.WMsCount];
|
||||
wmStartState = new double[Config.Data.WMsCount];
|
||||
wmStartStateStr = new string[Config.Data.WMsCount];
|
||||
wmEndState = new double[Config.Data.WMsCount];
|
||||
wmCycleEndState = new string[Config.Data.WMsCount];
|
||||
currentOp = CurrentOp.None;
|
||||
}
|
||||
|
||||
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation ShowCycleBeginFormOp()
|
||||
{
|
||||
|
||||
@@ -57,24 +57,25 @@ namespace TBF.Rig.DataEntry.Standard6
|
||||
CurrentOp currentOp;
|
||||
|
||||
|
||||
public EntryFormNoStartEnd()
|
||||
{
|
||||
}
|
||||
public EntryFormNoStartEnd() { }
|
||||
|
||||
public EntryFormNoStartEnd(Generic.IComponentCfg cfg)
|
||||
: base(cfg)
|
||||
{
|
||||
entryFormCfg = cfg as EntryFormCfg;
|
||||
|
||||
disabled = new bool[Config.Data.WMsCount];
|
||||
wmStartState = new double[Config.Data.WMsCount];
|
||||
wmStartStateStr = new string[Config.Data.WMsCount];
|
||||
wmEndState = new double[Config.Data.WMsCount];
|
||||
|
||||
currentOp = CurrentOp.None;
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
disabled = new bool[Config.Data.WMsCount];
|
||||
wmStartState = new double[Config.Data.WMsCount];
|
||||
wmStartStateStr = new string[Config.Data.WMsCount];
|
||||
wmEndState = new double[Config.Data.WMsCount];
|
||||
currentOp = CurrentOp.None;
|
||||
}
|
||||
|
||||
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation ShowCycleBeginFormOp()
|
||||
{
|
||||
|
||||
@@ -110,25 +110,26 @@ namespace TBF.Rig.DataEntry.StandardCamera
|
||||
CurrentOp currentOp;
|
||||
|
||||
|
||||
public EntryForm()
|
||||
{
|
||||
}
|
||||
public EntryForm() { }
|
||||
|
||||
public EntryForm(Generic.IComponentCfg cfg)
|
||||
: base(cfg)
|
||||
{
|
||||
entryFormCfg = cfg as EntryFormCfg;
|
||||
|
||||
disabled = new bool[Config.Data.WMsCount];
|
||||
wmStartState = new double[Config.Data.WMsCount];
|
||||
wmStartStateStr = new string[Config.Data.WMsCount];
|
||||
wmEndState = new double[Config.Data.WMsCount];
|
||||
wmCycleEndState = new string[Config.Data.WMsCount];
|
||||
|
||||
currentOp = CurrentOp.None;
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
disabled = new bool[Config.Data.WMsCount];
|
||||
wmStartState = new double[Config.Data.WMsCount];
|
||||
wmStartStateStr = new string[Config.Data.WMsCount];
|
||||
wmEndState = new double[Config.Data.WMsCount];
|
||||
wmCycleEndState = new string[Config.Data.WMsCount];
|
||||
currentOp = CurrentOp.None;
|
||||
}
|
||||
|
||||
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation ShowCycleBeginFormOp()
|
||||
{
|
||||
|
||||
@@ -59,25 +59,26 @@ namespace TBF.Rig.DataEntry.iPerl
|
||||
CurrentOp currentOp;
|
||||
|
||||
|
||||
public EntryForm()
|
||||
{
|
||||
}
|
||||
public EntryForm() { }
|
||||
|
||||
public EntryForm(Generic.IComponentCfg cfg)
|
||||
: base(cfg)
|
||||
{
|
||||
entryFormCfg = cfg as EntryFormCfg;
|
||||
|
||||
disabled = new bool[Config.Data.WMsCount];
|
||||
wmStartState = new double[Config.Data.WMsCount];
|
||||
wmStartStateStr = new string[Config.Data.WMsCount];
|
||||
wmEndState = new double[Config.Data.WMsCount];
|
||||
wmCycleEndState = new string[Config.Data.WMsCount];
|
||||
|
||||
currentOp = CurrentOp.None;
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
disabled = new bool[Config.Data.WMsCount];
|
||||
wmStartState = new double[Config.Data.WMsCount];
|
||||
wmStartStateStr = new string[Config.Data.WMsCount];
|
||||
wmEndState = new double[Config.Data.WMsCount];
|
||||
wmCycleEndState = new string[Config.Data.WMsCount];
|
||||
currentOp = CurrentOp.None;
|
||||
}
|
||||
|
||||
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation ShowCycleBeginFormOp()
|
||||
{
|
||||
|
||||
@@ -36,6 +36,7 @@ namespace TBF.Rig.Dummy.Balance
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
|
||||
public override void Initialize() { }
|
||||
|
||||
public IOperation ZeroOp()
|
||||
{
|
||||
|
||||
@@ -23,9 +23,15 @@ namespace TBF.Rig.Dummy.Diverter
|
||||
public FloatBox SwitchTimeStart { get { return switchTimeStart; } }
|
||||
public FloatBox SwitchTimeEnd { get { return switchTimeEnd; } }
|
||||
|
||||
public Component()
|
||||
{
|
||||
}
|
||||
public int DiverterNr { get { return 0; } }
|
||||
public bool State { get { return false; } }
|
||||
public int StartThreshold { get { return 50; } }
|
||||
public int ThresholdLo { get { return 10; } }
|
||||
public int ThresholdHi { get { return 90; } }
|
||||
public double TestTimeCorrection(double flow) { return 0; }
|
||||
|
||||
|
||||
public Component() { }
|
||||
|
||||
public Component(Generic.IComponentCfg cfg)
|
||||
: base(cfg)
|
||||
@@ -35,15 +41,6 @@ namespace TBF.Rig.Dummy.Diverter
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
|
||||
public int DiverterNr { get { return 0; } }
|
||||
public bool State { get { return false; } }
|
||||
public int StartThreshold { get { return 50; } }
|
||||
public int ThresholdLo { get { return 10; } }
|
||||
public int ThresholdHi { get { return 90; } }
|
||||
|
||||
public double TestTimeCorrection(double flow)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
public override void Initialize() { }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,9 +32,7 @@ namespace TBF.Rig.Dummy.FlowMeter
|
||||
public string AltString { get { return "dummy"; } }
|
||||
|
||||
|
||||
public FlowMeter()
|
||||
{
|
||||
}
|
||||
public FlowMeter() { }
|
||||
|
||||
public FlowMeter(Generic.IComponentCfg cfg, IList<Generic.IComponent> components)
|
||||
: base(cfg)
|
||||
@@ -44,6 +42,8 @@ namespace TBF.Rig.Dummy.FlowMeter
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
|
||||
public override void Initialize() { }
|
||||
|
||||
|
||||
public double ReadFlow() { return 1.23; }
|
||||
public double ReadFrequency() { return 1.23 * 2000.0 / (double)NominalFlow; }
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
///
|
||||
/// Copyright (c) 2016 Sensus Metering Systems
|
||||
/// Copyright (c) 2016-2021 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using log4net;
|
||||
using Config.Entities;
|
||||
using TBF.Rig.GenericDevices;
|
||||
|
||||
namespace TBF.Rig.Dummy.Valve
|
||||
@@ -12,14 +9,17 @@ namespace TBF.Rig.Dummy.Valve
|
||||
public class Component : ComponentBase, IValve
|
||||
{
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(Component));
|
||||
public override string ToString()
|
||||
{
|
||||
return string.Format("{0}({1})", this.GetType().Namespace.Substring(8), Cfg.ToString(1));
|
||||
}
|
||||
public override string ToString() { return string.Format("{0}({1})", ClassName, Cfg.ToString(-1)); }
|
||||
|
||||
public Component()
|
||||
{
|
||||
}
|
||||
public bool State { get { return false; } }
|
||||
public ValveCategory Category { get { return ValveCategory.None; } }
|
||||
public int Delay { get { return 1; } }
|
||||
public IValve CoupledTo { get { return null; } }
|
||||
public bool InvertCouple { get { return false; } }
|
||||
public int LagOpening { get { return 0; } }
|
||||
public int LagClosing { get { return 0; } }
|
||||
|
||||
public Component() { }
|
||||
|
||||
public Component(Generic.IComponentCfg cfg)
|
||||
: base(cfg)
|
||||
@@ -27,12 +27,6 @@ namespace TBF.Rig.Dummy.Valve
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
|
||||
public bool State { get { return false; } }
|
||||
public ValveCategory Category { get { return ValveCategory.None; } }
|
||||
public int Delay { get { return 1; } }
|
||||
public IValve CoupledTo { get { return null; } }
|
||||
public bool InvertCouple { get { return false; } }
|
||||
public int LagOpening { get { return 0; } }
|
||||
public int LagClosing { get { return 0; } }
|
||||
public override void Initialize() { }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,9 +29,7 @@ namespace TBF.Rig.Keithley.TempMeter
|
||||
Dictionary<DoubleBox, IOperation> operations2;
|
||||
|
||||
|
||||
public TempMeter()
|
||||
{
|
||||
}
|
||||
public TempMeter() { }
|
||||
|
||||
public TempMeter(Generic.IComponentCfg cfg, IList<Generic.IComponent> components)
|
||||
: base(cfg)
|
||||
@@ -41,12 +39,15 @@ namespace TBF.Rig.Keithley.TempMeter
|
||||
Multimeter = (Multimeter)TbfComponents.FindComponent(cfg.ParentName, components);
|
||||
if (Multimeter == null) throw new Exception("Cannot find " + Name + " parent");
|
||||
|
||||
operations = new Dictionary<DoubleBox, IOperation>();
|
||||
operations2 = new Dictionary<DoubleBox, IOperation>();
|
||||
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
operations = new Dictionary<DoubleBox, IOperation>();
|
||||
operations2 = new Dictionary<DoubleBox, IOperation>();
|
||||
}
|
||||
|
||||
///
|
||||
/// Calendar support
|
||||
///
|
||||
|
||||
@@ -89,7 +89,7 @@ namespace TBF.Rig.MettlerToledo.Standard
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initalize(); /// Initializes DrainValve, etc., should be called in DebugMode.Simulate
|
||||
base.Initialize(); /// Initializes DrainValve, etc., should be called in DebugMode.Simulate
|
||||
|
||||
Activity = Activity.Idle;
|
||||
msrmntState = MsrmntState.Failed; /// Data not valid yet
|
||||
|
||||
@@ -72,7 +72,7 @@ namespace TBF.Rig.MettlerToledo
|
||||
waitTankContainsMoreThenThld4Op = null;
|
||||
}
|
||||
|
||||
protected void Initalize()
|
||||
public override void Initialize()
|
||||
{
|
||||
drainValve = TbfComponents.FindComponent(tankDrainingCfg.DrainValve) as IValve;
|
||||
evaporationCmpnt = TbfComponents.FindComponent(tankDrainingCfg.Evaporation) as IEvaporation;
|
||||
|
||||
@@ -26,9 +26,8 @@ namespace TBF.Rig.Network.Adapter
|
||||
public IPAddress NetMask { get { return netMask; } }
|
||||
public IPAddress BroadcastAddress { get { return broadcastAddress; } }
|
||||
|
||||
public Netadapter()
|
||||
{
|
||||
}
|
||||
|
||||
public Netadapter() { }
|
||||
|
||||
public Netadapter(Generic.IComponentCfg cfg)
|
||||
: base(cfg)
|
||||
@@ -44,5 +43,7 @@ namespace TBF.Rig.Network.Adapter
|
||||
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
|
||||
public override void Initialize() { }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,33 +14,26 @@ namespace TBF.Rig.Network.Camera.Display
|
||||
public class Display : ComponentBase, IOperation, ICameraDisplay
|
||||
{
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(Display));
|
||||
public override string ToString()
|
||||
{
|
||||
return string.Format("{0}({1})", this.GetType().Namespace.Substring(8), Cfg.ToString(1));
|
||||
}
|
||||
|
||||
public override string ToString() { return string.Format("{0}({1})", ClassName, Cfg.ToString(1)); }
|
||||
|
||||
public readonly DisplayCfg DisplayCfg;
|
||||
///
|
||||
public Display()
|
||||
{
|
||||
}
|
||||
///
|
||||
public Display(Generic.IComponentCfg cfg, IList<Generic.IComponent> components)
|
||||
|
||||
public Display() { }
|
||||
|
||||
public Display(Generic.IComponentCfg cfg, IList<Generic.IComponent> components)
|
||||
: base(cfg)
|
||||
{
|
||||
DisplayCfg = cfg as DisplayCfg;
|
||||
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
|
||||
public override void Initialize() { }
|
||||
|
||||
|
||||
public bool[] SelectedImages { get { return selectedImages; } }
|
||||
bool[] selectedImages;
|
||||
|
||||
|
||||
|
||||
public enum CurrentOp
|
||||
{
|
||||
None,
|
||||
|
||||
@@ -118,30 +118,28 @@ namespace TBF.Rig.Network.Camera.Roi
|
||||
}
|
||||
|
||||
|
||||
|
||||
public Roi()
|
||||
{
|
||||
}
|
||||
public Roi() { }
|
||||
|
||||
public Roi(Generic.IComponentCfg cfg, IList<Generic.IComponent> components)
|
||||
: base(cfg)
|
||||
{
|
||||
RoiCfg = cfg as RoiCfg;
|
||||
|
||||
NetCamera = TbfComponents.FindComponent(cfg.ParentName, components) as CLP1611.Camera;
|
||||
|
||||
PreviousRoi = TbfComponents.FindComponent(RoiCfg.PreviousRoi, components) as Roi;
|
||||
|
||||
detected = false;
|
||||
RoiX = new Boxes.IntBox();
|
||||
RoiY = new Boxes.IntBox();
|
||||
RoiWid = new Boxes.IntBox();
|
||||
RoiHgh = new Boxes.IntBox();
|
||||
|
||||
Clear();
|
||||
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
detected = false;
|
||||
RoiX = new Boxes.IntBox();
|
||||
RoiY = new Boxes.IntBox();
|
||||
RoiWid = new Boxes.IntBox();
|
||||
RoiHgh = new Boxes.IntBox();
|
||||
Clear();
|
||||
}
|
||||
|
||||
#region Configuration Change Handling
|
||||
|
||||
|
||||
@@ -72,12 +72,13 @@ namespace TBF.Rig.Network.Camera.RoiForFixedStart
|
||||
{
|
||||
roiCfg = cfg as RoiCfg;
|
||||
NetCamera = TbfComponents.FindComponent(cfg.ParentName, components) as CLP1611.Camera;
|
||||
|
||||
Clear();
|
||||
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
Clear();
|
||||
}
|
||||
|
||||
#region Configuration Change Handling
|
||||
|
||||
|
||||
@@ -50,11 +50,14 @@ namespace TBF.Rig.Output.DB.SaveDiverterCorrections
|
||||
: base(cfg)
|
||||
{
|
||||
myCfg = cfg as SaveDiverterCorrCfg;
|
||||
currentOp = CurrentOp.None;
|
||||
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
currentOp = CurrentOp.None;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Writes the test cycle results into a file, Events: Event.ResultsWritten
|
||||
|
||||
@@ -50,11 +50,14 @@ namespace TBF.Rig.Output.DB.SaveFlowmeterCorrections
|
||||
: base(cfg)
|
||||
{
|
||||
myCfg = cfg as SaveFlowmeterCorrCfg;
|
||||
currentOp = CurrentOp.None;
|
||||
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
currentOp = CurrentOp.None;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Writes the test cycle results into a file, Events: Event.ResultsWritten
|
||||
|
||||
@@ -25,10 +25,12 @@ namespace TBF.Rig.Output.EventTriggers.Standard
|
||||
: base(cfg)
|
||||
{
|
||||
triggerCfg = cfg as TriggerCfg;
|
||||
if (triggerCfg == null) throw new ArgumentException("triggerCfg");
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
|
||||
public override void Initialize() { }
|
||||
|
||||
|
||||
#region Configuration Change Handling
|
||||
|
||||
public static void OnCfgChange(object sender, CfgChangeArgs args)
|
||||
|
||||
@@ -67,6 +67,8 @@ namespace TBF.Rig.Output.FileWriters.ImageArchiver
|
||||
log.Debug(ToString());
|
||||
}
|
||||
|
||||
public override void Initialize() { }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns a file name derived from a DateTime structure.
|
||||
|
||||
@@ -49,11 +49,14 @@ namespace TBF.Rig.Output.FileWriters.IperlLogger
|
||||
: base(cfg)
|
||||
{
|
||||
writerCfg = cfg as WriterCfg;
|
||||
currentOp = CurrentOp.None;
|
||||
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
currentOp = CurrentOp.None;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns a file name derived from a DateTime structure.
|
||||
|
||||
@@ -62,9 +62,7 @@ namespace TBF.Rig.RegisterReaders.KPackE.DataEntryForRadio
|
||||
CurrentOp currentOp;
|
||||
|
||||
|
||||
public EntryForm()
|
||||
{
|
||||
}
|
||||
public EntryForm() { }
|
||||
|
||||
public EntryForm(Generic.IComponentCfg cfg, IList<Generic.IComponent> components)
|
||||
: base(cfg)
|
||||
@@ -73,18 +71,22 @@ namespace TBF.Rig.RegisterReaders.KPackE.DataEntryForRadio
|
||||
|
||||
radio = (KPackE.Radio.Radio)TbfComponents.FindComponent(entryFormCfg.Radio, components);
|
||||
if (radio == null) throw new Exception("Cannot find Radio");
|
||||
radio.EntryForm = this;
|
||||
|
||||
disabled = new bool[Config.Data.WMsCount];
|
||||
wmStartState = new double[Config.Data.WMsCount];
|
||||
wmStartStateStr = new string[Config.Data.WMsCount];
|
||||
wmEndState = new double[Config.Data.WMsCount];
|
||||
wmCycleEndState = new string[Config.Data.WMsCount];
|
||||
|
||||
currentOp = CurrentOp.None;
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
radio.EntryForm = this;
|
||||
disabled = new bool[Config.Data.WMsCount];
|
||||
wmStartState = new double[Config.Data.WMsCount];
|
||||
wmStartStateStr = new string[Config.Data.WMsCount];
|
||||
wmEndState = new double[Config.Data.WMsCount];
|
||||
wmCycleEndState = new string[Config.Data.WMsCount];
|
||||
currentOp = CurrentOp.None;
|
||||
}
|
||||
|
||||
|
||||
/// <returns>Reference to the operation</returns>
|
||||
public IOperation ShowCycleBeginFormOp()
|
||||
{
|
||||
|
||||
@@ -76,10 +76,7 @@ namespace TBF.Rig.RegisterReaders.KPackE.RegisterReader
|
||||
public int WMRefPulses { get { return wmRefPulses; } }
|
||||
|
||||
|
||||
|
||||
public RegisterReader()
|
||||
{
|
||||
}
|
||||
public RegisterReader() { }
|
||||
|
||||
public RegisterReader(Generic.IComponentCfg cfg, IList<Generic.IComponent> components)
|
||||
: base(cfg)
|
||||
@@ -93,11 +90,14 @@ namespace TBF.Rig.RegisterReaders.KPackE.RegisterReader
|
||||
controlBoard = StateMachine.ControlBoard as TBF.Rig.ControlBoard.Legacy.CBoard;
|
||||
if (controlBoard == null) throw new Exception("Missing ELDE control board");
|
||||
|
||||
Clear();
|
||||
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
Clear();
|
||||
}
|
||||
|
||||
public void Clear()
|
||||
{
|
||||
log.DebugFormat("{0}:Clear()", Name);
|
||||
|
||||
@@ -42,5 +42,7 @@ namespace TBF.Rig.RegisterReaders.PulsesFromUniCB
|
||||
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
public override void Initialize() { }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -67,11 +67,14 @@ namespace TBF.Rig.RegisterReaders.StandingStartStop
|
||||
controlBoard = TbfComponents.FindComponent(cfg.ParentName, components) as ControlBoard.IControlBoard;
|
||||
if (controlBoard == null) throw new Exception("Cannot find " + Name + " parent");
|
||||
|
||||
Clear();
|
||||
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
Clear();
|
||||
}
|
||||
|
||||
public void Clear()
|
||||
{
|
||||
log.DebugFormat("{0}:Clear()", Name);
|
||||
|
||||
@@ -318,10 +318,11 @@ namespace TBF.Rig
|
||||
CurrentlyInitializedDeviceName = device.Name;
|
||||
UiBridge.Bridge.OnActivity(null, device.Name); /// Info
|
||||
device.Initialize();
|
||||
devices.Add(device); /// Only components that were initialized are added
|
||||
devices.Add(device); /// Only components that were initialized are added
|
||||
}
|
||||
else
|
||||
{
|
||||
CurrentlyInitializedDeviceName = device.Name;
|
||||
cmpnt.Initialize();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,6 +28,8 @@ namespace TBF.Rig.TestMethods.Adjustment
|
||||
{
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
///
|
||||
public override void Initialize() { }
|
||||
|
||||
public IList<Event> Execute(Test test, int repetNr, bool isLastRepetition)
|
||||
{
|
||||
|
||||
@@ -30,6 +30,8 @@ namespace TBF.Rig.TestMethods.ChangeFlowDirection
|
||||
{
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
///
|
||||
public override void Initialize() { }
|
||||
|
||||
public IList<Event> Execute(Test test, int repetNr, bool isLastRepetition)
|
||||
{
|
||||
|
||||
@@ -32,6 +32,8 @@ namespace TBF.Rig.TestMethods.CombinedWithDetection
|
||||
testMethodCfg = cfg as TestMethodCfg;
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
///
|
||||
public override void Initialize() { }
|
||||
|
||||
public IList<Event> Execute(Test test, int repetNr, bool isLastRepetition)
|
||||
{
|
||||
|
||||
@@ -34,6 +34,8 @@ namespace TBF.Rig.TestMethods.DiverterTest
|
||||
testMethodCfg = cfg as TestMethodCfg;
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
///
|
||||
public override void Initialize() { }
|
||||
|
||||
public IList<Event> Execute(Test test, int repetNr, bool isLastRepetition)
|
||||
{
|
||||
|
||||
@@ -30,6 +30,8 @@ namespace TBF.Rig.TestMethods.Dummy
|
||||
{
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
///
|
||||
public override void Initialize() { }
|
||||
|
||||
public IList<Event> Execute(Test test, int repetNr, bool isLastRepetition)
|
||||
{
|
||||
|
||||
@@ -34,6 +34,8 @@ namespace TBF.Rig.TestMethods.Endurance
|
||||
testMethodCfg = cfg as TestMethodCfg;
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
///
|
||||
public override void Initialize() { }
|
||||
|
||||
public IList<Event> Execute(Test test, int repetNr, bool isLastRepetition)
|
||||
{
|
||||
|
||||
@@ -30,6 +30,8 @@ namespace TBF.Rig.TestMethods.FixedStart.Compound
|
||||
{
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
///
|
||||
public override void Initialize() { }
|
||||
|
||||
public IList<Event> Execute(Test test, int repetNr, bool isLastRepetition)
|
||||
{
|
||||
|
||||
@@ -34,6 +34,8 @@ namespace TBF.Rig.TestMethods.FixedStart.HeatMeters
|
||||
testMethodCfg = cfg as TestMethodCfg;
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
///
|
||||
public override void Initialize() { }
|
||||
|
||||
public IList<Event> Execute(Test test, int repetNr, bool isLastRepetition)
|
||||
{
|
||||
|
||||
@@ -30,6 +30,8 @@ namespace TBF.Rig.TestMethods.FixedStart.Single
|
||||
{
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
///
|
||||
public override void Initialize() { }
|
||||
|
||||
public IList<Event> Execute(Test test, int repetNr, bool isLastRepetition)
|
||||
{
|
||||
|
||||
@@ -29,6 +29,8 @@ namespace TBF.Rig.TestMethods.FixedStartAdvanced.Single
|
||||
{
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
///
|
||||
public override void Initialize() { }
|
||||
|
||||
public IList<Event> Execute(Test test, int repetNr, bool isLastRepetition)
|
||||
{
|
||||
|
||||
@@ -30,6 +30,8 @@ namespace TBF.Rig.TestMethods.FixedStartDeferredEval.Compound
|
||||
{
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
///
|
||||
public override void Initialize() { }
|
||||
|
||||
|
||||
private IntermediateData intermediateData;
|
||||
|
||||
@@ -34,6 +34,8 @@ namespace TBF.Rig.TestMethods.FixedStartDeferredEval.HeatMeters
|
||||
testMethodCfg = cfg as TestMethodCfg;
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
///
|
||||
public override void Initialize() { }
|
||||
|
||||
|
||||
private IntermediateData intermediateData;
|
||||
|
||||
@@ -30,6 +30,8 @@ namespace TBF.Rig.TestMethods.FixedStartDeferredEval.Single
|
||||
{
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
///
|
||||
public override void Initialize() { }
|
||||
|
||||
|
||||
private IntermediateData intermediateData;
|
||||
|
||||
@@ -33,6 +33,8 @@ namespace TBF.Rig.TestMethods.FixedStartMassCollAdvanced.Compound
|
||||
testMethodCfg = cfg as TestMethodCfg;
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
///
|
||||
public override void Initialize() { }
|
||||
|
||||
public IList<Event> Execute(Test test, int repetNr, bool isLastRepetition)
|
||||
{
|
||||
|
||||
@@ -33,6 +33,8 @@ namespace TBF.Rig.TestMethods.FixedStartMassCollAdvanced.HeatMeters
|
||||
testMethodCfg = cfg as TestMethodCfg;
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
///
|
||||
public override void Initialize() { }
|
||||
|
||||
public IList<Event> Execute(Test test, int repetNr, bool isLastRepetition)
|
||||
{
|
||||
|
||||
@@ -33,6 +33,8 @@ namespace TBF.Rig.TestMethods.FixedStartMassCollAdvanced.Single
|
||||
testMethodCfg = cfg as TestMethodCfg;
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
///
|
||||
public override void Initialize() { }
|
||||
|
||||
public IList<Event> Execute(Test test, int repetNr, bool isLastRepetition)
|
||||
{
|
||||
|
||||
@@ -30,6 +30,8 @@ namespace TBF.Rig.TestMethods.FixedStartMassCollDeferredEval.Compound
|
||||
{
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
///
|
||||
public override void Initialize() { }
|
||||
|
||||
|
||||
private IntermediateData intermediateData;
|
||||
|
||||
@@ -34,6 +34,8 @@ namespace TBF.Rig.TestMethods.FixedStartMassCollDeferredEval.HeatMeters
|
||||
testMethodCfg = cfg as TestMethodCfg;
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
///
|
||||
public override void Initialize() { }
|
||||
|
||||
|
||||
private IntermediateData intermediateData;
|
||||
|
||||
@@ -30,6 +30,8 @@ namespace TBF.Rig.TestMethods.FixedStartMassCollDeferredEval.Single
|
||||
{
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
///
|
||||
public override void Initialize() { }
|
||||
|
||||
|
||||
private IntermediateData intermediateData;
|
||||
|
||||
@@ -30,6 +30,8 @@ namespace TBF.Rig.TestMethods.FixedStartMassCollection.Compound
|
||||
{
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
///
|
||||
public override void Initialize() { }
|
||||
|
||||
public IList<Event> Execute(Test test, int repetNr, bool isLastRepetition)
|
||||
{
|
||||
|
||||
@@ -34,6 +34,8 @@ namespace TBF.Rig.TestMethods.FixedStartMassCollection.HeatMeters
|
||||
testMethodCfg = cfg as TestMethodCfg;
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
///
|
||||
public override void Initialize() { }
|
||||
|
||||
public IList<Event> Execute(Test test, int repetNr, bool isLastRepetition)
|
||||
{
|
||||
|
||||
@@ -30,6 +30,8 @@ namespace TBF.Rig.TestMethods.FixedStartMassCollection.Single
|
||||
{
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
///
|
||||
public override void Initialize() { }
|
||||
|
||||
public IList<Event> Execute(Test test, int repetNr, bool isLastRepetition)
|
||||
{
|
||||
|
||||
@@ -34,6 +34,8 @@ namespace TBF.Rig.TestMethods.FixedStartTankCollection.Compound
|
||||
testMethodCfg = cfg as TestMethodCfg;
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
///
|
||||
public override void Initialize() { }
|
||||
|
||||
public IList<Event> Execute(Test test, int repetNr, bool isLastRepetition)
|
||||
{
|
||||
|
||||
@@ -34,6 +34,8 @@ namespace TBF.Rig.TestMethods.FixedStartTankCollection.Single
|
||||
testMethodCfg = cfg as TestMethodCfg;
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
///
|
||||
public override void Initialize() { }
|
||||
|
||||
public IList<Event> Execute(Test test, int repetNr, bool isLastRepetition)
|
||||
{
|
||||
|
||||
@@ -30,6 +30,8 @@ namespace TBF.Rig.TestMethods.FlowAdjustment
|
||||
{
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
///
|
||||
public override void Initialize() { }
|
||||
|
||||
public IList<Event> Execute(Test test, int repetNr, bool isLastRepetition)
|
||||
{
|
||||
|
||||
@@ -34,6 +34,8 @@ namespace TBF.Rig.TestMethods.FlyingStart.Compound
|
||||
testMethodCfg = cfg as TestMethodCfg;
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
///
|
||||
public override void Initialize() { }
|
||||
|
||||
public IList<Event> Execute(Test test, int repetNr, bool isLastRepetition)
|
||||
{
|
||||
|
||||
@@ -34,6 +34,8 @@ namespace TBF.Rig.TestMethods.FlyingStart.HeatMeters
|
||||
testMethodCfg = cfg as TestMethodCfg;
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
///
|
||||
public override void Initialize() { }
|
||||
|
||||
public IList<Event> Execute(Test test, int repetNr, bool isLastRepetition)
|
||||
{
|
||||
|
||||
@@ -30,6 +30,8 @@ namespace TBF.Rig.TestMethods.FlyingStart.Single
|
||||
{
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
///
|
||||
public override void Initialize() { }
|
||||
|
||||
public IList<Event> Execute(Test test, int repetNr, bool isLastRepetition)
|
||||
{
|
||||
|
||||
@@ -34,6 +34,8 @@ namespace TBF.Rig.TestMethods.FlyingStartFirstRepetWithMassColl.Compound
|
||||
testMethodCfg = cfg as TestMethodCfg;
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
///
|
||||
public override void Initialize() { }
|
||||
|
||||
public IList<Event> Execute(Test test, int repetNr, bool isLastRepetition)
|
||||
{
|
||||
|
||||
@@ -34,6 +34,8 @@ namespace TBF.Rig.TestMethods.FlyingStartFirstRepetWithMassColl.HeatMeters
|
||||
testMethodCfg = cfg as TestMethodCfg;
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
///
|
||||
public override void Initialize() { }
|
||||
|
||||
public IList<Event> Execute(Test test, int repetNr, bool isLastRepetition)
|
||||
{
|
||||
|
||||
@@ -34,6 +34,8 @@ namespace TBF.Rig.TestMethods.FlyingStartFirstRepetWithMassColl.Single
|
||||
testMethodCfg = cfg as TestMethodCfg;
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
///
|
||||
public override void Initialize() { }
|
||||
|
||||
public IList<Event> Execute(Test test, int repetNr, bool isLastRepetition)
|
||||
{
|
||||
|
||||
@@ -35,6 +35,8 @@ namespace TBF.Rig.TestMethods.FlyingStartMassCollComparative.Compound
|
||||
testMethodCfg = cfg as TestMethodCfg;
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
///
|
||||
public override void Initialize() { }
|
||||
|
||||
public IList<Event> Execute(Test test, int repetNr, bool isLastRepetition)
|
||||
{
|
||||
|
||||
@@ -34,6 +34,8 @@ namespace TBF.Rig.TestMethods.FlyingStartMassCollComparative.HeatMeters
|
||||
testMethodCfg = cfg as TestMethodCfg;
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
///
|
||||
public override void Initialize() { }
|
||||
|
||||
public IList<Event> Execute(Test test, int repetNr, bool isLastRepetition)
|
||||
{
|
||||
|
||||
@@ -34,6 +34,8 @@ namespace TBF.Rig.TestMethods.FlyingStartMassCollComparative.Single
|
||||
testMethodCfg = cfg as TestMethodCfg;
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
///
|
||||
public override void Initialize() { }
|
||||
|
||||
public IList<Event> Execute(Test test, int repetNr, bool isLastRepetition)
|
||||
{
|
||||
|
||||
@@ -34,6 +34,8 @@ namespace TBF.Rig.TestMethods.FlyingStartMassCollProlonged.Compound
|
||||
testMethodCfg = cfg as TestMethodCfg;
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
///
|
||||
public override void Initialize() { }
|
||||
|
||||
public IList<Event> Execute(Test test, int repetNr, bool isLastRepetition)
|
||||
{
|
||||
|
||||
@@ -34,6 +34,8 @@ namespace TBF.Rig.TestMethods.FlyingStartMassCollProlonged.HeatMeters
|
||||
testMethodCfg = cfg as TestMethodCfg;
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
///
|
||||
public override void Initialize() { }
|
||||
|
||||
public IList<Event> Execute(Test test, int repetNr, bool isLastRepetition)
|
||||
{
|
||||
|
||||
@@ -34,6 +34,8 @@ namespace TBF.Rig.TestMethods.FlyingStartMassCollProlonged.Single
|
||||
testMethodCfg = cfg as TestMethodCfg;
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
///
|
||||
public override void Initialize() { }
|
||||
|
||||
public IList<Event> Execute(Test test, int repetNr, bool isLastRepetition)
|
||||
{
|
||||
|
||||
@@ -35,6 +35,8 @@ namespace TBF.Rig.TestMethods.FlyingStartMassCollection.Compound
|
||||
testMethodCfg = cfg as TestMethodCfg;
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
///
|
||||
public override void Initialize() { }
|
||||
|
||||
public IList<Event> Execute(Test test, int repetNr, bool isLastRepetition)
|
||||
{
|
||||
|
||||
@@ -34,6 +34,8 @@ namespace TBF.Rig.TestMethods.FlyingStartMassCollection.HeatMeters
|
||||
testMethodCfg = cfg as TestMethodCfg;
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
///
|
||||
public override void Initialize() { }
|
||||
|
||||
public IList<Event> Execute(Test test, int repetNr, bool isLastRepetition)
|
||||
{
|
||||
|
||||
@@ -30,6 +30,8 @@ namespace TBF.Rig.TestMethods.FlyingStartMassCollection.Single
|
||||
{
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
///
|
||||
public override void Initialize() { }
|
||||
|
||||
public IList<Event> Execute(Test test, int repetNr, bool isLastRepetition)
|
||||
{
|
||||
|
||||
@@ -34,6 +34,8 @@ namespace TBF.Rig.TestMethods.FlyingStartTankCollection.Compound
|
||||
testMethodCfg = cfg as TestMethodCfg;
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
///
|
||||
public override void Initialize() { }
|
||||
|
||||
public IList<Event> Execute(Test test, int repetNr, bool isLastRepetition)
|
||||
{
|
||||
|
||||
@@ -34,6 +34,8 @@ namespace TBF.Rig.TestMethods.FlyingStartTankCollection.Single
|
||||
testMethodCfg = cfg as TestMethodCfg;
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
///
|
||||
public override void Initialize() { }
|
||||
|
||||
public IList<Event> Execute(Test test, int repetNr, bool isLastRepetition)
|
||||
{
|
||||
|
||||
@@ -65,6 +65,8 @@ namespace TBF.Rig.TestMethods.GrabImage
|
||||
this.cfg = cfg as GrabImageCfg;
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
///
|
||||
public override void Initialize() { }
|
||||
|
||||
public IList<Event> Execute(Test test, int idummy, bool bdummy)
|
||||
{
|
||||
|
||||
@@ -32,6 +32,8 @@ namespace TBF.Rig.TestMethods.LeakTest
|
||||
testMethodCfg = cfg as TestMethodCfg;
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
///
|
||||
public override void Initialize() { }
|
||||
|
||||
public IList<Event> Execute(Test test, int repetNr, bool isLastRepetition)
|
||||
{
|
||||
|
||||
@@ -33,6 +33,8 @@ namespace TBF.Rig.TestMethods.LiveStream
|
||||
this.cfg = cfg as LiveStreamCfg;
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
///
|
||||
public override void Initialize() { }
|
||||
|
||||
public IList<Event> Execute(Test test, int idummy, bool bdummy)
|
||||
{
|
||||
|
||||
@@ -33,6 +33,8 @@ namespace TBF.Rig.TestMethods.ManualEntry
|
||||
myCfg = cfg as ManualEntryCfg;
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
///
|
||||
public override void Initialize() { }
|
||||
|
||||
public IList<Event> Execute(Test test, int repetNr, bool isLastRepetition)
|
||||
{
|
||||
|
||||
@@ -32,6 +32,8 @@ namespace TBF.Rig.TestMethods.OuterLoop.End
|
||||
{
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
///
|
||||
public override void Initialize() { }
|
||||
|
||||
public IList<Event> Execute(Test test, int repetNr, bool isLastRepetition)
|
||||
{
|
||||
|
||||
@@ -32,6 +32,8 @@ namespace TBF.Rig.TestMethods.OuterLoop.Start
|
||||
{
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
///
|
||||
public override void Initialize() { }
|
||||
|
||||
public IList<Event> Execute(Test test, int repetNr, bool isLastRepetition)
|
||||
{
|
||||
|
||||
@@ -35,6 +35,8 @@ namespace TBF.Rig.TestMethods.PMaxTest
|
||||
testMethodCfg = cfg as TestMethodCfg;
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
///
|
||||
public override void Initialize() { }
|
||||
|
||||
public IList<Event> Execute(Test test, int repetNr, bool isLastRepetition)
|
||||
{
|
||||
|
||||
@@ -33,6 +33,8 @@ namespace TBF.Rig.TestMethods.PulsesTest
|
||||
testMethodCfg = cfg as TestMethodCfg;
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
///
|
||||
public override void Initialize() { }
|
||||
|
||||
public IList<Event> Execute(Test test, int repetNr, bool isLastRepetition)
|
||||
{
|
||||
|
||||
@@ -30,6 +30,8 @@ namespace TBF.Rig.TestMethods.PulsesTestManual
|
||||
{
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
///
|
||||
public override void Initialize() { }
|
||||
|
||||
public IList<Event> Execute(Test test, int repetNr, bool isLastRepetition)
|
||||
{
|
||||
|
||||
@@ -70,6 +70,8 @@ namespace TBF.Rig.TestMethods.Q2CorrectionFromHistory
|
||||
this.cfg = cfg as FromHistoryCfg;
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
///
|
||||
public override void Initialize() { }
|
||||
|
||||
public IList<Event> Execute(Test test, int repetitionNr, bool isLastRepetition)
|
||||
{
|
||||
|
||||
@@ -30,6 +30,8 @@ namespace TBF.Rig.TestMethods.RoiDetection
|
||||
{
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
///
|
||||
public override void Initialize() { }
|
||||
|
||||
|
||||
public IList<Event> Execute(Test test, int repetNr, bool isLastRepetition)
|
||||
|
||||
@@ -33,6 +33,8 @@ namespace TBF.Rig.TestMethods.SensitivityTest
|
||||
testMethodCfg = cfg as TestMethodCfg;
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
///
|
||||
public override void Initialize() { }
|
||||
|
||||
public IList<Event> Execute(Test test, int repetNr, bool isLastRepetition)
|
||||
{
|
||||
|
||||
@@ -20,10 +20,10 @@ namespace TBF.Rig.Uni.FlowMetersInParallel
|
||||
readonly IFlowMeter flowMeter1;
|
||||
readonly IFlowMeter flowMeter2;
|
||||
readonly IFlowMeter flowMeter3;
|
||||
readonly double nominalFlow;
|
||||
readonly double ltrPerPulse;
|
||||
readonly int flowMetersCount;
|
||||
readonly int flowMetersBitfield;
|
||||
double nominalFlow;
|
||||
double ltrPerPulse;
|
||||
int flowMetersCount;
|
||||
int flowMetersBitfield;
|
||||
|
||||
public int Idx1 { get { return flowMetersBitfield; } }
|
||||
public double NominalFlow { get { return nominalFlow; } }
|
||||
@@ -113,6 +113,11 @@ namespace TBF.Rig.Uni.FlowMetersInParallel
|
||||
if (!string.IsNullOrEmpty(flowMeterCfg.Flowmeter2)) flowMeter2 = TbfComponents.FindComponent(flowMeterCfg.Flowmeter2, components) as IFlowMeter;
|
||||
if (!string.IsNullOrEmpty(flowMeterCfg.Flowmeter3)) flowMeter3 = TbfComponents.FindComponent(flowMeterCfg.Flowmeter3, components) as IFlowMeter;
|
||||
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
nominalFlow = 0;
|
||||
flowMetersCount = 0;
|
||||
flowMetersBitfield = 0;
|
||||
@@ -124,9 +129,7 @@ namespace TBF.Rig.Uni.FlowMetersInParallel
|
||||
|
||||
refFreq = new double[4];
|
||||
refPulses = new int[4];
|
||||
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
public double ReadFlow()
|
||||
{
|
||||
|
||||
@@ -69,11 +69,13 @@ namespace TBF.Rig.Uni.RegValveAnalog
|
||||
uniCB = TbfComponents.FindComponent(cfg.ParentName, components) as UniCB;
|
||||
if (uniCB == null) throw new Exception("Cannot find " + Name + " parent");
|
||||
|
||||
this.dict = new Dictionary<double, double>();
|
||||
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
this.dict = new Dictionary<double, double>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Operation to set the water flow within tolerances
|
||||
|
||||
@@ -26,8 +26,8 @@ namespace TBF.Rig.Uni.RegValveTandem
|
||||
readonly TBF.Rig.Uni.RegValve.RegValve regValve;
|
||||
readonly TBF.Rig.Uni.RegValve.RegValve fixedRV;
|
||||
|
||||
readonly float fixedPctLo; /// [%]
|
||||
readonly float fixedPctHi; /// [%]
|
||||
float fixedPctLo; /// [%]
|
||||
float fixedPctHi; /// [%]
|
||||
|
||||
public int FlowStableSec { get { return RegulValveTandemCfg.FlowStableSec; } } /// 0..60 sec
|
||||
///
|
||||
@@ -39,9 +39,7 @@ namespace TBF.Rig.Uni.RegValveTandem
|
||||
}
|
||||
|
||||
|
||||
public RegValveTandem()
|
||||
{
|
||||
}
|
||||
public RegValveTandem() { }
|
||||
|
||||
public RegValveTandem(Generic.IComponentCfg cfg, IList<Generic.IComponent> components)
|
||||
: base(cfg)
|
||||
@@ -54,14 +52,16 @@ namespace TBF.Rig.Uni.RegValveTandem
|
||||
fixedRV = TbfComponents.FindComponent(RegulValveTandemCfg.FixedRVName, components) as TBF.Rig.Uni.RegValve.RegValve;
|
||||
if (fixedRV == null) throw new Exception("Cannot find fixed RV");
|
||||
|
||||
fixedPctLo = Math.Max(0.0f, RegulValveTandemCfg.FixedRVPosition - 3.0f);
|
||||
fixedPctHi = Math.Min(100.0f, RegulValveTandemCfg.FixedRVPosition + 3.0f);
|
||||
|
||||
this.dict = new Dictionary<double, double>();
|
||||
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
fixedPctLo = Math.Max(0.0f, RegulValveTandemCfg.FixedRVPosition - 3.0f);
|
||||
fixedPctHi = Math.Min(100.0f, RegulValveTandemCfg.FixedRVPosition + 3.0f);
|
||||
this.dict = new Dictionary<double, double>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Operation to set the water flow within tolerances
|
||||
/// Events: Event.None, Event.FlowReached, Event.FlowTimeOut
|
||||
|
||||
@@ -21,15 +21,15 @@ namespace TBF.Rig.Various.CoverTest
|
||||
readonly CoverTestCfg coverTestCfg;
|
||||
|
||||
readonly CBoard controlBoard;
|
||||
readonly int bitPosition; /// 0 .. 127
|
||||
readonly UInt128 mask; /// derived from bitPosition in the constructor
|
||||
readonly UInt128 target;
|
||||
readonly string message;
|
||||
readonly Users.Entities.GID[] bypassLevel;
|
||||
|
||||
int bitPosition; /// 0 .. 127
|
||||
UInt128 mask; /// derived from bitPosition in the constructor
|
||||
UInt128 target;
|
||||
string message;
|
||||
Users.Entities.GID[] bypassLevel;
|
||||
|
||||
public CoverTest()
|
||||
{
|
||||
}
|
||||
|
||||
public CoverTest() { }
|
||||
|
||||
public CoverTest(Generic.IComponentCfg cfg, IList<Generic.IComponent> components)
|
||||
: base(cfg)
|
||||
@@ -39,9 +39,14 @@ namespace TBF.Rig.Various.CoverTest
|
||||
controlBoard = (CBoard)TbfComponents.FindComponent(cfg.ParentName, components);
|
||||
if (controlBoard == null) throw new Exception("Cannot find " + Name + " parent");
|
||||
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
bitPosition = coverTestCfg.BitNr;
|
||||
mask = (((UInt128)1) << coverTestCfg.BitNr);
|
||||
target = coverTestCfg.Inverted ? 0 : mask;
|
||||
target = coverTestCfg.Inverted ? 0 : mask;
|
||||
message = coverTestCfg.Message;
|
||||
var groups = new List<Users.Entities.GID>();
|
||||
if (coverTestCfg.BypassGroup1 != Users.Entities.GID.None) groups.Add(coverTestCfg.BypassGroup1);
|
||||
@@ -49,9 +54,7 @@ namespace TBF.Rig.Various.CoverTest
|
||||
if (coverTestCfg.BypassGroup3 != Users.Entities.GID.None) groups.Add(coverTestCfg.BypassGroup3);
|
||||
if (coverTestCfg.BypassGroup4 != Users.Entities.GID.None) groups.Add(coverTestCfg.BypassGroup4);
|
||||
bypassLevel = groups.ToArray();
|
||||
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public int ConditionsCount { get { return 1; } }
|
||||
|
||||
@@ -21,5 +21,7 @@ namespace TBF.Rig.Various.Drawing.Junction
|
||||
myCfg = cfg as Configuration;
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
public override void Initialize() { }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,5 +21,7 @@ namespace TBF.Rig.Various.Drawing.Knee
|
||||
myCfg = cfg as Configuration;
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
public override void Initialize() { }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@ namespace TBF.Rig.Various.Drawing.Pipes
|
||||
readonly Configuration myCfg;
|
||||
public SchematicDrawing.IDrawingItem DrawingItem { get { return myCfg as SchematicDrawing.IDrawingItem; } }
|
||||
|
||||
|
||||
public Component() { }
|
||||
|
||||
public Component(Generic.IComponentCfg cfg)
|
||||
@@ -21,5 +22,7 @@ namespace TBF.Rig.Various.Drawing.Pipes
|
||||
myCfg = cfg as Configuration;
|
||||
log.Warn(this.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
public override void Initialize() { }
|
||||
}
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user