using PlcSiemens.O;

namespace PlcSiemens.Protocol.Upload
{
    public class UploadDataResponse
    {
        public ushort Length;// Payload length - 4
        public byte Uk00; // Unknown 0x00
        public byte UkFb; // Unknown 0xFB
        public byte[] Datas { get; set; }

        public void Build(ByteBuffer buffer)
        {
            Length = buffer.PopUshort();
            Uk00 = buffer.PopByte();
            UkFb = buffer.PopByte();
            Datas = buffer.PopBytes(buffer.WriteIndex - buffer.ReadIndex);
        }
    }
}
