38 lines
1.5 KiB
C#
38 lines
1.5 KiB
C#
///
|
|
/// Copyright (c) 2022 Sensus Slovensko a.s.
|
|
///
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using log4net;
|
|
using Config.Entities;
|
|
using TBF.Rig.GenericDevices;
|
|
using TBF.Boxes;
|
|
|
|
namespace TBF.Rig.Dummy.TempControl
|
|
{
|
|
public class Component : ComponentBase, ITempControl
|
|
{
|
|
private static readonly ILog log = LogManager.GetLogger(typeof(Component));
|
|
public override string ToString() { return string.Format("{0}({1})", ClassName, Cfg.ToString(-1)); }
|
|
|
|
public bool MsrmntAvailable { get { return true; } }
|
|
public double MeasuredVal { get { return ReadTemperature(); } }
|
|
public double MsrdValLimLo { get { return 5.0; } }
|
|
public double MsrdValLimHi { get { return 95.0; } }
|
|
public string MsrdFormat { get { return "{0:F1} C"; } }
|
|
public Common.Unit MsrdUnit { get { return Common.Unit.C; } }
|
|
public string AltString { get { return string.Empty; } }
|
|
|
|
public Component() { }
|
|
public Component(Generic.IComponentCfg cfg) : base(cfg) { log.FatalFormat("{0} initialized: {1}", Name, this); }
|
|
public override void Initialize() { }
|
|
|
|
public double ReadTemperature() { return 25.0; }
|
|
public bool SetTemperatureSetpoint(double reqTempC) { return true; }
|
|
|
|
public IOperation ReadTempOp(ref DoubleBox temp) { return null; }
|
|
public IOperation ReadTempOp(ref DoubleBox temp, Event tempDone) { return null; }
|
|
public IOperation SetTemperatureSetpointOp(double temperature) { return null; }
|
|
}
|
|
}
|