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