using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.InteropServices;
namespace RCUHost.Protocols
{
[StructLayoutAttribute(LayoutKind.Sequential, Pack = 1)]
public struct UpdateHostPacketProgress
{
#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 fileType;
public ushort fileBlockCount;
public ushort fileCurrentNumber;
public byte fileNameLen;
///
/// 版本号
///
[MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = 2)]
public string Version;
///
/// CRC16
///
public ushort CRC;
}
}