| 123456789101112131415161718192021222324252627282930313233 | using Core.Communication.Transport;using Core.Util.Extension;using PLC.Siemens.Protocol.Common;namespace PLC.Siemens.Protocol.Control{    public class CompressParamsRequest    {        public byte Fun;     // pduControl 0x28        public byte[] Uk7; // unknown 7        public ushort Len1;   // Length part 1 : 0x00        public byte Len2;   // Length part 2 : 0x05        public char[] Cmd;  // ascii '_GARB'        public ushort PacketLength   = 0x10;        public void Build()        {            Fun = (byte)PduFuncType.PduControl;            Uk7 = new byte[] { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFD };            Len1 = 0x0000;            Len2 = 0x05;            Cmd = new[] { '_', 'G', 'A', 'R', 'B' };        }        public void GetByteBuffer(ByteBuffer buffer)        {            buffer.Push(Fun);            buffer.Push(Uk7);            buffer.Push(Len1);            buffer.Push(Len2);            Cmd.ForEach(t => buffer.Push((byte)t));        }    }}
 |