using System; using System.Collections.Generic; using System.Linq; using System.Runtime.InteropServices; using System.Text; namespace RCUHost.Protocols { /// /// 升级主机 Packet RCU -> 服务器 /// [StructLayoutAttribute(LayoutKind.Sequential, Pack = 1)] public struct UpdateHostPacketReply { #region Status Const /// /// 升级就绪 /// public const byte Ready = 0x00; /// /// 升级完成 /// public const byte Completed = 0x01; /// /// 升级出错 /// public const byte Error = 0x02; /// /// 文件块数错误 /// public const byte BlockNumError = 0x03; /// /// 文件类型错误 /// public const byte FileTypeError = 0x04; /// /// 文件MD5错误 /// public const byte FileMD5Error = 0x05; #endregion /// /// 状态 /// public byte Status; /// /// 版本号 /// [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = 20)] public string Version; /// /// 文件类型 /// public byte FileType; /// /// CRC16 /// public ushort CRC; } }