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.
57 lines
1.0 KiB
57 lines
1.0 KiB
namespace JiLinApp.Docking.VibrateAlarm;
|
|
|
|
public class SectionState
|
|
{
|
|
public int deviceID { get; set; }
|
|
|
|
public string channel { get; set; }
|
|
public int online { get; set; }
|
|
|
|
public string onLine_str
|
|
{
|
|
get
|
|
{
|
|
if (online == 0)
|
|
{
|
|
return "在线";
|
|
}
|
|
else
|
|
{
|
|
return "离线";
|
|
}
|
|
}
|
|
}
|
|
|
|
public int alarm { get; set; }
|
|
|
|
public string alarm_str
|
|
{
|
|
get
|
|
{
|
|
if (alarm == 0)
|
|
{
|
|
return "消警";
|
|
}
|
|
else
|
|
{
|
|
return "报警";
|
|
}
|
|
}
|
|
}
|
|
|
|
public SectionState(int id, int chan, int state)
|
|
{
|
|
deviceID = id;
|
|
channel = chan.ToString();
|
|
online = state % 2;
|
|
alarm = state / 2 % 2;
|
|
}
|
|
|
|
public SectionState(int id, int chan, int on, int a)
|
|
{
|
|
deviceID = id;
|
|
channel = chan.ToString();
|
|
online = on;
|
|
alarm = a;
|
|
}
|
|
}
|