温州站现场消防测试

zw
CZ 4 months ago
parent bd40a0306f
commit 528d0468f1

@ -5,5 +5,7 @@ public enum EquipmentType
Charger, Charger,
Ammeter, Ammeter,
WaterCool, WaterCool,
Plc Plc,
Bms,
Fire
} }

@ -44,83 +44,83 @@ public class Subzone5Resp
/// 7预留 /// 7预留
/// 8预留 /// 8预留
/// </summary> /// </summary>
public byte ProtectionZone001 { get; set; } public ushort ProtectionZone001 { get; set; }
/// <summary> /// <summary>
/// 类型 /// 类型
/// </summary> /// </summary>
public byte Type001 { get; set; } public ushort Type001 { get; set; }
/// <summary> /// <summary>
/// 探测器 ID 与探测器编号对应 /// 探测器 ID 与探测器编号对应
/// </summary> /// </summary>
public byte DetectorID001 { get; set; } public ushort DetectorID001 { get; set; }
/// <summary> /// <summary>
/// 报警等级 0x0000正常0x0001一级预警 0x0002二级报警 0x0003三级报警 0x0004四级报警预留 /// 报警等级 0x0000正常0x0001一级预警 0x0002二级报警 0x0003三级报警 0x0004四级报警预留
/// </summary> /// </summary>
public byte AlarmLevel001 { get; set; } public ushort AlarmLevel001 { get; set; }
/// <summary> /// <summary>
/// 温度 实际值=寄存器值 -40 /// 温度 实际值=寄存器值 -40
/// </summary> /// </summary>
public byte Temperature001 { get; set; } public ushort Temperature001 { get; set; }
/// <summary> /// <summary>
/// 一氧化碳浓度 实际值=寄存器值 / 1000 /// 一氧化碳浓度 实际值=寄存器值 / 1000
/// </summary> /// </summary>
public byte CoConcentration001 { get; set; } public ushort CoConcentration001 { get; set; }
/// <summary> /// <summary>
/// VOC /// VOC
/// </summary> /// </summary>
public byte VOC001 { get; set; } public ushort VOC001 { get; set; }
/// <summary> /// <summary>
/// 烟雾 0xFF00 烟雾报警 0x0000 烟雾正常 /// 烟雾 0xFF00 烟雾报警 0x0000 烟雾正常
/// </summary> /// </summary>
public byte Smoke001 { get; set; } public ushort Smoke001 { get; set; }
public byte ProtectionZone002 { get; set; } public ushort ProtectionZone002 { get; set; }
public byte Type002 { get; set; } public ushort Type002 { get; set; }
public byte DetectorID002 { get; set; } public ushort DetectorID002 { get; set; }
public byte AlarmLevel002 { get; set; } public ushort AlarmLevel002 { get; set; }
public byte Temperature002 { get; set; } public ushort Temperature002 { get; set; }
public byte CoConcentration002 { get; set; } public ushort CoConcentration002 { get; set; }
public byte VOC002 { get; set; } public ushort VOC002 { get; set; }
public byte Smoke002 { get; set; } public ushort Smoke002 { get; set; }
public byte ProtectionZone003 { get; set; } public ushort ProtectionZone003 { get; set; }
public byte Type003 { get; set; } public ushort Type003 { get; set; }
public byte DetectorID003 { get; set; } public ushort DetectorID003 { get; set; }
public byte AlarmLevel003 { get; set; } public ushort AlarmLevel003 { get; set; }
public byte Temperature003 { get; set; } public ushort Temperature003 { get; set; }
public byte CoConcentration003 { get; set; } public ushort CoConcentration003 { get; set; }
public byte VOC003 { get; set; } public ushort VOC003 { get; set; }
public byte Smoke003 { get; set; } public ushort Smoke003 { get; set; }
public byte ProtectionZone004 { get; set; } public ushort ProtectionZone004 { get; set; }
public byte Type004 { get; set; } public ushort Type004 { get; set; }
public byte DetectorID004 { get; set; } public ushort DetectorID004 { get; set; }
public byte AlarmLevel004 { get; set; } public ushort AlarmLevel004 { get; set; }
public byte Temperature004 { get; set; } public ushort Temperature004 { get; set; }
public byte CoConcentration004 { get; set; } public ushort CoConcentration004 { get; set; }
public byte VOC004 { get; set; } public ushort VOC004 { get; set; }
public byte Smoke004 { get; set; } public ushort Smoke004 { get; set; }
public byte ProtectionZone005 { get; set; } public ushort ProtectionZone005 { get; set; }
public byte Type005 { get; set; } public ushort Type005 { get; set; }
public byte DetectorID005 { get; set; } public ushort DetectorID005 { get; set; }
public byte AlarmLevel005 { get; set; } public ushort AlarmLevel005 { get; set; }
public byte Temperature005 { get; set; } public ushort Temperature005 { get; set; }
public byte CoConcentration005 { get; set; } public ushort CoConcentration005 { get; set; }
public byte VOC005 { get; set; } public ushort VOC005 { get; set; }
public byte Smoke005 { get; set; } public ushort Smoke005 { get; set; }
public byte ProtectionZone006 { get; set; } public ushort ProtectionZone006 { get; set; }
public byte Type006 { get; set; } public ushort Type006 { get; set; }
public byte DetectorID006 { get; set; } public ushort DetectorID006 { get; set; }
public byte AlarmLevel006 { get; set; } public ushort AlarmLevel006 { get; set; }
public byte Temperature006 { get; set; } public ushort Temperature006 { get; set; }
public byte CoConcentration006 { get; set; } public ushort CoConcentration006 { get; set; }
public byte VOC006 { get; set; } public ushort VOC006 { get; set; }
public byte Smoke006 { get; set; } public ushort Smoke006 { get; set; }
} }
public class Subzone7Resp public class Subzone7Resp

@ -24,7 +24,7 @@ namespace Entity.DbModel.Station
public int Id {get;set;} public int Id {get;set;}
/// <summary> /// <summary>
/// Desc:类型编码;0-充电机1-电表 /// Desc:类型编码;0-充电机1-电表,,3plc,4bms,5消防
/// Default: /// Default:
/// Nullable:True /// Nullable:True
/// </summary> /// </summary>

@ -58,6 +58,7 @@ public class ManualSuccState : IState
_manualOperationRecordRepository.Insert(manualOperationRecord); _manualOperationRecordRepository.Insert(manualOperationRecord);
; ;
StationReadyState.CanWelcomeInfo = true;
machine.Reset(); machine.Reset();
} }
catch (Exception e) catch (Exception e)

@ -25,6 +25,7 @@ public class StationReadyState : IState
private readonly CommonMgr _CommonMgr = AppInfo.Container.Resolve<CommonMgr>(); private readonly CommonMgr _CommonMgr = AppInfo.Container.Resolve<CommonMgr>();
public static bool CanWelcomeInfo = true;
public StateResult Handle(SwappingStateMachine machine) public StateResult Handle(SwappingStateMachine machine)
{ {
@ -116,6 +117,11 @@ public class StationReadyState : IState
if (PlcApi.WriteEntranceLamp(1000)) if (PlcApi.WriteEntranceLamp(1000))
{ {
//LED显示-欢迎光临_换电站点_正在营业 //LED显示-欢迎光临_换电站点_正在营业
if (CanWelcomeInfo)
{
SoundApi.PlayOneSound((int)InfoEnum.SwapInfo.WelcomeInfo);
CanWelcomeInfo = false;
}
// machine.LedTool?.WriteContent(welcomeContent); // machine.LedTool?.WriteContent(welcomeContent);
//查看雷达 //查看雷达
@ -141,8 +147,7 @@ public class StationReadyState : IState
} }
else else
{ {
SoundApi.PlayOneSound((int)InfoEnum.SwapInfo.WelcomeInfo); StationReadyState.CanWelcomeInfo = true;
Thread.Sleep(2000);
SoundApi.PlayOneSound((int)InfoEnum.SwapInfo.CarInInfo); SoundApi.PlayOneSound((int)InfoEnum.SwapInfo.CarInInfo);
machine.ExceptionReason = ExceptionReason.None; machine.ExceptionReason = ExceptionReason.None;
_log.Info("entrance radar true"); _log.Info("entrance radar true");

@ -1,7 +1,10 @@
using HybirdFrameworkCore.Autofac.Attribute; using Common.Const;
using Entity.DbModel.Station;
using HybirdFrameworkCore.Autofac.Attribute;
using HybirdFrameworkCore.Const; using HybirdFrameworkCore.Const;
using HybirdFrameworkDriver.ModbusTcpMaster; using HybirdFrameworkDriver.ModbusTcpMaster;
using log4net; using log4net;
using Repository.Station;
using Service.FireControl.Msg; using Service.FireControl.Msg;
namespace Service.FireControl.Client; namespace Service.FireControl.Client;
@ -10,6 +13,9 @@ namespace Service.FireControl.Client;
public class FireControlClient: ModbusTcpMaster public class FireControlClient: ModbusTcpMaster
{ {
private static readonly ILog Log = LogManager.GetLogger(typeof(FireControlClient)); private static readonly ILog Log = LogManager.GetLogger(typeof(FireControlClient));
public EquipAlarmDefineRepository EquipAlarmDefineRepository { get; set; }
public EquipAlarmRecordRepository EquipAlarmRecordRepository { get; set; }
public EquipAlarmProcessRecordRepository EquipAlarmProcessRecordRepository { get; set; }
public FireControlClient() public FireControlClient()
{ {
ReadAction = BatchRead; ReadAction = BatchRead;
@ -23,16 +29,40 @@ public class FireControlClient: ModbusTcpMaster
private void BatchRead(ModbusTcpMaster master) private void BatchRead(ModbusTcpMaster master)
{ {
//1电表
//2消防
//3温湿度
Log.Info("fire start read"); Log.Info("fire start read");
var bytes02 = master.ReadCoil("0x0000", 17).Content;//0x01
var bytes03 = master.BatchReadHolderRegister(1, 3);//0x03 读1 3 #region 电表
var bytes04 = master.BatchReadHolderRegister(0x0100, 383);//0x03 读256 383
var bytes05 = master.BatchReadHolderRegister(1, 115);//0x04 可以 var readPowerValue = master.Read("x=3;39424", 4).Content;
if (readPowerValue != null)
{
ModbusDecoder.Decode<PowerValue>(readPowerValue, FireControlMgr.PowerValue, EndingConst.ByteSeq.AB, EndingConst.WordSeq.DC);
}
#endregion
#region 温湿度
var readTem = master.Read("s=3;x=3;0", 2).Content;
if (readTem!=null)
{
ModbusDecoder.Decode<TemperatureHumidity>(readTem, FireControlMgr.TemperatureHumidity, EndingConst.ByteSeq.AB, EndingConst.WordSeq.DC);
}
#endregion
var bytes02 = master.ReadCoil("s=2;x=1;0", 17).Content;//0x01
var bytes03 = master.Read("s=2;x=3;1", 3).Content;//0x03 读1 3
var bytes04 = master.Read("s=2;x=3;257", 383).Content;//0x03 读256 383
var bytes05 = master.Read("s=2;x=4;1", 115).Content;//0x04 可以
List<byte> bytes06=new List<byte>();//= master.BatchReadHolderRegister(0x0800, 2048);//0x04 可以 List<byte> bytes06=new List<byte>();//= master.BatchReadHolderRegister(0x0800, 2048);//0x04 可以
var bytesAdd1 = master.BatchReadHolderRegister(0x0800, 1000);//0x04 可以 var bytesAdd1 = master.Read("s=2;x=4;2048", 1000).Content;//0x04 可以
var bytesAdd2 = master.BatchReadHolderRegister(3048, 1048);//0x04 可以 var bytesAdd2 = master.Read("s=2;x=4;3048", 1048).Content;//0x04 可以
if (bytesAdd1 != null && bytesAdd2 != null) if (bytesAdd1 != null && bytesAdd2 != null)
{ {
bytes06.AddRange(bytesAdd1); bytes06.AddRange(bytesAdd1);
@ -40,15 +70,13 @@ public class FireControlClient: ModbusTcpMaster
} }
var bytes07 = master.BatchReadHolderRegister(0x1000, 32);//0x04 可以 var bytes07 = master.Read("s=2;x=4;4096", 32).Content;//0x04 可以
var bytes08 = master.BatchReadHolderRegister(0x0000, 134);//0x05 写 var bytes08 = master.Read("s=2;x=5;0", 134).Content;//0x05 写
var bytes09 = master.BatchReadHolderRegister(0x0100, 64);//0x06 写 var bytes09 = master.Read("s=2;x=6;256", 64).Content;//0x06 写
try
{
if (bytes02 != null) if (bytes02 != null)
{ {
Log.Info("fire read bytes02 success"); Log.Info("fire read bytes02 success");
//ModbusDecoder.Decode<Subzone2Resp>(bytes02, FireControlMgr.Subzone2Resp, EndingConst.ByteSeq.AB, EndingConst.WordSeq.DC);
FireControlMgr.Subzone2.GiveAnAlarm.Value = bytes02[0]; FireControlMgr.Subzone2.GiveAnAlarm.Value = bytes02[0];
FireControlMgr.Subzone2.NumberOfFailures.Value = bytes02[1]; FireControlMgr.Subzone2.NumberOfFailures.Value = bytes02[1];
FireControlMgr.Subzone2.SoundSuppression.Value = bytes02[2]; FireControlMgr.Subzone2.SoundSuppression.Value = bytes02[2];
@ -67,88 +95,174 @@ public class FireControlClient: ModbusTcpMaster
FireControlMgr.Subzone2.AudibleVisualAlarmStatus.Value = bytes02[15]; FireControlMgr.Subzone2.AudibleVisualAlarmStatus.Value = bytes02[15];
FireControlMgr.Subzone2.DeflatedDoNotEnter.Value = bytes02[16]; FireControlMgr.Subzone2.DeflatedDoNotEnter.Value = bytes02[16];
} }
}
catch (Exception e)
{
Log.Info($"fire read bytes02 erroe{e}");
}
try
{
if (bytes03 != null) if (bytes03 != null)
{ {
ModbusDecoder.Decode<Subzone3>(bytes03, FireControlMgr.Subzone3, EndingConst.ByteSeq.AB, EndingConst.WordSeq.DC); ModbusDecoder.Decode<Subzone3>(bytes03, FireControlMgr.Subzone3, EndingConst.ByteSeq.AB, EndingConst.WordSeq.DC);
} }
}
catch (Exception e)
{
Log.Info($"fire read bytes03 erroe{e}");
}
try
{
if (bytes04 != null) if (bytes04 != null)
{ {
ModbusDecoder.Decode<Subzone4>(bytes04, FireControlMgr.Subzone4, EndingConst.ByteSeq.AB, EndingConst.WordSeq.DC); ModbusDecoder.Decode<Subzone4>(bytes04, FireControlMgr.Subzone4, EndingConst.ByteSeq.AB, EndingConst.WordSeq.DC);
} List<string> faultList = new List<string>()
}
catch (Exception e)
{ {
Log.Info($"fire read bytes04 erroe{e}"); {FireControlMgr.Subzone4.EquipmentNumber01.Value.ToString()},
{FireControlMgr.Subzone4.EquipmentNumber02.Value.ToString()},
{FireControlMgr.Subzone4.EquipmentNumber03.Value.ToString()},
{FireControlMgr.Subzone4.EquipmentNumber04.Value.ToString()},
{FireControlMgr.Subzone4.EquipmentNumber05.Value.ToString()},
{FireControlMgr.Subzone4.EquipmentNumber06.Value.ToString()},
{FireControlMgr.Subzone4.EquipmentNumber07.Value.ToString()},
{FireControlMgr.Subzone4.EquipmentNumber08.Value.ToString()},
{FireControlMgr.Subzone4.EquipmentNumber09.Value.ToString()},
{FireControlMgr.Subzone4.EquipmentNumber10.Value.ToString()},
{FireControlMgr.Subzone4.EquipmentNumber11.Value.ToString()},
{FireControlMgr.Subzone4.EquipmentNumber12.Value.ToString()},
{FireControlMgr.Subzone4.EquipmentNumber13.Value.ToString()},
{FireControlMgr.Subzone4.EquipmentNumber14.Value.ToString()},
{FireControlMgr.Subzone4.EquipmentNumber15.Value.ToString()},
{FireControlMgr.Subzone4.EquipmentNumber16.Value.ToString()},
{FireControlMgr.Subzone4.EquipmentNumber17.Value.ToString()},
{FireControlMgr.Subzone4.EquipmentNumber18.Value.ToString()},
{FireControlMgr.Subzone4.EquipmentNumber19.Value.ToString()},
{FireControlMgr.Subzone4.EquipmentNumber20.Value.ToString()},
{FireControlMgr.Subzone4.EquipmentNumber21.Value.ToString()},
{FireControlMgr.Subzone4.EquipmentNumber22.Value.ToString()},
{FireControlMgr.Subzone4.EquipmentNumber23.Value.ToString()},
{FireControlMgr.Subzone4.EquipmentNumber24.Value.ToString()},
{FireControlMgr.Subzone4.EquipmentNumber25.Value.ToString()},
{FireControlMgr.Subzone4.EquipmentNumber26.Value.ToString()},
{FireControlMgr.Subzone4.EquipmentNumber27.Value.ToString()},
{FireControlMgr.Subzone4.EquipmentNumber28.Value.ToString()},
{FireControlMgr.Subzone4.EquipmentNumber29.Value.ToString()},
{FireControlMgr.Subzone4.EquipmentNumber30.Value.ToString()},
};
SaveAlarmInfo(faultList);
} }
try
{
if (bytes05 != null) if (bytes05 != null)
{ {
ModbusDecoder.Decode<Subzone5>(bytes05, FireControlMgr.Subzone5, EndingConst.ByteSeq.AB, EndingConst.WordSeq.DC); ModbusDecoder.Decode<Subzone5>(bytes05, FireControlMgr.Subzone5, EndingConst.ByteSeq.AB, EndingConst.WordSeq.DC);
} }
}
catch (Exception e)
{
Log.Info($"fire read bytes05 erroe{e}");
}
try
{
if (bytes06 != null) if (bytes06 != null)
{ {
ModbusDecoder.Decode<Subzone6>(bytes06.ToArray(), FireControlMgr.Subzone6, EndingConst.ByteSeq.AB, EndingConst.WordSeq.DC); ModbusDecoder.Decode<Subzone6>(bytes06.ToArray(), FireControlMgr.Subzone6, EndingConst.ByteSeq.AB, EndingConst.WordSeq.DC);
} }
}
catch (Exception e)
{
Log.Info($"fire read bytes06 erroe{e}");
}
try
{
if (bytes07 != null) if (bytes07 != null)
{ {
ModbusDecoder.Decode<Subzone7>(bytes07, FireControlMgr.Subzone7, EndingConst.ByteSeq.AB, EndingConst.WordSeq.DC); ModbusDecoder.Decode<Subzone7>(bytes07, FireControlMgr.Subzone7, EndingConst.ByteSeq.AB, EndingConst.WordSeq.DC);
} }
/*if (bytes08 != null)
{
ModbusDecoder.Decode<Subzone8>(bytes08, FireControlMgr.Subzone8, EndingConst.ByteSeq.AB, EndingConst.WordSeq.DC);
} }
catch (Exception e)
if (bytes09 != null)
{ {
Log.Info($"fire read bytes07 erroe{e}"); ModbusDecoder.Decode<Subzone9>(bytes09, FireControlMgr.Subzone9, EndingConst.ByteSeq.AB, EndingConst.WordSeq.DC);
}*/
} }
try
private void SaveAlarmInfo(List<string> lstAlarm)
{ {
if (bytes08 != null) if (lstAlarm.Count > 0)
{ {
ModbusDecoder.Decode<Subzone8>(bytes08, FireControlMgr.Subzone8, EndingConst.ByteSeq.AB, EndingConst.WordSeq.DC); #region 有报警比较两边差异,新出现的报警就添加,消失的报警就处理并记录
var lstEquipAlarmRecord = EquipAlarmRecordRepository.QueryListByClause(i => i.EquipTypeCode == (int)EquipmentType.Fire);
var sqllstAlarm = lstEquipAlarmRecord.Select(obj => obj.ErrorCode).ToList();
// 找出实时报警中存在但数据库中不存在的元素
List<string> uniqueToList1 = lstAlarm.Except(sqllstAlarm).ToList();
// 找出数据库中存在但实时报警中不存在的元素
List<string> uniqueToList2 = sqllstAlarm.Except(lstAlarm).ToList();
if (uniqueToList1.Count > 0)
{
//这里要添加新的报警数据
foreach (var errorCode in uniqueToList1)
{
if (errorCode != "0")
{
EquipAlarmDefine? alarmDefine =
EquipAlarmDefineRepository.QueryByClause(i=>i.EquipTypeCode==(int)EquipmentType.Fire&&i.ErrorCode==errorCode);
if (alarmDefine != null)
{
EquipAlarmRecord record = new EquipAlarmRecord()
{
EquipTypeCode = alarmDefine.EquipTypeCode,
EquipCode = alarmDefine.EquipCode,
ErrorCode = alarmDefine.ErrorCode,
ErrorLevel = alarmDefine.ErrorLevel,
ErrorMsg = alarmDefine.ErrorMsg,
ProcessMethod = alarmDefine.ProcessMethod,
StartTime = DateTime.Now
};
EquipAlarmRecordRepository.Insert(record);
}
} }
} }
catch (Exception e)
{
Log.Info($"fire read bytes08 erroe{e}");
} }
try
if (uniqueToList2.Count > 0)
{ {
if (bytes09 != null) //这些是要清除实时报警,并且处理记录的。
// 使用LINQ找出ErrorCode在uniqueToList2中的EquipAlarmRecord对象
List<EquipAlarmRecord> filteredObjectList = lstEquipAlarmRecord
.Where(obj => uniqueToList2.Contains(obj.ErrorCode))
.ToList();
foreach (var VARIABLE in filteredObjectList)
{ {
ModbusDecoder.Decode<Subzone9>(bytes09, FireControlMgr.Subzone9, EndingConst.ByteSeq.AB, EndingConst.WordSeq.DC); EquipAlarmProcessRecord EquipAlarmProcessRecord = new EquipAlarmProcessRecord();
EquipAlarmProcessRecord.EquipTypeCode = VARIABLE.EquipTypeCode;
EquipAlarmProcessRecord.EquipCode = VARIABLE.EquipCode;
EquipAlarmProcessRecord.ErrorCode = VARIABLE.ErrorCode;
EquipAlarmProcessRecord.ErrorLevel = VARIABLE.ErrorLevel;
EquipAlarmProcessRecord.ErrorMsg = VARIABLE.ErrorMsg;
EquipAlarmProcessRecord.ProcessMethod = VARIABLE.ProcessMethod;
EquipAlarmProcessRecord.StartTime = VARIABLE.StartTime;
EquipAlarmProcessRecord.ProcessTime = DateTime.Now;
EquipAlarmProcessRecordRepository.Insert(EquipAlarmProcessRecord);
}
EquipAlarmRecordRepository.Delete(filteredObjectList);
} }
#endregion
} }
catch (Exception e) else
{
#region 没报警把已处理记录更新并删除实时报警
var lstEquipAlarmRecord = EquipAlarmRecordRepository.QueryListByClause(i => i.EquipTypeCode == 3);
if (lstEquipAlarmRecord.Count > 0)
{ {
Log.Info($"fire read bytes02 erroe{e}"); foreach (var VARIABLE in lstEquipAlarmRecord)
{
EquipAlarmProcessRecord EquipAlarmProcessRecord = new EquipAlarmProcessRecord();
EquipAlarmProcessRecord.EquipTypeCode = VARIABLE.EquipTypeCode;
EquipAlarmProcessRecord.EquipCode = VARIABLE.EquipCode;
EquipAlarmProcessRecord.ErrorCode = VARIABLE.ErrorCode;
EquipAlarmProcessRecord.ErrorLevel = VARIABLE.ErrorLevel;
EquipAlarmProcessRecord.ErrorMsg = VARIABLE.ErrorMsg;
EquipAlarmProcessRecord.ProcessMethod = VARIABLE.ProcessMethod;
EquipAlarmProcessRecord.StartTime = VARIABLE.StartTime;
EquipAlarmProcessRecord.ProcessTime = DateTime.Now;
EquipAlarmProcessRecordRepository.Insert(EquipAlarmProcessRecord);
}
}
EquipAlarmRecordRepository.Delete(lstEquipAlarmRecord);
#endregion
} }
} }
} }

@ -16,6 +16,37 @@ public class FireControlMgr
public static Subzone8 Subzone8 = new Subzone8(); public static Subzone8 Subzone8 = new Subzone8();
public static Subzone9 Subzone9 = new Subzone9(); public static Subzone9 Subzone9 = new Subzone9();
public static PowerValue PowerValue = new PowerValue();
public static TemperatureHumidity TemperatureHumidity = new TemperatureHumidity();
/// <summary>
/// 温度
/// </summary>
public static float Temperature {
get
{
return (TemperatureHumidity.Temperature.Value / 10);
}
}
/// <summary>
/// 湿度
/// </summary>
public static float Humidity { get
{
return (TemperatureHumidity.Humidity.Value / 10);
} }
/// <summary>
/// 电量值
/// </summary>
public static float Power {get
{
return PowerValue.FPowerValue.Value;
} }
public static FireControlClient? FireControlClient { get; set; } public static FireControlClient? FireControlClient { get; set; }
#region MyRegion #region MyRegion

@ -24,6 +24,36 @@ public class FireAutoMapper
subzone5Resp.AlarmLevel001 = subzone5.AlarmLevel001.Value; subzone5Resp.AlarmLevel001 = subzone5.AlarmLevel001.Value;
subzone5Resp.Smoke001 = subzone5.Smoke001.Value; subzone5Resp.Smoke001 = subzone5.Smoke001.Value;
subzone5Resp.DetectorID002 = subzone5.DetectorID002.Value;
subzone5Resp.Temperature002 = subzone5.Temperature002.Value;
subzone5Resp.CoConcentration002 = subzone5.CoConcentration002.Value;
subzone5Resp.AlarmLevel002 = subzone5.AlarmLevel002.Value;
subzone5Resp.Smoke002 = subzone5.Smoke002.Value;
subzone5Resp.DetectorID003 = subzone5.DetectorID003.Value;
subzone5Resp.Temperature003 = subzone5.Temperature003.Value;
subzone5Resp.CoConcentration003 = subzone5.CoConcentration003.Value;
subzone5Resp.AlarmLevel003 = subzone5.AlarmLevel003.Value;
subzone5Resp.Smoke003 = subzone5.Smoke003.Value;
subzone5Resp.DetectorID004 = subzone5.DetectorID004.Value;
subzone5Resp.Temperature004 = subzone5.Temperature004.Value;
subzone5Resp.CoConcentration004 = subzone5.CoConcentration004.Value;
subzone5Resp.AlarmLevel004 = subzone5.AlarmLevel004.Value;
subzone5Resp.Smoke004 = subzone5.Smoke004.Value;
subzone5Resp.DetectorID005 = subzone5.DetectorID005.Value;
subzone5Resp.Temperature005 = subzone5.Temperature005.Value;
subzone5Resp.CoConcentration005 = subzone5.CoConcentration005.Value;
subzone5Resp.AlarmLevel005 = subzone5.AlarmLevel005.Value;
subzone5Resp.Smoke005 = subzone5.Smoke005.Value;
subzone5Resp.DetectorID006 = subzone5.DetectorID006.Value;
subzone5Resp.Temperature006 = subzone5.Temperature006.Value;
subzone5Resp.CoConcentration006 = subzone5.CoConcentration006.Value;
subzone5Resp.AlarmLevel006 = subzone5.AlarmLevel006.Value;
subzone5Resp.Smoke006 = subzone5.Smoke006.Value;
return subzone5Resp; return subzone5Resp;
} }
@ -31,6 +61,18 @@ public class FireAutoMapper
{ {
Entity.Api.Resp.Subzone7Resp subzone7Resp = new Subzone7Resp(); Entity.Api.Resp.Subzone7Resp subzone7Resp = new Subzone7Resp();
subzone7Resp.FireExtinguisherStatus01 = subzone7.FireExtinguisherStatus01.Value;
subzone7Resp.FireExtinguisherProtectionArea01=subzone7.FireExtinguisherProtectionArea01.Value;
subzone7Resp.FireExtinguisherStatus02 = subzone7.FireExtinguisherStatus02.Value;
subzone7Resp.FireExtinguisherProtectionArea02=subzone7.FireExtinguisherProtectionArea02.Value;
subzone7Resp.FireExtinguisherStatus03 = subzone7.FireExtinguisherStatus03.Value;
subzone7Resp.FireExtinguisherProtectionArea03=subzone7.FireExtinguisherProtectionArea03.Value;
subzone7Resp.FireExtinguisherStatus04 = subzone7.FireExtinguisherStatus04.Value;
subzone7Resp.FireExtinguisherProtectionArea04=subzone7.FireExtinguisherProtectionArea04.Value;
return subzone7Resp; return subzone7Resp;
} }

@ -0,0 +1,8 @@
using HybirdFrameworkDriver.ModbusTcpMaster;
namespace Service.FireControl.Msg;
public class PowerValue
{
public ModbusProperty<float> FPowerValue { get; set; } = new(39424);
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -108,7 +108,7 @@ public class Subzone6
public ModbusProperty<ushort> DelayTime04 { get; set; } = new(2706); public ModbusProperty<ushort> DelayTime04 { get; set; } = new(2706);
public ModbusProperty<ushort> PrimingSpray04 { get; set; } = new(2725); public ModbusProperty<ushort> PrimingSpray04 { get; set; } = new(2725);
public ModbusProperty<ushort> Spray04 { get; set; } = new(2744); public ModbusProperty<ushort> Spray04 { get; set; } = new(2744);
public ModbusProperty<ushort> ProtectionZone05 { get; set; } = new(2763); /*public ModbusProperty<ushort> ProtectionZone05 { get; set; } = new(2763);
public ModbusProperty<ushort> AlarmLevel05 { get; set; } = new(2782); public ModbusProperty<ushort> AlarmLevel05 { get; set; } = new(2782);
public ModbusProperty<ushort> Breakdown05 { get; set; } = new(2801); public ModbusProperty<ushort> Breakdown05 { get; set; } = new(2801);
public ModbusProperty<ushort> ManualMode05 { get; set; } = new(2820); public ModbusProperty<ushort> ManualMode05 { get; set; } = new(2820);
@ -827,5 +827,5 @@ public class Subzone6
public ModbusProperty<ushort> Delay64 { get; set; } = new(16367); public ModbusProperty<ushort> Delay64 { get; set; } = new(16367);
public ModbusProperty<ushort> DelayTime64 { get; set; } = new(16386); public ModbusProperty<ushort> DelayTime64 { get; set; } = new(16386);
public ModbusProperty<ushort> PrimingSpray64 { get; set; } = new(16405); public ModbusProperty<ushort> PrimingSpray64 { get; set; } = new(16405);
public ModbusProperty<ushort> Spray64 { get; set; } = new(16424); public ModbusProperty<ushort> Spray64 { get; set; } = new(16424);*/
} }

@ -0,0 +1,15 @@
using HybirdFrameworkDriver.ModbusTcpMaster;
namespace Service.FireControl.Msg;
public class TemperatureHumidity
{
/// <summary>
/// 温度
/// </summary>
public ModbusProperty<short> Temperature { get; set; } = new(0x0000);
/// <summary>
/// 湿度
/// </summary>
public ModbusProperty<short> Humidity { get; set; } = new(0x0001);
}
Loading…
Cancel
Save