StandardConfiguration.cs 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. namespace OCPPPackage.Profiles
  7. {
  8. public static class StandardConfiguration
  9. {
  10. #region Core Profile
  11. public const string AllowOfflineTxForUnknownId = "AllowOfflineTxForUnknownId";
  12. public const string AuthorizationCacheEnabled = "AuthorizationCacheEnabled";
  13. public const string AuthorizeRemoteTxRequests = "AuthorizeRemoteTxRequests";
  14. public const string BlinkRepeat = "BlinkRepeat";
  15. public const string ClockAlignedDataInterval = "ClockAlignedDataInterval";
  16. public const string ConnectionTimeOut = "ConnectionTimeOut";
  17. public const string GetConfigurationMaxKeys = "GetConfigurationMaxKeys";
  18. public const string HeartbeatInterval = "HeartbeatInterval";
  19. public const string LightIntensity = "LightIntensity";
  20. public const string LocalAuthorizeOffline = "LocalAuthorizeOffline";
  21. public const string LocalPreAuthorize = "LocalPreAuthorize";
  22. public const string MaxEnergyOnInvalidId = "MaxEnergyOnInvalidId";
  23. public const string MeterValuesAlignedData = "MeterValuesAlignedData";
  24. public const string MeterValuesAlignedDataMaxLength = "MeterValuesAlignedDataMaxLength";
  25. public const string MeterValuesSampledData = "MeterValuesSampledData";
  26. public const string MeterValuesSampledDataMaxLength = "MeterValuesSampledDataMaxLength";
  27. public const string MeterValueSampleInterval = "MeterValueSampleInterval";
  28. public const string MinimumStatusDuration = "MinimumStatusDuration";
  29. public const string NumberOfConnectors = "NumberOfConnectors";
  30. public const string ResetRetries = "ResetRetries";
  31. public const string ConnectorPhaseRotation = "ConnectorPhaseRotation";
  32. public const string ConnectorPhaseRotationMaxLength = "ConnectorPhaseRotationMaxLength";
  33. public const string StopTransactionOnEVSideDisconnect = "StopTransactionOnEVSideDisconnect";
  34. public const string StopTransactionOnInvalidId = "StopTransactionOnInvalidId";
  35. public const string StopTxnAlignedData = "StopTxnAlignedData";
  36. public const string StopTxnAlignedDataMaxLength = "StopTxnAlignedDataMaxLength";
  37. public const string StopTxnSampledData = "StopTxnSampledData";
  38. public const string StopTxnSampledDataMaxLength = "StopTxnSampledDataMaxLength";
  39. public const string SupportedFeatureProfiles = "SupportedFeatureProfiles";
  40. public const string SupportedFeatureProfilesMaxLength = "SupportedFeatureProfilesMaxLength";
  41. public const string TransactionMessageAttempts = "TransactionMessageAttempts";
  42. public const string TransactionMessageRetryInterval = "TransactionMessageRetryInterval";
  43. public const string UnlockConnectorOnEVSideDisconnect = "UnlockConnectorOnEVSideDisconnect";
  44. public const string WebSocketPingInterval = "WebSocketPingInterval";
  45. #endregion
  46. #region Local Auth List Management Profile
  47. public const string LocalAuthListEnabled = "LocalAuthListEnabled";
  48. public const string LocalAuthListMaxLength = "LocalAuthListMaxLength";
  49. public const string SendLocalListMaxLength = "SendLocalListMaxLength";
  50. #endregion
  51. #region Reservation Profile
  52. public const string ReserveConnectorZeroSupported = "ReserveConnectorZeroSupported";
  53. #endregion
  54. #region Smart Charging Profile
  55. public const string ChargeProfileMaxStackLevel = "ChargeProfileMaxStackLevel";
  56. public const string ChargingScheduleAllowedChargingRateUnit = "ChargingScheduleAllowedChargingRateUnit";
  57. public const string ChargingScheduleMaxPeriods = "ChargingScheduleMaxPeriods";
  58. public const string ConnectorSwitch3to1PhaseSupported = "ConnectorSwitch3to1PhaseSupported";
  59. public const string MaxChargingProfilesInstalled = "MaxChargingProfilesInstalled";
  60. #endregion
  61. #region Security
  62. public const string AdditionalRootCertificateCheck = "AdditionalRootCertificateCheck";
  63. public const string AuthorizationKey = "AuthorizationKey";
  64. public const string CertificateSignedMaxChainSize = "CertificateSignedMaxChainSize";
  65. public const string CertificateStoreMaxLength = "CertificateStoreMaxLength";
  66. public const string CpoName = "CpoName";
  67. public const string SecurityProfile = "SecurityProfile";
  68. #endregion
  69. public static readonly List<string> AllConfigs = new List<string>()
  70. {
  71. GetConfigurationMaxKeys,
  72. SupportedFeatureProfiles,
  73. NumberOfConnectors,
  74. SupportedFeatureProfilesMaxLength,
  75. StopTransactionOnEVSideDisconnect,
  76. StopTransactionOnInvalidId,
  77. StopTxnAlignedData,
  78. StopTxnAlignedDataMaxLength,
  79. StopTxnSampledData,
  80. StopTxnSampledDataMaxLength,
  81. TransactionMessageAttempts,
  82. TransactionMessageRetryInterval,
  83. MaxEnergyOnInvalidId,
  84. MeterValuesAlignedData,
  85. MeterValuesAlignedDataMaxLength,
  86. MeterValuesSampledData,
  87. MeterValuesSampledDataMaxLength,
  88. WebSocketPingInterval,
  89. MeterValueSampleInterval,
  90. MinimumStatusDuration,
  91. UnlockConnectorOnEVSideDisconnect,
  92. ResetRetries,
  93. AllowOfflineTxForUnknownId,
  94. AuthorizationCacheEnabled,
  95. AuthorizeRemoteTxRequests,
  96. BlinkRepeat,
  97. ClockAlignedDataInterval,
  98. ConnectionTimeOut,
  99. ConnectorPhaseRotation,
  100. ConnectorPhaseRotationMaxLength,
  101. HeartbeatInterval,
  102. LightIntensity,
  103. LocalAuthorizeOffline,
  104. LocalPreAuthorize,
  105. LocalAuthListEnabled,
  106. LocalAuthListMaxLength,
  107. SendLocalListMaxLength,
  108. ReserveConnectorZeroSupported,
  109. ChargeProfileMaxStackLevel,
  110. ChargingScheduleAllowedChargingRateUnit,
  111. ChargingScheduleMaxPeriods,
  112. ConnectorSwitch3to1PhaseSupported,
  113. MaxChargingProfilesInstalled,
  114. AdditionalRootCertificateCheck,
  115. AuthorizationKey,
  116. CertificateSignedMaxChainSize,
  117. CertificateStoreMaxLength,
  118. CpoName,
  119. SecurityProfile
  120. };
  121. public static bool Contains(List<string> configs)
  122. {
  123. foreach (var item in configs)
  124. {
  125. if (!AllConfigs.Contains(item))
  126. return false;
  127. }
  128. return true;
  129. }
  130. }
  131. }