Skip to content

Commit dcf4e28

Browse files
committed
refactor
1 parent 9bd4e22 commit dcf4e28

2 files changed

Lines changed: 56 additions & 56 deletions

File tree

src/main/java/de/rwth/idsg/steve/web/dto/ocpp/ConfigurationKeyEnum.java

Lines changed: 48 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -19,57 +19,57 @@
1919
*/
2020
public enum ConfigurationKeyEnum {
2121
// From Ocpp 1.2
22-
HeartBeatInterval("HeartBeatInterval", "in seconds", RW , newHashSet(V_12, V_15, V_16)),
23-
ConnectionTimeOut("ConnectionTimeOut", "in seconds", RW , newHashSet(V_12, V_15, V_16)),
24-
ProximityContactRetries("ProximityContactRetries", "in times", RW , newHashSet(V_12, V_15, V_16)),
25-
ProximityLockRetries("ProximityLockRetries", "in times", RW , newHashSet(V_12, V_15, V_16)),
26-
ResetRetries("ResetRetries", "in times", RW , newHashSet(V_12, V_15, V_16)),
27-
BlinkRepeat("BlinkRepeat", "in times", RW , newHashSet(V_12, V_15, V_16)),
28-
LightIntensity("LightIntensity", "in %", RW , newHashSet(V_12, V_15, V_16)),
29-
ChargePointId("ChargePointId", "string", RW , newHashSet(V_12, V_15, V_16)),
30-
MeterValueSampleInterval("MeterValueSampleInterval", "in seconds", RW , newHashSet(V_12, V_15, V_16)),
22+
HeartBeatInterval("HeartBeatInterval", "in seconds", RW, newHashSet(V_12, V_15, V_16)),
23+
ConnectionTimeOut("ConnectionTimeOut", "in seconds", RW, newHashSet(V_12, V_15, V_16)),
24+
ProximityContactRetries("ProximityContactRetries", "in times", RW, newHashSet(V_12, V_15, V_16)),
25+
ProximityLockRetries("ProximityLockRetries", "in times", RW, newHashSet(V_12, V_15, V_16)),
26+
ResetRetries("ResetRetries", "in times", RW, newHashSet(V_12, V_15, V_16)),
27+
BlinkRepeat("BlinkRepeat", "in times", RW, newHashSet(V_12, V_15, V_16)),
28+
LightIntensity("LightIntensity", "in %", RW, newHashSet(V_12, V_15, V_16)),
29+
ChargePointId("ChargePointId", "string", RW, newHashSet(V_12, V_15, V_16)),
30+
MeterValueSampleInterval("MeterValueSampleInterval", "in seconds", RW, newHashSet(V_12, V_15, V_16)),
3131

3232
// New in Ocpp 1.5
33-
ClockAlignedDataInterval("ClockAlignedDataInterval", "in seconds", RW , newHashSet(V_15, V_16)),
34-
MeterValuesSampledData("MeterValuesSampledData", "comma seperated list", RW , newHashSet(V_15, V_16)),
35-
MeterValuesAlignedData("MeterValuesAlignedData", "comma seperated list", RW , newHashSet(V_15, V_16)),
36-
StopTxnSampledData("StopTxnSampledData", "comma seperated list", RW , newHashSet(V_15, V_16)),
37-
StopTxnAlignedData("StopTxnAlignedData", "comma seperated list", RW , newHashSet(V_15, V_16)),
33+
ClockAlignedDataInterval("ClockAlignedDataInterval", "in seconds", RW, newHashSet(V_15, V_16)),
34+
MeterValuesSampledData("MeterValuesSampledData", "comma seperated list", RW, newHashSet(V_15, V_16)),
35+
MeterValuesAlignedData("MeterValuesAlignedData", "comma seperated list", RW, newHashSet(V_15, V_16)),
36+
StopTxnSampledData("StopTxnSampledData", "comma seperated list", RW, newHashSet(V_15, V_16)),
37+
StopTxnAlignedData("StopTxnAlignedData", "comma seperated list", RW, newHashSet(V_15, V_16)),
3838

3939
// New in Ocpp 1.6
40-
AllowOfflineTxForUnknownId("AllowOfflineTxForUnknownId", "boolean", RW , newHashSet(V_16)),
41-
AuthorizationCacheEnabled("AuthorizationCacheEnabled", "boolean", RW , newHashSet(V_16)),
42-
//AuthorizeRemoteTxRequests Read or Read-Write is up to Charge Point implementation so set to RW for now
43-
AuthorizeRemoteTxRequests("AuthorizeRemoteTxRequests", "boolean", RW , newHashSet(V_16)),
44-
ConnectorPhaseRotation("ConnectorPhaseRotation", "comma seperated list", RW , newHashSet(V_16)),
45-
ConnectorPhaseRotationMaxLength("ConnectorPhaseRotationMaxLength", "integer", R , newHashSet(V_16)),
46-
GetConfigurationMaxKeys("GetConfigurationMaxKeys", "integer", R , newHashSet(V_16)),
47-
LocalAuthorizeOffline("LocalAuthorizeOffline", "boolean", RW , newHashSet(V_16)),
48-
LocalPreAuthorize("LocalPreAuthorize", "boolean", RW , newHashSet(V_16)),
49-
MaxEnergyOnInvalidId("MaxEnergyOnInvalidId", "in Wh", RW , newHashSet(V_16)),
50-
MeterValuesAlignedDataMaxLength("MeterValuesAlignedDataMaxLength", "integer", R , newHashSet(V_16)),
51-
MeterValuesSampledDataMaxLength("MeterValuesSampledDataMaxLength", "integer", R , newHashSet(V_16)),
52-
MinimumStatusDuration("MinimumStatusDuration", "in seconds", RW , newHashSet(V_16)),
53-
NumberOfConnectors("NumberOfConnectors", "integer", R , newHashSet(V_16)),
54-
StopTransactionOnEVSideDisconnect("StopTransactionOnEVSideDisconnect", "boolean", RW , newHashSet(V_16)),
55-
StopTransactionOnInvalidId("StopTransactionOnInvalidId", "boolean", RW , newHashSet(V_16)),
56-
StopTxnAlignedDataMaxLength("StopTxnAlignedDataMaxLength", "integer", R , newHashSet(V_16)),
57-
StopTxnSampledDataMaxLength("StopTxnSampledDataMaxLength", "integer", R , newHashSet(V_16)),
58-
SupportedFeatureProfiles("SupportedFeatureProfiles", "comma seperated list", R , newHashSet(V_16)),
59-
SupportedFeatureProfilesMaxLength("SupportedFeatureProfilesMaxLength", "integer", R , newHashSet(V_16)),
60-
TransactionMessageAttempts("TransactionMessageAttempts", "in times", RW , newHashSet(V_16)),
61-
TransactionMessageRetryInterval("TransactionMessageRetryInterval", "in seconds", RW , newHashSet(V_16)),
62-
UnlockConnectorOnEVSideDisconnect("UnlockConnectorOnEVSideDisconnect", "boolean", RW , newHashSet(V_16)),
63-
WebSocketPingInterval("WebSocketPingInterval", "in seconds", RW , newHashSet(V_16)),
64-
LocalAuthListEnabled("LocalAuthListEnabled", "boolean", RW , newHashSet(V_16)),
65-
LocalAuthListMaxLength("LocalAuthListMaxLength", "integer", R , newHashSet(V_16)),
66-
SendLocalListMaxLength("SendLocalListMaxLength", "integer", R , newHashSet(V_16)),
67-
ReserveConnectorZeroSupported("ReserveConnectorZeroSupported", "boolean", R , newHashSet(V_16)),
68-
ChargeProfileMaxStackLevel("ChargeProfileMaxStackLevel", "integer", R , newHashSet(V_16)),
69-
ChargingScheduleAllowedChargingRateUnit("ChargingScheduleAllowedChargingRateUnit", "comma seperated list", R , newHashSet(V_16)),
70-
ChargingScheduleMaxPeriods("ChargingScheduleMaxPeriods", "integer", R , newHashSet(V_16)),
71-
ConnectorSwitch3to1PhaseSupported("ConnectorSwitch3to1PhaseSupported", "boolean", R , newHashSet(V_16)),
72-
MaxChargingProfilesInstalled("MaxChargingProfilesInstalled", "integer", R , newHashSet(V_16));
40+
AllowOfflineTxForUnknownId("AllowOfflineTxForUnknownId", "boolean", RW, newHashSet(V_16)),
41+
AuthorizationCacheEnabled("AuthorizationCacheEnabled", "boolean", RW, newHashSet(V_16)),
42+
// AuthorizeRemoteTxRequests Read or Read-Write is up to Charge Point implementation so set to RW for now
43+
AuthorizeRemoteTxRequests("AuthorizeRemoteTxRequests", "boolean", RW, newHashSet(V_16)),
44+
ConnectorPhaseRotation("ConnectorPhaseRotation", "comma seperated list", RW, newHashSet(V_16)),
45+
ConnectorPhaseRotationMaxLength("ConnectorPhaseRotationMaxLength", "integer", R, newHashSet(V_16)),
46+
GetConfigurationMaxKeys("GetConfigurationMaxKeys", "integer", R, newHashSet(V_16)),
47+
LocalAuthorizeOffline("LocalAuthorizeOffline", "boolean", RW, newHashSet(V_16)),
48+
LocalPreAuthorize("LocalPreAuthorize", "boolean", RW, newHashSet(V_16)),
49+
MaxEnergyOnInvalidId("MaxEnergyOnInvalidId", "in Wh", RW, newHashSet(V_16)),
50+
MeterValuesAlignedDataMaxLength("MeterValuesAlignedDataMaxLength", "integer", R, newHashSet(V_16)),
51+
MeterValuesSampledDataMaxLength("MeterValuesSampledDataMaxLength", "integer", R, newHashSet(V_16)),
52+
MinimumStatusDuration("MinimumStatusDuration", "in seconds", RW, newHashSet(V_16)),
53+
NumberOfConnectors("NumberOfConnectors", "integer", R, newHashSet(V_16)),
54+
StopTransactionOnEVSideDisconnect("StopTransactionOnEVSideDisconnect", "boolean", RW, newHashSet(V_16)),
55+
StopTransactionOnInvalidId("StopTransactionOnInvalidId", "boolean", RW, newHashSet(V_16)),
56+
StopTxnAlignedDataMaxLength("StopTxnAlignedDataMaxLength", "integer", R, newHashSet(V_16)),
57+
StopTxnSampledDataMaxLength("StopTxnSampledDataMaxLength", "integer", R, newHashSet(V_16)),
58+
SupportedFeatureProfiles("SupportedFeatureProfiles", "comma seperated list", R, newHashSet(V_16)),
59+
SupportedFeatureProfilesMaxLength("SupportedFeatureProfilesMaxLength", "integer", R, newHashSet(V_16)),
60+
TransactionMessageAttempts("TransactionMessageAttempts", "in times", RW, newHashSet(V_16)),
61+
TransactionMessageRetryInterval("TransactionMessageRetryInterval", "in seconds", RW, newHashSet(V_16)),
62+
UnlockConnectorOnEVSideDisconnect("UnlockConnectorOnEVSideDisconnect", "boolean", RW, newHashSet(V_16)),
63+
WebSocketPingInterval("WebSocketPingInterval", "in seconds", RW, newHashSet(V_16)),
64+
LocalAuthListEnabled("LocalAuthListEnabled", "boolean", RW, newHashSet(V_16)),
65+
LocalAuthListMaxLength("LocalAuthListMaxLength", "integer", R, newHashSet(V_16)),
66+
SendLocalListMaxLength("SendLocalListMaxLength", "integer", R, newHashSet(V_16)),
67+
ReserveConnectorZeroSupported("ReserveConnectorZeroSupported", "boolean", R, newHashSet(V_16)),
68+
ChargeProfileMaxStackLevel("ChargeProfileMaxStackLevel", "integer", R, newHashSet(V_16)),
69+
ChargingScheduleAllowedChargingRateUnit("ChargingScheduleAllowedChargingRateUnit", "comma seperated list", R, newHashSet(V_16)),
70+
ChargingScheduleMaxPeriods("ChargingScheduleMaxPeriods", "integer", R, newHashSet(V_16)),
71+
ConnectorSwitch3to1PhaseSupported("ConnectorSwitch3to1PhaseSupported", "boolean", R, newHashSet(V_16)),
72+
MaxChargingProfilesInstalled("MaxChargingProfilesInstalled", "integer", R, newHashSet(V_16));
7373

7474
private final String value;
7575
private final String text;
@@ -108,8 +108,7 @@ private static Map<String, String> asMap(OcppVersion version, ConfigurationKeyRe
108108
for (ConfigurationKeyEnum c : ConfigurationKeyEnum.values()) {
109109
if (c.versions.contains(version) && c.rw == rw) {
110110
map.put(c.value, c.text);
111-
}
112-
else if (c.versions.contains(version) && rw == ConfigurationKeyReadWriteEnum.R){
111+
} else if (c.versions.contains(version) && rw == ConfigurationKeyReadWriteEnum.R) {
113112
map.put(c.value, c.text);
114113
}
115114
}
Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
package de.rwth.idsg.steve.web.dto.ocpp;
22

3-
//Determines if a configuration key is read-only ("R") or read-write
4-
//("RW"). In case the key is read-only, the Central System can read the value for the key using GetConfiguration, but
5-
//not write it. In case the accessibility is read-write, the Central System can also write the value for the key using
6-
//ChangeConfiguration.
7-
8-
public enum ConfigurationKeyReadWriteEnum
9-
{
3+
/**
4+
* Determines if a configuration key is read-only ("R") or read-write ("RW"). In case the key is read-only, the Central
5+
* System can read the value for the key using GetConfiguration, but not write it. In case the accessibility is
6+
* read-write, the Central System can also write the value for the key using ChangeConfiguration.
7+
*
8+
* This distinction was added in OCPP 1.6.
9+
*/
10+
public enum ConfigurationKeyReadWriteEnum {
1011
R,
1112
RW
1213
}

0 commit comments

Comments
 (0)