2023-04-19 18:01:08 +08:00
|
|
|
|
using Aitex.Core.RT.SCCore;
|
|
|
|
|
using System;
|
2023-04-19 15:38:04 +08:00
|
|
|
|
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)
|
|
|
|
|
{
|
2023-04-19 18:01:08 +08:00
|
|
|
|
LoadConfig();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override void LoadConfig()
|
|
|
|
|
{
|
|
|
|
|
base.LoadConfig();
|
|
|
|
|
|
2023-04-19 15:38:04 +08:00
|
|
|
|
// 重新设定水温警告值,当前系统中的水温警告值非设定值,而是在Alarm基础上偏移指定的温度。
|
2023-04-19 18:01:08 +08:00
|
|
|
|
var warnOffset = SC.SafeGetValue($"{ScBasePath}.WarningOffset", 0.0);
|
|
|
|
|
|
2023-04-19 15:38:04 +08:00
|
|
|
|
checked
|
|
|
|
|
{
|
|
|
|
|
_warningLow = _alarmLow + Math.Abs(warnOffset);
|
|
|
|
|
_warningHigh = _alarmHigh - Math.Abs(warnOffset);
|
|
|
|
|
}
|
2023-04-19 18:01:08 +08:00
|
|
|
|
|
2023-04-19 15:38:04 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|