| 12345678910111213141516171819202122232425262728293031323334353637 | using Core.Communication.Transport;using Core.Util.Extension;using PLC.Siemens.Protocol.Common;namespace PLC.Siemens.Protocol.Control{    public class PlcHotStartParamsRequest    {        public byte Fun;     // start 0x28        public byte[] Uk7; // unknown 7        public ushort Len1;   // Length part 1 : 0x0002        //public ushort SFun;    // 'C ' 0x4320        public byte Len2;   // Length part 2 : 0x09        public char[] Cmd;  // ascii 'P_PROGRAM'        public ushort PacketLength   = 0x14;        public void Build()        {            Fun = (byte)PduFuncType.PduStart;            Uk7 = new byte[] { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFD };            Len1 = 0x0000;            //SFun = 0x00;            Len2 = 0x09;            Cmd = new[] { 'P', '_', 'P', 'R', 'O', 'G', 'R', 'A', 'M' };        }        public void GetByteBuffer(ByteBuffer buffer)        {            buffer.Push(Fun);            buffer.Push(Uk7);            buffer.Push(Len1);            //buffer.Push(SFun);            buffer.Push(Len2);            Cmd.ForEach(t => buffer.Push((byte)t));        }    }}
 |