CheckCmdRequest.cs 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. using Edge.Core.Parser.BinaryParser.Attributes;
  2. using HengshanPaymentTerminal.Support;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Linq;
  6. using System.Text;
  7. using System.Threading.Tasks;
  8. namespace HengshanPaymentTerminal.MessageEntity.Incoming
  9. {
  10. /// <summary>
  11. /// Inquiry request from pump against system/EPS.
  12. /// 加油机查询命令Check_cmd,空闲时对后台发,命令字0x10.
  13. /// </summary>
  14. public class CheckCmdRequest : CardMessageBase
  15. {
  16. public CheckCmdRequest() : base(Command.Check_cmd)
  17. {
  18. }
  19. [Format(4, EncodingType.HexString, -90)]
  20. public string TerminalId { get; set; }
  21. /// <summary>
  22. /// Fueling point code, first byte is nozzle number, second pump number.
  23. /// 加油点,字节1为枪号,字节2为泵号。
  24. /// </summary>
  25. [Format(2, EncodingType.HexString, -89)]
  26. public string FPCode { get; set; }
  27. [Format(1, EncodingType.BIN, -88)]
  28. public byte WorkMode { get; set; }
  29. //public WorkMode WorkMode { get; set; }
  30. [Format(1, EncodingType.BIN, -87)]
  31. public byte DispenserState { get; set; }
  32. //public DispenserState DispenserState { get; set; }
  33. [Format(1, EncodingType.BIN, -86)]
  34. public int AuthState { get; set; }
  35. [Format(3, EncodingType.BIN, -85)]
  36. public int Amount { get; set; }
  37. [Format(3, EncodingType.BIN, -84)]
  38. public int Volume { get; set; }
  39. [Format(2, EncodingType.BIN, -83)]
  40. public int Price { get; set; }
  41. #region Specified but not appeared
  42. //probably these are used when it's a CNG/LNG pump
  43. public int ValveNo { get; set; }
  44. public int PressureValue { get; set; }
  45. public int FlowValue { get; set; }
  46. public int Temperature { get; set; }
  47. public byte LockState { get; set; }
  48. public FuelingPointCode FuelingPoint
  49. {
  50. get
  51. {
  52. return new FuelingPointCode
  53. {
  54. NozzleNo = FPCode.Substring(0, 2).ToByte(),
  55. PumpNo = FPCode.Substring(2, 2).ToByte()
  56. };
  57. }
  58. }
  59. #endregion
  60. }
  61. }