using Edge.Core.Parser.BinaryParser.Attributes;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
namespace LanTian_Sinopec_PumpIcCardReader
{
///
/// 加油机对 PC 机普通查询命令 30H
/// PC 机对加油机普通查询命令 30H
///
public class PcGenericInquiryRequest : KaJiLianDongV11MessageTemplateBase
{
public enum RequestType
{
//加油机对PC机普通查询命令30H = 0x30,
PC机对加油机普通查询命令30H = 0x30,
//加油机发送实时信息命令31H = 0x31
}
public PcGenericInquiryRequest()
{
base.HANDLE = 0x30;
base.SetMessageCallerSide(MessageCallerSide.PC);
}
[Format(7, EncodingType.BcdString, 1)]
public string Raw_PC_TIME { get; private set; }
public DateTime PC_TIME
{
get { return DateTime.Parse(this.Raw_PC_TIME); }
set { this.Raw_PC_TIME = value.ToString("yyyyMMddHHmmss"); }
}
///
/// 基础黑名单版本号
///
[Format(2, EncodingType.BIN, 2)]
public int BL_VER { get; set; }
///
/// 新增黑名单版本
///
[Format(1, EncodingType.BIN, 3)]
public byte ADD_BL_VER { get; set; }
///
/// 新删黑名单版本
///
[Format(1, EncodingType.BIN, 4)]
public byte DEL_BL_VER { get; set; }
///
/// 白名单版本号
///
[Format(1, EncodingType.BIN, 5)]
public byte WH_VER { get; set; }
///
/// 液品液价版本
///
[Format(1, EncodingType.BIN, 6)]
public byte PRC_VER { get; set; }
///
/// 液站通用信息版本
///
[Format(1, EncodingType.BIN, 7)]
public byte Sta_VER { get; set; }
///
/// 加液机初始化数据更新标志
///
[Format(1, EncodingType.BIN, 8)]
public 更新标志 SELF_D_VER { get; set; }
///
/// 加液机程序下载更新标记
///
[Format(1, EncodingType.BIN, 9)]
public 更新标志 SOFT_FLAG { get; set; }
public enum 更新标志
{
无数据 = 0,
有新的程序or私有数据需要下载or发送 = 1
}
public override string ToLogString()
{
return base.ToLogString() + " caller: " + this.GetMessageCallerSide() + ", SeqNo.: " + this.MessageSequenceNumber;
}
}
}