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.

67 lines
1.8 KiB

1 year ago
namespace JiLinApp.Docking.FenceAlarm;
public class SectorState
{
public int id { get; set; }//防区号
/*0使
1
2
3
4
5线
6线(线线)
*/
public int state { get; set; }//防区状态
public string stateStr
{
get
{
switch (state)
{
case 0: return "防区未使用";
case 1: return "防区撤防";
case 2: return "防区布防";
case 3: return "防区旁路";
case 4: return "防区报警";
case 5: return "无线防区欠压";
case 6: return "防区掉线";
default: return "未知状态:" + state;
}
}
}
/*
0:
1线线
2
3
4
5线
*/
public int type { get; set; }//防区类型,特殊参数需单独查询
public string typeStr
{
get
{
switch (type)
{
case 0: return "普通防区";
case 1: return "张力防区";
case 2: return "脉冲围栏";
case 3: return "振动光纤";
case 4: return "泄漏电缆";
case 5: return "网络或总线多子防区模块";
default: return "未知类型:" + type;
}
}
}
public SectorState(int id, byte data)
{
this.id = id;
state = data & 0x0F;
type = data >> 4;
}
}