using Edge.Core.Parser.BinaryParser.Attributes; using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace LanTian_Sinopec_PumpIcCardReader { /// /// 加油机对 PC 机的普通查询命令 /// 功能:在加油机主动方式下,加油机定时与 PC 机进行的握手通讯; /// 在 PC 机主动方式下,此命令为油机的回复。 /// public class PumpGenericInquiryCommand : KaJiLianDongV11MessageTemplateBase { public override string ToLogString() { return "PumpGenericInquiryCommand, caller: " + this.GetMessageCallerSide() + ", SeqNo.: " + this.MessageSequenceNumber + ", " + base.ToLogString(); } [Format(7, EncodingType.BcdString, 1)] public long PC_TIME { get; private set; } public DateTime GetPcTime() { var dd = this.PC_TIME.ToString(); var dt = Convert.ToDateTime(dd); return dt; } public void SetPcTime(DateTime dateTime) { var str = dateTime.ToString("yyyyMMddHHmmss"); this.PC_TIME = long.Parse(str); } [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 } } }