enum.cs 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  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. };
  46. public class DeviceType
  47. {
  48. public const string DT_FuelDispenser = "DSP";
  49. public const string DT_FuellingPoint = "FP";
  50. public const string DT_TankLevelGauge = "TLG";
  51. public const string DT_TankProbe = "TP";
  52. public const string DT_PricePole = "PP";
  53. public const string DT_PricePolePoint = "PPP";
  54. public const string DT_OutdoorPaymentTerminal = "OPT";
  55. public const string DT_CarWash = "CW";
  56. public const string DT_CarWashPoint = "CWP";
  57. public const string DT_CodeGeneratingDevice = "CGD";
  58. public const string DT_Vir = "VIR";
  59. }
  60. public enum DISPTYPE
  61. {
  62. DISPTYPE_UNDEF = 0,
  63. DISPTYPE_PUMP = 1,
  64. DISPTYPE_OPT = 2,
  65. DISPTYPE_TANK = 3,
  66. DISPTYPE_NOZZLE = 4,
  67. DISPTYPE_POS = 5,
  68. DISPTYPE_BOS = 6,
  69. DISPTYPE_MC = 7,
  70. DISPTYPE_MCLITE = 8,
  71. DISPTYPE_CARDSERVER = 9,
  72. DISPTYPE_TANKLEVELDEVICE = 10,
  73. DISPTYPE_EFTPOSDEVICE = 11,
  74. DISPTYPE_XCONCENTRATOR = 12,
  75. DISPTYPE_TANKGROUP = 13,
  76. DISPTYPE_SURVEILLANCEDEVICE = 14,
  77. DISPTYPE_FORECOURTCONTROLLER = 15,
  78. DISPTYPE_CARWASH = 16,
  79. DISPTYPE_EFTPOSSERVER = 17,
  80. DISPTYPE_GHOSTSTATION = 18,
  81. DISPTYPE_MCLOCAL = 19,
  82. DISPTYPE_ALARMDISPATCHER = 20
  83. }
  84. public enum OverallResult
  85. {
  86. Success,
  87. PartialFailure,
  88. Failure,
  89. DeviceUnavailable,
  90. DeviceDisabled,
  91. WrongDeviceNo,
  92. TimeOut,
  93. FormatError,
  94. ParsingError,
  95. ValidationError,
  96. MissingMandatoryData,
  97. WrongConfiguration,
  98. NoData,
  99. NoLogon,
  100. AuthentificationError
  101. }
  102. public enum FuellingState
  103. {
  104. Undefined = 0,
  105. Payable = 1,
  106. Locked = 2,
  107. Paid = 3,
  108. Cleared = 4
  109. }
  110. public enum FDCVersion
  111. {
  112. V0003 = 0,
  113. V0005 = 1,
  114. V0007 = 2,
  115. V0100 = 3
  116. }
  117. public enum ErrorCode
  118. {
  119. ERRCD_OK = 0, // No error while action
  120. ERRCD_NO = 1, // No error, no action
  121. ERRCD_CTRLERR, // Forcourt controller error
  122. ERRCD_COMMERR, // Communication error
  123. ERRCD_NOTSUP, // Not supported option
  124. ERRCD_READERR, // Cannot read
  125. ERRCD_WRITEERR, // Cannot write
  126. ERRCD_NOTPOSSIBLE, // Action not possible
  127. ERRCD_BADDEVID, // Bad device ID
  128. ERRCD_BADDEVCLASS, // Bad device class
  129. ERRCD_NOTALLOWED, // Action not allowed
  130. ERRCD_INOP, // FDC inoperable
  131. ERRCD_DEVLOCK, // Device locked
  132. ERRCD_DEVOFFL, // Device offline
  133. ERRCD_BADVAL, // Bad property value
  134. ERRCD_NOPERM, // Action not allowed
  135. ERRCD_LIMITERR, // Some limit
  136. ERRCD_NOZZLELOCK, // Referenced nozzle locked
  137. ERRCD_TANKLOCK, // Referenced tank locked
  138. ERRCD_PREPAYERR, // Prepayment not allowed
  139. ERRCD_BADCONF, // Bad forecourt configuration
  140. ERRCD_NOTRANS, // No fuel transaction in DSP transaction buffer
  141. ERRCD_NORESTRANS, // Fuel transaction not reserved for POS
  142. ERRCD_TRANSLOCKED, // Fuel transaction yet locked for another POS
  143. ERRCD_INVTRANS, // Fuel transaction invalid
  144. ERRCD_DISPHWERR, // No fuel transaction handling ok message at hardware
  145. ERRCD_TIMEOUT, // Fuel transaction timed out
  146. ERRCD_UPDFAILED, // Data update on forecourt hardware failed
  147. ERRCD_NOMONEYPRES, // Amount-Prepay not allowed
  148. ERRCD_NOVOLUMEPRES, // Volume preset not allowed
  149. ERRCD_GENAUTHLIMIT, // Maximum number of possible authorisations exceeded (global)
  150. ERRCD_POSAUTHLIMIT, // Maximum number of possible authorisations exceeded (per POS)
  151. ERRCD_OTHER, // Unspecified error
  152. ERRCD_MAXSTACKLIMIT, // Maximum number of unpaind transactions reached (result of failed authorization due to re ached limit).
  153. ERRCD_FPLOCK, // Referenced Fuelling point locked
  154. ERRCD_RESUMEFUEL // Error resume Fuelling
  155. }
  156. public enum POSType
  157. {
  158. Generic = 0,
  159. IXTerminal = 1,
  160. }
  161. public class certificateType
  162. {
  163. public const string NONE = "NONE";
  164. public const string MID = "MID";
  165. public const string ITALY = "ITALY";
  166. }
  167. }