Files
tbf/TBF/BenchControl/Dummy/Diverter/Component.cs
T

50 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})", this.GetType().Namespace.Substring(17), Cfg.ToString(1));
}
FloatBox switchTimeStart;
FloatBox switchTimeEnd;
public FloatBox SwitchTimeStart { get { return switchTimeStart; } }
public FloatBox SwitchTimeEnd { get { return switchTimeEnd; } }
public Component()
{
}
public Component(Generic.IComponentCfg cfg)
: base(cfg)
{
switchTimeStart = new FloatBox();
switchTimeEnd = new FloatBox();
log.Warn(this.ToString());
}
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;
}
}
}