namespace WorkerSynReport.Plc; public class ReportDosEntity { public ReportDosEntity(byte[] bytes, int StartSet) { //OperateResult read = PlcConnect.Instance.Read("DB2107.10.0", 2); var content = bytes.Skip(StartSet).Take(22).ToArray(); eqNo = PlcConnect.Instance.ByteTransform.TransInt16(content, 0); batch = PlcConnect.Instance.ByteTransform.TransInt16(content, 2); matCode = PlcConnect.Instance.ByteTransform.TransInt16(content, 4); setValue = PlcConnect.Instance.ByteTransform.TransSingle(content, 6); setToler = PlcConnect.Instance.ByteTransform.TransSingle(content, 10); actValue = PlcConnect.Instance.ByteTransform.TransSingle(content, 14); actToler = PlcConnect.Instance.ByteTransform.TransSingle(content, 18); } public short eqNo { get; private set; } public short batch { get; private set; } public short matCode { get; private set; } public float setValue { get; private set; } public float setToler { get; private set; } public float actValue { get; private set; } public float actToler { get; private set; } }