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.

71 lines
1.8 KiB

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