Pump.cs 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. namespace Dfs.WayneChina.IMisPlus.Models
  5. {
  6. /// <summary>
  7. /// Settings/parameters of pump (fueling point) of legacy iFuel system.
  8. /// </summary>
  9. public class Pump
  10. {
  11. #region Constructor
  12. public Pump()
  13. {
  14. Nozzles = new List<Nozzle>();
  15. }
  16. #endregion
  17. /// <summary>
  18. /// Id of the pump.
  19. /// Sps Field: `LgNode`, type: tinyint(1)
  20. /// </summary>
  21. public byte Id { get; set; }
  22. /// <summary>
  23. /// Type of dispenser, 0=Hengshan,1=TQC
  24. /// Sps Field: `DspNo`, type: char(6).
  25. /// </summary>
  26. public byte DispType { get; set; }
  27. /// <summary>
  28. /// Type of the dispenser, Fuel dispenser or CNG or LNG dispenser.
  29. /// ** This is a custom field.
  30. /// </summary>
  31. public string DispTypeName { get; set; }
  32. /// <summary>
  33. /// Fueling point type, 0=Fuel, 1=LNG, 2=CNG
  34. /// Sps Field: `PumpType`, type: byte.
  35. /// </summary>
  36. public byte PumpType { get; set; }
  37. /// <summary>
  38. /// Number of the fuel tank.
  39. /// Sps Field: `TankNo`, type: int(2)
  40. /// </summary>
  41. public ushort TankId { get; set; }
  42. /// <summary>
  43. /// ID of the associated POS.
  44. /// Sps Field: `PosID`, type: tinyint(1)
  45. /// </summary>
  46. public byte PosId { get; set; }
  47. /// <summary>
  48. /// Application protocol, 1=IFSF, 2=Hengshan...
  49. /// Sps Field: `Protocol`, type: int(2)
  50. /// </summary>
  51. public ushort AppProtocol { get; set; }
  52. /// <summary>
  53. /// Type of communication protocol, 0=TCP, 1=COM.
  54. /// Sps Field: `ProtcType`, type: byte
  55. /// </summary>
  56. public byte ProtocolType { get; set; }
  57. /// <summary>
  58. /// Listening port.
  59. /// Sps Field: `Port`, type: char(16).
  60. /// </summary>
  61. public string Port { get; set; }
  62. /// <summary>
  63. /// Serial port number in case that serial communication is used.
  64. /// Sps Field: `LinkPort`, type: int(2)
  65. /// </summary>
  66. public ushort SerialPort { get; set; }
  67. /// <summary>
  68. /// Communication node.
  69. /// Sps Field: `Node`, type: int(2)
  70. /// </summary>
  71. public ushort Node { get; set; }
  72. /// <summary>
  73. /// Sub-address of the pump, multiple pumps on the same serial port is supported.
  74. /// Sps Field: `SubNode`, type: int(2)
  75. /// </summary>
  76. public byte SubAddress { get; set; }
  77. /// <summary>
  78. /// The work mode of the pump. 0=Locked, 1=Auto Auth, 2=Manual Auth.
  79. /// Sps Field: `Mode`, type: byte.
  80. /// </summary>
  81. public byte Mode { get; set; }
  82. /// <summary>
  83. /// Mode of checkout, e.g self-service, manual etc.
  84. /// </summary>
  85. public byte CheckOutMode { get; set; }
  86. /// <summary>
  87. /// Count of nozzles.
  88. /// `NozzleNum`
  89. /// </summary>
  90. public byte NozzleCount
  91. {
  92. get
  93. {
  94. if (Nozzles != null)
  95. {
  96. return Convert.ToByte(Nozzles.Count);
  97. }
  98. return 0;
  99. }
  100. }
  101. /// <summary>
  102. /// Delay parameter.
  103. /// Sps Field: `DelayPara`, type: byte.
  104. /// </summary>
  105. public byte DelayParam { get; set; }
  106. /// <summary>
  107. /// Size of the unpaid transactions stack
  108. /// Sps Field: `BuffSize`, type: byte
  109. /// </summary>
  110. public byte PayStackSize { get; set; }
  111. /// <summary>
  112. /// Maximum amount of an authorized filling.
  113. /// Sps Field: `MaxMON`, type: uint(4)
  114. /// </summary>
  115. public uint MaxAmount { get; set; }
  116. /// <summary>
  117. /// Maximum volume of an authorized filling.
  118. /// Sps Field: `MaxVOL`, type: uint(4)
  119. /// </summary>
  120. public uint MaxVolume { get; set; }
  121. /// <summary>
  122. /// Associated nozzles of a fueling poing.
  123. /// </summary>
  124. public IList<Nozzle> Nozzles { get; set; }
  125. }
  126. }