using PlcSiemens.O;
using PlcSiemens.Protocol.Header;

namespace PlcSiemens.Protocol.Upload
{
    public class UploadResponse : IBuildResponse
    {
        public HeaderPacketWithErrorCode Header { get; set; }
        public UploadParamsResponse Params { get; set; }
        public UploadDataResponse Data { get; set; }

        public UploadResponse()
        {
            Header = new HeaderPacketWithErrorCode();
            Params = new UploadParamsResponse();
            Data = new UploadDataResponse();
        }

        public void Build(ByteBuffer buffer)
        {
            Header.Build(buffer);
            Params.Build(buffer);
            Data.Build(buffer);
        }
    }
}
