enum.cs 5.6 KB

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