enum.cs 6.3 KB

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