PcReadPumpInfoResponse.cs 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  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 LanTian_Sinopec_PumpIcCardReader
  7. {
  8. /// <summary>
  9. /// 加油机上送加油机信息命令
  10. /// 功能:加油机上送加油机信息
  11. /// </summary>
  12. public class PcReadPumpInfoResponse : KaJiLianDongV11MessageTemplateBase
  13. {
  14. /// <summary>
  15. /// 前对齐,后补空格
  16. /// </summary>
  17. [Format(12, EncodingType.ASCII, 1)]
  18. public string M_INFO_厂家信息 { get; set; }
  19. /// <summary>
  20. /// 石化编码规范中地区编码的头两个数字
  21. /// </summary>
  22. [Format(1, EncodingType.BCD, 2)]
  23. [Range(0, 99, "")]
  24. public byte Prov_省代号 { get; set; }
  25. /// <summary>
  26. /// 石化编码规范中地区编码的中间两个数字
  27. /// </summary>
  28. [Range(0, 99, "")]
  29. [Format(1, EncodingType.BCD, 3)]
  30. public byte City_地市代码 { get; set; }
  31. /// <summary>
  32. /// 同石化编码
  33. /// </summary>
  34. [Format(4, EncodingType.BcdString, 4)]
  35. public string Superior_上级单位代号 { get; set; }
  36. /// <summary>
  37. /// 同石化编码
  38. /// </summary>
  39. [Format(4, EncodingType.BcdString, 5)]
  40. public string S_ID_加油站ID { get; set; }
  41. [Format(7, EncodingType.BcdString, 6)]
  42. public string Raw_TIME { get; private set; }
  43. public DateTime TIME_加液机时间
  44. {
  45. get { return DateTime.Parse(this.Raw_TIME); }
  46. set { this.Raw_TIME = value.ToString("yyyyMMddHHmmss"); }
  47. }
  48. //public void SetPcTime(DateTime dateTime)
  49. //{
  50. // var str = dateTime.ToString("yyyyMMddHHmmss");
  51. // this.TIME_Raw = long.Parse(str);
  52. //}
  53. /// <summary>
  54. ///
  55. /// </summary>
  56. [Format(1, EncodingType.BIN, 7)]
  57. public byte GUN_N_油枪数 { get; set; }
  58. [EnumerableFormat("GUN_N_油枪数", 8, EncodingType = EncodingType.BIN)]
  59. public List<byte> MZN_单个油枪 { get; set; }
  60. /// <summary>
  61. /// 基础黑名单版本号
  62. /// </summary>
  63. [Format(2, EncodingType.BIN, 9)]
  64. public int BL_VER { get; set; }
  65. /// <summary>
  66. /// 新增黑名单版本
  67. /// </summary>
  68. [Format(1, EncodingType.BIN, 10)]
  69. public byte ADD_BL_VER { get; set; }
  70. /// <summary>
  71. /// 新删黑名单版本
  72. /// </summary>
  73. [Format(1, EncodingType.BIN, 11)]
  74. public byte DEL_BL_VER { get; set; }
  75. /// <summary>
  76. /// 白名单版本号
  77. /// </summary>
  78. [Format(1, EncodingType.BIN, 12)]
  79. public byte WH_VER { get; set; }
  80. /// <summary>
  81. /// 油品油价版本
  82. /// </summary>
  83. [Format(1, EncodingType.BIN, 13)]
  84. public byte PRC_VER { get; set; }
  85. /// <summary>
  86. /// 油站通用信息版本
  87. /// </summary>
  88. [Format(1, EncodingType.BIN, 14)]
  89. public byte Sta_VER { get; set; }
  90. [EnumerableFormat("%cascade", 15, EncodingType = EncodingType.BIN)]
  91. public List<byte> M_DATA_厂家自定义数据 { get; set; }
  92. }
  93. }