PcGenericInquiryRequest.cs 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. using Edge.Core.Parser.BinaryParser.Attributes;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Runtime.CompilerServices;
  6. using System.Text;
  7. namespace LanTian_Sinopec_PumpIcCardReader
  8. {
  9. /// <summary>
  10. /// 加油机对 PC 机普通查询命令 30H
  11. /// PC 机对加油机普通查询命令 30H
  12. /// </summary>
  13. public class PcGenericInquiryRequest : KaJiLianDongV11MessageTemplateBase
  14. {
  15. public enum RequestType
  16. {
  17. //加油机对PC机普通查询命令30H = 0x30,
  18. PC机对加油机普通查询命令30H = 0x30,
  19. //加油机发送实时信息命令31H = 0x31
  20. }
  21. public PcGenericInquiryRequest()
  22. {
  23. base.HANDLE = 0x30;
  24. base.SetMessageCallerSide(MessageCallerSide.PC);
  25. }
  26. [Format(7, EncodingType.BcdString, 1)]
  27. public string Raw_PC_TIME { get; private set; }
  28. public DateTime PC_TIME
  29. {
  30. get { return DateTime.Parse(this.Raw_PC_TIME); }
  31. set { this.Raw_PC_TIME = value.ToString("yyyyMMddHHmmss"); }
  32. }
  33. /// <summary>
  34. /// 基础黑名单版本号
  35. /// </summary>
  36. [Format(2, EncodingType.BIN, 2)]
  37. public int BL_VER { get; set; }
  38. /// <summary>
  39. /// 新增黑名单版本
  40. /// </summary>
  41. [Format(1, EncodingType.BIN, 3)]
  42. public byte ADD_BL_VER { get; set; }
  43. /// <summary>
  44. /// 新删黑名单版本
  45. /// </summary>
  46. [Format(1, EncodingType.BIN, 4)]
  47. public byte DEL_BL_VER { get; set; }
  48. /// <summary>
  49. /// 白名单版本号
  50. /// </summary>
  51. [Format(1, EncodingType.BIN, 5)]
  52. public byte WH_VER { get; set; }
  53. /// <summary>
  54. /// 液品液价版本
  55. /// </summary>
  56. [Format(1, EncodingType.BIN, 6)]
  57. public byte PRC_VER { get; set; }
  58. /// <summary>
  59. /// 液站通用信息版本
  60. /// </summary>
  61. [Format(1, EncodingType.BIN, 7)]
  62. public byte Sta_VER { get; set; }
  63. /// <summary>
  64. /// 加液机初始化数据更新标志
  65. /// </summary>
  66. [Format(1, EncodingType.BIN, 8)]
  67. public 更新标志 SELF_D_VER { get; set; }
  68. /// <summary>
  69. /// 加液机程序下载更新标记
  70. /// </summary>
  71. [Format(1, EncodingType.BIN, 9)]
  72. public 更新标志 SOFT_FLAG { get; set; }
  73. public enum 更新标志
  74. {
  75. 无数据 = 0,
  76. 有新的程序or私有数据需要下载or发送 = 1
  77. }
  78. public override string ToLogString()
  79. {
  80. return base.ToLogString() + " caller: " + this.GetMessageCallerSide() + ", SeqNo.: " + this.MessageSequenceNumber;
  81. }
  82. }
  83. }