You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

170 lines
6.8 KiB

2 years ago
namespace JiLinApp.Docking.FenceAlarm;
public class UdpAlarmHostDevice
{
public int deviceID { get; set; }//设备唯一ID
public string IP { get; set; }//设备IP
public int groupID { get; set; }//分组号,报警主机可划入不同组
public int userID { get; set; }//用户ID,指主机名称,有多台主机可以通过此名称区分
/*0x00:
0x04: ()
0x02:()
0x08 :(,)
0x01:()
0x09:
*/
public int deviceState { get; set; }//主机布撤状态,
public string deviceStateStr
{
get
{
switch (deviceState)
{
case 0x00:
return "撤防状态";
case 0x01:
return "外出布防";
case 0x02:
return "即时布防";
case 0x04:
return "在家布防";
case 0x08:
return "即时留守布防";
case 0x09:
return "部分防区布防";
default:
return "未知状态号:" + deviceState;
}
}
}
/*0x00,
0x01,,,退
0x02
0x03
0x04
*/
public int deviceWorkState { get; set; }//设备工作状态
public string deviceWorkStateStr
{
get
{
switch (deviceState)
{
case 0x00:
return "常规工作状态";
case 0x01:
return "在设置模式";
case 0x02:
return "用户正在查询报警";
case 0x03:
return "用户正在设置时钟";
case 0x04:
return "用户密码修改模式";
default:
return "未知状态号:" + deviceWorkState;
}
}
}
public int cellState { get; set; }//电池状态 1=电池故障 0=电池正常
public int electricityState { get; set; }//交流状态 1=交流掉电 0=交流正常
public int fuseState { get; set; }//警保险丝状态 1=外接警号断了0=正常
public int sectorState { get; set; }//有线防区触发了 1=其中有线防区触发了 0=所有有线防区准备好
public int cellTestState { get; set; }//正在电池载能测试 1=主机正在进行电池载能测试 0=无(主机会降低电压到电池12V以下,来测试电池负载特性需要2分钟)
public int deviceElectricityState { get; set; }//设备交流电状态1=交流掉电,目前电池供电0=正常 这是即时状态
public int soundState { get; set; }//设备声音输出状态(=0关闭声音) =1 输出声音) 用于布防和报警延时
public int testState { get; set; }//主机本地测试状态1=主机在本地测试(用于测试探测好坏是没有报警记录的)0=无
public int criticalAlarmState { get; set; }//软防区紧急报警状态1=有紧急报警(用户通过手动按下主机自带装置报警) 0=无
public int fireAlarmState { get; set; }//软防区火警报警状态1=有火警报警(用户通过手动按下主机自带装置报警) 0=无
public int stealAlarmState { get; set; }//软防区盗警报警状态1=有盗警报警(用户通过手动按下主机自带装置报警) 0=无
public int deviceFireAlarmState { get; set; }//设备中有火警报警状态 1=其中有火警防区触发了 0=无 整体状态
public int deviceAlarmState { get; set; }//设备有报警发生 1=指设备有报警状态,任一一种0=无报警
public int deviceBywayState { get; set; }//设备有旁路防区1=指设备某些防区有旁路了(这时软件可以要求上传具体旁路的防区) 2=无防区旁路
public int busOfflineState { get; set; }//有总线防区掉线状态1=指某些总线防区掉线了0=无
public int netOfflineState { get; set; }//有网络防区掉线状态1=指某些网络防区掉线了0=无
/*00:
01:EH508报警主机
02:EH508NP网络模块
03: NETLINKBOARD32路网络模块
04: EH508NETCILENT网络终端
05: EH800 8
06: EH508NP_UDP
07: EH508CILENT_UDP
08: EH508SEVER_UDP
09: EH508MAP_UDP
0A: EH508_UDP EH508主机
0x32: H768_IP系列网络模块
0x33: D238C_IP网络模块
0x34: H778S+
0x35: H778S系列报警主机
0x36:N201 N202网络模块
*/
public int devideType { get; set; }//设备类型:区分不同的设备类型 增强可控,防止混乱,具体的设备类型见附加说明表格
public int signalIntensity { get; set; }//31:信号最强,如果设备类型不是这种不需要显示 指主要带有GPRS模块设备跟据设备类型来的
public int channelNum { get; set; }//分区数量
public List<int> channelState { get; set; }//分区布防撤防状态,0为撤防,1为布防
public List<int> channelAlarmState { get; set; }//分区报警状态,0为报警中,1为未报警
//-------------------------------防区信息-----------------------------//
public int maxSectorNum { get; set; }//最大防区号
public List<SectorState> sectorList { get; set; }
public int deviceOnlineState { get; set; }//设备在线状态
public int keep_live { get; set; }//设备在线状态
public UdpAlarmHostDevice()
{
deviceID = 0;
groupID = 0;
userID = 0;
deviceState = -1;
deviceWorkState = 0;
cellState = 0;
electricityState = 0;
fuseState = 0;
sectorState = 0;
cellTestState = 0;
deviceElectricityState = 0;
soundState = 0;
testState = 0;
criticalAlarmState = 0;
fireAlarmState = 0;
stealAlarmState = 0;
deviceFireAlarmState = 0;
deviceAlarmState = 0;
deviceBywayState = 0;
busOfflineState = 0;
netOfflineState = 0;
devideType = 0;
signalIntensity = 0;
channelNum = 0;
channelState = null;
channelAlarmState = null;
sectorList = null;
deviceOnlineState = 0;
}
}