using Core.Communication.Transport; using PLC.Siemens.Protocol.Common; namespace PLC.Siemens.Protocol.Header { public class HeaderPacketWithErrorCode : HeaderPacket { public ResultCode Error { get; set; } // Error code public override void Build(ByteBuffer buffer) { P = buffer.PopByte(); PduType = buffer.PopByte(); AbEx = buffer.PopUshort(); Sequence = buffer.PopUshort(); ParLen = buffer.PopUshort(); DataLen = buffer.PopUshort(); Error = (ResultCode)buffer.PopUshort(); } } }