|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace DataBlockHelper.Entity.DB191Entity
|
|
|
|
|
{
|
|
|
|
|
public class ControlPanelEntity
|
|
|
|
|
{
|
|
|
|
|
public ControlPanelEntity(ushort startSet, byte[] bytes)
|
|
|
|
|
{
|
|
|
|
|
byte[] content = bytes.Skip(startSet).Take(4).ToArray();
|
|
|
|
|
|
|
|
|
|
byte byt = content[0];
|
|
|
|
|
|
|
|
|
|
vesselMode1 = byt.GetBit(0);
|
|
|
|
|
vesselMode2 = byt.GetBit(1);
|
|
|
|
|
siloGroup1 = byt.GetBit(2);
|
|
|
|
|
siloGroup2 = byt.GetBit(3);
|
|
|
|
|
siloGroup3 = byt.GetBit(4);
|
|
|
|
|
siloGroup4 = byt.GetBit(5);
|
|
|
|
|
siloGroup5 = byt.GetBit(6);
|
|
|
|
|
silo1 = byt.GetBit(7);
|
|
|
|
|
|
|
|
|
|
byt = content[1];
|
|
|
|
|
|
|
|
|
|
silo2 = byt.GetBit(0);
|
|
|
|
|
silo3 = byt.GetBit(1);
|
|
|
|
|
silo4 = byt.GetBit(2);
|
|
|
|
|
clearAlarm = byt.GetBit(3);
|
|
|
|
|
lampTest = byt.GetBit(4);
|
|
|
|
|
start = byt.GetBit(5);
|
|
|
|
|
stop = byt.GetBit(6);
|
|
|
|
|
siloGroupLamp1 = byt.GetBit(7);
|
|
|
|
|
|
|
|
|
|
byt = content[2];
|
|
|
|
|
|
|
|
|
|
siloGroupLamp2 = byt.GetBit(0);
|
|
|
|
|
siloGroupLamp3 = byt.GetBit(1);
|
|
|
|
|
siloGroupLamp4 = byt.GetBit(2);
|
|
|
|
|
siloGroupLamp5 = byt.GetBit(3);
|
|
|
|
|
siloLamp1 = byt.GetBit(4);
|
|
|
|
|
siloLamp2 = byt.GetBit(5);
|
|
|
|
|
siloLamp3 = byt.GetBit(6);
|
|
|
|
|
siloLamp4 = byt.GetBit(7);
|
|
|
|
|
|
|
|
|
|
byt = content[3];
|
|
|
|
|
|
|
|
|
|
startLamp = byt.GetBit(0);
|
|
|
|
|
stopLamp = byt.GetBit(1);
|
|
|
|
|
cleanLamp = byt.GetBit(2);
|
|
|
|
|
pathOkLamp = byt.GetBit(3);
|
|
|
|
|
siloFullLamp = byt.GetBit(4);
|
|
|
|
|
Buzzer = byt.GetBit(5);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public bool vesselMode1 { get; set; }
|
|
|
|
|
public bool vesselMode2 { get; set; }
|
|
|
|
|
public bool siloGroup1 { get; set; }
|
|
|
|
|
public bool siloGroup2 { get; set; }
|
|
|
|
|
public bool siloGroup3 { get; set; }
|
|
|
|
|
public bool siloGroup4 { get; set; }
|
|
|
|
|
public bool siloGroup5 { get; set; }
|
|
|
|
|
public bool silo1 { get; set; }
|
|
|
|
|
public bool silo2 { get; set; }
|
|
|
|
|
public bool silo3 { get; set; }
|
|
|
|
|
public bool silo4 { get; set; }
|
|
|
|
|
public bool clearAlarm { get; set; }
|
|
|
|
|
public bool lampTest { get; set; }
|
|
|
|
|
public bool start { get; set; }
|
|
|
|
|
public bool stop { get; set; }
|
|
|
|
|
public bool siloGroupLamp1 { get; set; }
|
|
|
|
|
public bool siloGroupLamp2 { get; set; }
|
|
|
|
|
public bool siloGroupLamp3 { get; set; }
|
|
|
|
|
public bool siloGroupLamp4 { get; set; }
|
|
|
|
|
public bool siloGroupLamp5 { get; set; }
|
|
|
|
|
public bool siloLamp1 { get; set; }
|
|
|
|
|
public bool siloLamp2 { get; set; }
|
|
|
|
|
public bool siloLamp3 { get; set; }
|
|
|
|
|
public bool siloLamp4 { get; set; }
|
|
|
|
|
public bool startLamp { get; set; }
|
|
|
|
|
public bool stopLamp { get; set; }
|
|
|
|
|
public bool cleanLamp { get; set; }
|
|
|
|
|
public bool pathOkLamp { get; set; }
|
|
|
|
|
public bool siloFullLamp { get; set; }
|
|
|
|
|
public bool Buzzer { get; set; }
|
|
|
|
|
}
|
|
|
|
|
}
|