PcGenericInquiryWithRichInfoResponse.cs 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. using Edge.Core.Parser.BinaryParser.Attributes;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Text;
  6. namespace FuRen_Sinopec_IcCardReader
  7. {
  8. /// <summary>
  9. /// 加油机对 PC 机普通查询命令 30H
  10. /// PC 机对加油机普通查询命令 30H
  11. /// </summary>
  12. public class PcGenericInquiryWithRichInfoResponse : KaJiLianDongV11MessageTemplateBase
  13. {
  14. public enum RequestType
  15. {
  16. //加油机对PC机普通查询命令30H = 0x30,
  17. PC机对加油机普通查询命令30H = 0x30,
  18. //加油机发送实时信息命令31H = 0x31
  19. }
  20. public PcGenericInquiryWithRichInfoResponse()
  21. {
  22. base.HANDLE = 0x30;
  23. base.SetMessageCallerSide(MessageCallerSide.PC);
  24. }
  25. [Format(7, EncodingType.BcdString, 1)]
  26. public long PC_TIME { get; private set; }
  27. public DateTime GetPcTime()
  28. {
  29. var dd = this.PC_TIME.ToString();
  30. var dt = Convert.ToDateTime(dd);
  31. return dt;
  32. }
  33. public void SetPcTime(DateTime dateTime)
  34. {
  35. var str = dateTime.ToString("yyyyMMddHHmmss");
  36. this.PC_TIME = long.Parse(str);
  37. }
  38. [Format(2, EncodingType.BIN, 2)]
  39. public int BL_VER { get; set; }
  40. [Format(1, EncodingType.BIN, 3)]
  41. public byte ADD_BL_VER { get; set; }
  42. [Format(1, EncodingType.BIN, 4)]
  43. public byte DEL_BL_VER { get; set; }
  44. [Format(1, EncodingType.BIN, 5)]
  45. public byte WH_VER { get; set; }
  46. [Format(1, EncodingType.BIN, 6)]
  47. public byte PRC_VER { get; set; }
  48. [Format(1, EncodingType.BIN, 7)]
  49. public byte Sta_VER { get; set; }
  50. [Format(1, EncodingType.BIN, 8)]
  51. public 更新标志 SELF_D_VER { get; set; }
  52. [Format(1, EncodingType.BIN, 9)]
  53. public 更新标志 SOFT_FLAG { get; set; }
  54. public enum 更新标志
  55. {
  56. 无数据=0,
  57. 有新的程序or私有数据需要下载or发送=1
  58. }
  59. }
  60. }