46 lines
1.4 KiB
C#
46 lines
1.4 KiB
C#
///
|
|
/// Copyright (c) 2016 Sensus Metering Systems
|
|
///
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using log4net;
|
|
using Config.Entities;
|
|
using TBF.BenchControl.GenericDevices;
|
|
using TBF.Boxes;
|
|
|
|
namespace TBF.BenchControl.Dummy.Diverter
|
|
{
|
|
public class Component : ComponentBase, IDiverter
|
|
{
|
|
private static readonly ILog log = LogManager.GetLogger(typeof(Component));
|
|
public override string ToString() { return string.Format("{0}({1})", ClassName, Cfg.ToString(-1)); }
|
|
|
|
FloatBox switchTimeStart;
|
|
FloatBox switchTimeEnd;
|
|
public FloatBox SwitchTimeStart { get { return switchTimeStart; } }
|
|
public FloatBox SwitchTimeEnd { get { return switchTimeEnd; } }
|
|
|
|
public int DiverterNr { get { return 0; } }
|
|
public bool State { get { return false; } }
|
|
public int ThresholdGate { 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)
|
|
{
|
|
}
|
|
|
|
public override void Initialize()
|
|
{
|
|
switchTimeStart = new FloatBox();
|
|
switchTimeEnd = new FloatBox();
|
|
log.FatalFormat("{0} initialized: {1}", Name, this);
|
|
}
|
|
}
|
|
}
|