enum.cs 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. namespace Edge.Core.IndustryStandardInterface.Pump.Fdc
  7. {
  8. public static class Define
  9. {
  10. public static int HeaderLength = 4;
  11. public static int EncriptionLength = 16;
  12. //public static string DateSep = @"-";
  13. //public static string TimeSep = @":";
  14. //public static string DateFormat = @"yyyy" + DateSep + "MM" + DateSep + "dd" + " " + "HH" + TimeSep + "mm" + TimeSep + "ss";
  15. public static string DateFormatV03 = @"yyyy-MM-dd HH:mm:ss";
  16. public static string DateFormatV05 = @"yyyy-MM-ddTHH:mm:ss";
  17. }
  18. public enum NozzleState
  19. {
  20. NozzleDown = 0,
  21. NozzleUp = 1
  22. }
  23. public enum LogicalState
  24. {
  25. Unlocked = 0,
  26. Locked = 1
  27. }
  28. public enum LogicalDeviceState
  29. {
  30. FDC_UNDEFINED = -1,
  31. FDC_CONFIGURE = 0,
  32. FDC_DISABLED = 1,
  33. /// <summary>
  34. /// device is connected, but device is in a state that still can't be operated.
  35. /// </summary>
  36. FDC_ERRORSTATE = 2,
  37. FDC_FUELLING = 3,
  38. FDC_INVALIDSTATE = 4,
  39. FDC_LOCKED = 5,
  40. FDC_OFFLINE = 6,
  41. FDC_OUTOFORDER = 7,
  42. FDC_READY = 8,
  43. FDC_REQUESTED = 9,
  44. FDC_STARTED = 10,
  45. FDC_SUSPENDED = 11,
  46. FDC_CALLING = 12,
  47. FDC_TEST = 13,
  48. FDC_SUSPENDED_STARTED = 14, // Added in FDC version 00.05
  49. FDC_SUSPENDED_FUELLING = 15,
  50. FDC_CLOSED = 16,
  51. FDC_AUTHORISED = 17, // Added in FDC version 00.07
  52. };
  53. public class DeviceType
  54. {
  55. public const string DT_FuelDispenser = "DSP";
  56. public const string DT_FuellingPoint = "FP";
  57. public const string DT_TankLevelGauge = "TLG";
  58. public const string DT_TankProbe = "TP";
  59. public const string DT_PricePole = "PP";
  60. public const string DT_PricePolePoint = "PPP";
  61. public const string DT_OutdoorPaymentTerminal = "OPT";
  62. public const string DT_CarWash = "CW";
  63. public const string DT_CarWashPoint = "CWP";
  64. public const string DT_CodeGeneratingDevice = "CGD";
  65. }
  66. public enum DISPTYPE
  67. {
  68. DISPTYPE_UNDEF = 0,
  69. DISPTYPE_PUMP = 1,
  70. DISPTYPE_OPT = 2,
  71. DISPTYPE_TANK = 3,
  72. DISPTYPE_NOZZLE = 4,
  73. DISPTYPE_POS = 5,
  74. DISPTYPE_BOS = 6,
  75. DISPTYPE_MC = 7,
  76. DISPTYPE_MCLITE = 8,
  77. DISPTYPE_CARDSERVER = 9,
  78. DISPTYPE_TANKLEVELDEVICE = 10,
  79. DISPTYPE_EFTPOSDEVICE = 11,
  80. DISPTYPE_XCONCENTRATOR = 12,
  81. DISPTYPE_TANKGROUP = 13,
  82. DISPTYPE_SURVEILLANCEDEVICE = 14,
  83. DISPTYPE_FORECOURTCONTROLLER = 15,
  84. DISPTYPE_CARWASH = 16,
  85. DISPTYPE_EFTPOSSERVER = 17,
  86. DISPTYPE_GHOSTSTATION = 18,
  87. DISPTYPE_MCLOCAL = 19,
  88. DISPTYPE_ALARMDISPATCHER = 20
  89. }
  90. public enum OverallResult
  91. {
  92. Success,
  93. PartialFailure,
  94. Failure,
  95. DeviceUnavailable,
  96. DeviceDisabled,
  97. WrongDeviceNo,
  98. TimeOut,
  99. FormatError,
  100. ParsingError,
  101. ValidationError,
  102. MissingMandatoryData,
  103. WrongConfiguration,
  104. NoData,
  105. NoLogon,
  106. AuthentificationError
  107. }
  108. public enum FuellingState
  109. {
  110. Undefined = 0,
  111. Payable = 1,
  112. Locked = 2,
  113. Paid = 3,
  114. Cleared = 4
  115. }
  116. public enum FDCVersion
  117. {
  118. V0003 = 0,
  119. V0005 = 1,
  120. V0007 = 2
  121. }
  122. public enum ErrorCode
  123. {
  124. ERRCD_OK = 0, // No error while action
  125. ERRCD_NO = 1, // No error, no action
  126. ERRCD_CTRLERR, // Forcourt controller error
  127. ERRCD_COMMERR, // Communication error
  128. ERRCD_NOTSUP, // Not supported option
  129. ERRCD_READERR, // Cannot read
  130. ERRCD_WRITEERR, // Cannot write
  131. ERRCD_NOTPOSSIBLE, // Action not possible
  132. ERRCD_BADDEVID, // Bad device ID
  133. ERRCD_BADDEVCLASS, // Bad device class
  134. ERRCD_NOTALLOWED, // Action not allowed
  135. ERRCD_INOP, // FDC inoperable
  136. ERRCD_DEVLOCK, // Device locked
  137. ERRCD_DEVOFFL, // Device offline
  138. ERRCD_BADVAL, // Bad property value
  139. ERRCD_NOPERM, // Action not allowed
  140. ERRCD_LIMITERR, // Some limit
  141. ERRCD_NOZZLELOCK, // Referenced nozzle locked
  142. ERRCD_TANKLOCK, // Referenced tank locked
  143. ERRCD_PREPAYERR, // Prepayment not allowed
  144. ERRCD_BADCONF, // Bad forecourt configuration
  145. ERRCD_NOTRANS, // No fuel transaction in DSP transaction buffer
  146. ERRCD_NORESTRANS, // Fuel transaction not reserved for POS
  147. ERRCD_TRANSLOCKED, // Fuel transaction yet locked for another POS
  148. ERRCD_INVTRANS, // Fuel transaction invalid
  149. ERRCD_DISPHWERR, // No fuel transaction handling ok message at hardware
  150. ERRCD_TIMEOUT, // Fuel transaction timed out
  151. ERRCD_UPDFAILED, // Data update on forecourt hardware failed
  152. ERRCD_NOMONEYPRES, // Amount-Prepay not allowed
  153. ERRCD_NOVOLUMEPRES, // Volume preset not allowed
  154. ERRCD_GENAUTHLIMIT, // Maximum number of possible authorisations exceeded (global)
  155. ERRCD_POSAUTHLIMIT, // Maximum number of possible authorisations exceeded (per POS)
  156. ERRCD_OTHER, // Unspecified error
  157. ERRCD_MAXSTACKLIMIT, // Maximum number of unpaind transactions reached (result of failed authorization due to re ached limit).
  158. ERRCD_FPLOCK, // Referenced Fuelling point locked
  159. ERRCD_RESUMEFUEL // Error resume Fuelling
  160. }
  161. public enum POSType
  162. {
  163. Generic = 0,
  164. IXTerminal = 1,
  165. }
  166. public class certificateType
  167. {
  168. public const string NONE = "NONE";
  169. public const string MID = "MID";
  170. public const string ITALY = "ITALY";
  171. }
  172. }