Sic.Framework/MECF.Framework.RT.Equipment.../Devices/IoSensorWaterFlowTemp.cs

32 lines
859 B
C#
Raw Normal View History

using Aitex.Core.RT.SCCore;
using System;
using System.Xml;
namespace Aitex.Core.RT.Device.Devices
{
public class IoSensorWaterFlowTemp : IoSensorAnalog
{
public IoSensorWaterFlowTemp(string module, XmlElement node, string ioModule = "")
: base(module, node, ioModule)
{
LoadConfig();
}
protected override void LoadConfig()
{
base.LoadConfig();
// 重新设定水温警告值当前系统中的水温警告值非设定值而是在Alarm基础上偏移指定的温度。
var warnOffset = SC.SafeGetValue($"{ScBasePath}.WarningOffset", 0.0);
checked
{
_warningLow = _alarmLow + Math.Abs(warnOffset);
_warningHigh = _alarmHigh - Math.Abs(warnOffset);
}
}
}
}