|
|
|
|
using HybirdFrameworkDriver.ModbusTcpMaster;
|
|
|
|
|
|
|
|
|
|
namespace Service.FireControl.Msg;
|
|
|
|
|
|
|
|
|
|
public class FireMsg
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 最高报警等级
|
|
|
|
|
/// 0x00 正常
|
|
|
|
|
/// 0x01一级预警
|
|
|
|
|
/// 0x02二级预警
|
|
|
|
|
/// 0x03一级报警
|
|
|
|
|
/// 0x04二级报警
|
|
|
|
|
/// </summary>
|
|
|
|
|
public ModbusProperty<ushort> MaximumAlarmLevel { get; set; } = new(0);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 探测器状态 按位取意义,位从低到高,
|
|
|
|
|
/// 位置0:1号探测器状态
|
|
|
|
|
/// 位置1:2号探测器状态
|
|
|
|
|
/// 位置2:3号探测器状态 以此类推 值0代表正常,值1代表故障
|
|
|
|
|
/// </summary>
|
|
|
|
|
public ModbusProperty<ushort> DetectorState { get; set; } = new(1);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 值0代表正常,值1代表故障
|
|
|
|
|
/// </summary>
|
|
|
|
|
public ModbusProperty<bool> DetectorState01 { get; set; } = new(1,type:ModbusDataType.Bit,start:00,length:1);
|
|
|
|
|
public ModbusProperty<bool> DetectorState02 { get; set; } = new(1,type:ModbusDataType.Bit,start:01,length:1);
|
|
|
|
|
public ModbusProperty<bool> DetectorState03 { get; set; } = new(1,type:ModbusDataType.Bit,start:02,length:1);
|
|
|
|
|
public ModbusProperty<bool> DetectorState04 { get; set; } = new(1,type:ModbusDataType.Bit,start:03,length:1);
|
|
|
|
|
public ModbusProperty<bool> DetectorState05 { get; set; } = new(1,type:ModbusDataType.Bit,start:04,length:1);
|
|
|
|
|
public ModbusProperty<bool> DetectorState06 { get; set; } = new(1,type:ModbusDataType.Bit,start:05,length:1);
|
|
|
|
|
public ModbusProperty<bool> DetectorState07 { get; set; } = new(1,type:ModbusDataType.Bit,start:06,length:1);
|
|
|
|
|
public ModbusProperty<bool> DetectorState08 { get; set; } = new(1,type:ModbusDataType.Bit,start:07,length:1);
|
|
|
|
|
public ModbusProperty<bool> DetectorState09 { get; set; } = new(1,type:ModbusDataType.Bit,start:08,length:1);
|
|
|
|
|
public ModbusProperty<bool> DetectorState10 { get; set; } = new(1,type:ModbusDataType.Bit,start:09,length:1);
|
|
|
|
|
public ModbusProperty<bool> DetectorState11 { get; set; } = new(1,type:ModbusDataType.Bit,start:10,length:1);
|
|
|
|
|
public ModbusProperty<bool> DetectorState12 { get; set; } = new(1,type:ModbusDataType.Bit,start:11,length:1);
|
|
|
|
|
public ModbusProperty<bool> DetectorState13 { get; set; } = new(1,type:ModbusDataType.Bit,start:12,length:1);
|
|
|
|
|
public ModbusProperty<bool> DetectorState14 { get; set; } = new(1,type:ModbusDataType.Bit,start:13,length:1);
|
|
|
|
|
public ModbusProperty<bool> DetectorState15 { get; set; } = new(1,type:ModbusDataType.Bit,start:14,length:1);
|
|
|
|
|
public ModbusProperty<bool> DetectorState16 { get; set; } = new(1,type:ModbusDataType.Bit,start:15,length:1);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 灭火器故障状态
|
|
|
|
|
/// 按位取意义,位从低到高,
|
|
|
|
|
/// 位置0:1号灭火器状态
|
|
|
|
|
/// 位置1:2号灭火器状态
|
|
|
|
|
/// 位置2:3号灭火器状态 以此类推 值0代表正常,值1代表故障
|
|
|
|
|
/// </summary>
|
|
|
|
|
public ModbusProperty<ushort> FireFailureStatus { get; set; } = new(2);
|
|
|
|
|
public ModbusProperty<bool> FireFailureStatus01 { get; set; } = new(2,type:ModbusDataType.Bit,start:00,length:1);
|
|
|
|
|
public ModbusProperty<bool> FireFailureStatus02 { get; set; } = new(2,type:ModbusDataType.Bit,start:01,length:1);
|
|
|
|
|
public ModbusProperty<bool> FireFailureStatus03 { get; set; } = new(2,type:ModbusDataType.Bit,start:02,length:1);
|
|
|
|
|
public ModbusProperty<bool> FireFailureStatus04 { get; set; } = new(2,type:ModbusDataType.Bit,start:03,length:1);
|
|
|
|
|
public ModbusProperty<bool> FireFailureStatus05 { get; set; } = new(2,type:ModbusDataType.Bit,start:04,length:1);
|
|
|
|
|
public ModbusProperty<bool> FireFailureStatus06 { get; set; } = new(2,type:ModbusDataType.Bit,start:05,length:1);
|
|
|
|
|
public ModbusProperty<bool> FireFailureStatus07 { get; set; } = new(2,type:ModbusDataType.Bit,start:06,length:1);
|
|
|
|
|
public ModbusProperty<bool> FireFailureStatus08 { get; set; } = new(2,type:ModbusDataType.Bit,start:07,length:1);
|
|
|
|
|
public ModbusProperty<bool> FireFailureStatus09 { get; set; } = new(2,type:ModbusDataType.Bit,start:08,length:1);
|
|
|
|
|
public ModbusProperty<bool> FireFailureStatus10 { get; set; } = new(2,type:ModbusDataType.Bit,start:09,length:1);
|
|
|
|
|
public ModbusProperty<bool> FireFailureStatus11 { get; set; } = new(2,type:ModbusDataType.Bit,start:10,length:1);
|
|
|
|
|
public ModbusProperty<bool> FireFailureStatus12 { get; set; } = new(2,type:ModbusDataType.Bit,start:11,length:1);
|
|
|
|
|
public ModbusProperty<bool> FireFailureStatus13 { get; set; } = new(2,type:ModbusDataType.Bit,start:12,length:1);
|
|
|
|
|
public ModbusProperty<bool> FireFailureStatus14 { get; set; } = new(2,type:ModbusDataType.Bit,start:13,length:1);
|
|
|
|
|
public ModbusProperty<bool> FireFailureStatus15 { get; set; } = new(2,type:ModbusDataType.Bit,start:14,length:1);
|
|
|
|
|
public ModbusProperty<bool> FireFailureStatus16 { get; set; } = new(2,type:ModbusDataType.Bit,start:15,length:1);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 灭火器启动状态
|
|
|
|
|
/// 按位取意义,位从低到高,
|
|
|
|
|
/// 位置0:1号灭火器状态
|
|
|
|
|
/// 位置1:2号灭火器状态
|
|
|
|
|
/// 位置2:3号灭火器状态 以此类推 值0代表正常,值1代表故障
|
|
|
|
|
/// </summary>
|
|
|
|
|
public ModbusProperty<ushort> FireStatus { get; set; } = new(3);
|
|
|
|
|
public ModbusProperty<bool> FireStatus01 { get; set; } = new(2,type:ModbusDataType.Bit,start:00,length:1);
|
|
|
|
|
public ModbusProperty<bool> FireStatus02 { get; set; } = new(2,type:ModbusDataType.Bit,start:01,length:1);
|
|
|
|
|
public ModbusProperty<bool> FireStatus03 { get; set; } = new(2,type:ModbusDataType.Bit,start:02,length:1);
|
|
|
|
|
public ModbusProperty<bool> FireStatus04 { get; set; } = new(2,type:ModbusDataType.Bit,start:03,length:1);
|
|
|
|
|
public ModbusProperty<bool> FireStatus05 { get; set; } = new(2,type:ModbusDataType.Bit,start:04,length:1);
|
|
|
|
|
public ModbusProperty<bool> FireStatus06 { get; set; } = new(2,type:ModbusDataType.Bit,start:05,length:1);
|
|
|
|
|
public ModbusProperty<bool> FireStatus07 { get; set; } = new(2,type:ModbusDataType.Bit,start:06,length:1);
|
|
|
|
|
public ModbusProperty<bool> FireStatus08 { get; set; } = new(2,type:ModbusDataType.Bit,start:07,length:1);
|
|
|
|
|
public ModbusProperty<bool> FireStatus09 { get; set; } = new(2,type:ModbusDataType.Bit,start:08,length:1);
|
|
|
|
|
public ModbusProperty<bool> FireStatus10 { get; set; } = new(2,type:ModbusDataType.Bit,start:09,length:1);
|
|
|
|
|
public ModbusProperty<bool> FireStatus11 { get; set; } = new(2,type:ModbusDataType.Bit,start:10,length:1);
|
|
|
|
|
public ModbusProperty<bool> FireStatus12 { get; set; } = new(2,type:ModbusDataType.Bit,start:11,length:1);
|
|
|
|
|
public ModbusProperty<bool> FireStatus13 { get; set; } = new(2,type:ModbusDataType.Bit,start:12,length:1);
|
|
|
|
|
public ModbusProperty<bool> FireStatus14 { get; set; } = new(2,type:ModbusDataType.Bit,start:13,length:1);
|
|
|
|
|
public ModbusProperty<bool> FireStatus15 { get; set; } = new(2,type:ModbusDataType.Bit,start:14,length:1);
|
|
|
|
|
public ModbusProperty<bool> FireStatus16 { get; set; } = new(2,type:ModbusDataType.Bit,start:15,length:1);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 按键状态 按位取意义,位从低到高,
|
|
|
|
|
/// 位置0:紧急启动开关状态:值0代表正常,值1代表按下
|
|
|
|
|
/// 位置1:紧急停止开关状态:值0代表正常,值1代表按下
|
|
|
|
|
/// </summary>
|
|
|
|
|
public ModbusProperty<ushort> KeyState { get; set; } = new(4);
|
|
|
|
|
public ModbusProperty<bool> KeyState01 { get; set; } = new(2,type:ModbusDataType.Bit,start:00,length:1);
|
|
|
|
|
public ModbusProperty<bool> KeyState02 { get; set; } = new(2,type:ModbusDataType.Bit,start:01,length:1);
|
|
|
|
|
public ModbusProperty<bool> KeyState03 { get; set; } = new(2,type:ModbusDataType.Bit,start:02,length:1);
|
|
|
|
|
public ModbusProperty<bool> KeyState04 { get; set; } = new(2,type:ModbusDataType.Bit,start:03,length:1);
|
|
|
|
|
public ModbusProperty<bool> KeyState05 { get; set; } = new(2,type:ModbusDataType.Bit,start:04,length:1);
|
|
|
|
|
public ModbusProperty<bool> KeyState06 { get; set; } = new(2,type:ModbusDataType.Bit,start:05,length:1);
|
|
|
|
|
public ModbusProperty<bool> KeyState07 { get; set; } = new(2,type:ModbusDataType.Bit,start:06,length:1);
|
|
|
|
|
public ModbusProperty<bool> KeyState08 { get; set; } = new(2,type:ModbusDataType.Bit,start:07,length:1);
|
|
|
|
|
public ModbusProperty<bool> KeyState09 { get; set; } = new(2,type:ModbusDataType.Bit,start:08,length:1);
|
|
|
|
|
public ModbusProperty<bool> KeyState10 { get; set; } = new(2,type:ModbusDataType.Bit,start:09,length:1);
|
|
|
|
|
public ModbusProperty<bool> KeyState11 { get; set; } = new(2,type:ModbusDataType.Bit,start:10,length:1);
|
|
|
|
|
public ModbusProperty<bool> KeyState12 { get; set; } = new(2,type:ModbusDataType.Bit,start:11,length:1);
|
|
|
|
|
public ModbusProperty<bool> KeyState13 { get; set; } = new(2,type:ModbusDataType.Bit,start:12,length:1);
|
|
|
|
|
public ModbusProperty<bool> KeyState14 { get; set; } = new(2,type:ModbusDataType.Bit,start:13,length:1);
|
|
|
|
|
public ModbusProperty<bool> KeyState15 { get; set; } = new(2,type:ModbusDataType.Bit,start:14,length:1);
|
|
|
|
|
public ModbusProperty<bool> KeyState16 { get; set; } = new(2,type:ModbusDataType.Bit,start:15,length:1);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 显示器状态 值0代表正常,值1代表故障
|
|
|
|
|
/// </summary>
|
|
|
|
|
public ModbusProperty<ushort> DisplayState { get; set; } = new(5);
|
|
|
|
|
|
|
|
|
|
#region 探测器1-n
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 探测器号码 1~n
|
|
|
|
|
/// </summary>
|
|
|
|
|
public ModbusProperty<ushort> DetectorNumber1 { get; set; } = new(11);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 探测器状态
|
|
|
|
|
/// 0;正常;
|
|
|
|
|
/// 1:探测器掉线;
|
|
|
|
|
/// 2:传感器故障
|
|
|
|
|
/// </summary>
|
|
|
|
|
public ModbusProperty<ushort> DetectorState1 { get; set; } = new(12);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 报警等级
|
|
|
|
|
/// 0x00 正常
|
|
|
|
|
/// 0x01一级预警
|
|
|
|
|
/// 0x02二级预警
|
|
|
|
|
/// 0x03一级报警
|
|
|
|
|
/// 0x04二级报警
|
|
|
|
|
/// </summary>
|
|
|
|
|
public ModbusProperty<ushort> AlarmLevel1 { get; set; } = new(13);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 一氧化碳数据 一氧化碳气体浓度数据,数据输出范围0~1000ppm
|
|
|
|
|
/// </summary>
|
|
|
|
|
public ModbusProperty<ushort> CarbonMonoxide1 { get; set; } = new(14);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 温度数据 温度数据,测量温度范围:-40℃~+150℃
|
|
|
|
|
/// 数据偏移量40,
|
|
|
|
|
/// 计算方式:实际温度值 = 温度数据-40
|
|
|
|
|
/// 例如:温度数据为0时:-40℃
|
|
|
|
|
/// 温度数据为40时:0℃
|
|
|
|
|
/// 温度数据为165时:125℃
|
|
|
|
|
/// </summary>
|
|
|
|
|
public ModbusProperty<short> TemperatureData1 { get; set; } = new(15,offset :40);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 一氧化碳数据
|
|
|
|
|
/// 计算方式:实际温度值 = 温度数据/1000
|
|
|
|
|
/// 数据为40时:0.04db/m
|
|
|
|
|
/// 数据为150时:0.15db/m
|
|
|
|
|
/// </summary>
|
|
|
|
|
public ModbusProperty<ushort> CarbonMonoxideData1 { get; set; } = new(16,scale :1000,round :3);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Voc数据 0:正常,1:voc报警
|
|
|
|
|
/// </summary>
|
|
|
|
|
public ModbusProperty<ushort> VocData1 { get; set; } = new(17);
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
}
|