using DataBlockHelper.DBHelpers; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Web.UI.WebControls; namespace DataBlockHelper.Entity { public class Db2101Entity { public Db2101Entity() { } public Db2101Entity(ushort startSet, byte[] bytes) { byte[] content = bytes.Skip(startSet).Take(4).ToArray(); var trans = PlcConnect.Instance.ByteTransform; var a = content[0]; var b = content[1]; enable = a.GetBit(0); finished = a.GetBit(1); time= trans.TransInt16(content,2); } public bool enable { get; set; } public bool finished { get; set; } public short time { get; set; } } }