@@ -73,7 +73,7 @@ class OcppConfig : public ocpp::config::IOcppConfig
7373 beforehand like a local action to start a transaction. */
7474 bool authorizeRemoteTxRequests () const override { return getBool (" AuthorizeRemoteTxRequests" ); }
7575 /* * @brief Number of times to blink Charge Point lighting when signalling */
76- unsigned int blinkRepeat () const override { return getUInt (" BlinkRepeat" ); }
76+ unsigned int blinkRepeat () const override { return get< unsigned int > (" BlinkRepeat" ); }
7777 /* * @brief Size (in seconds) of the clock-aligned data interval. This is the size (in seconds) of the set of evenly spaced aggregation intervals
7878 per day, starting at 00:00:00 (midnight). For example, a value of 900 (15 minutes) indicates that every day should be broken into
7979 96 15-minute intervals.
@@ -104,30 +104,30 @@ class OcppConfig : public ocpp::config::IOcppConfig
104104 Values are reported in CSL, formatted: 0.RST, 1.RST, 2.RTS */
105105 std::string connectorPhaseRotation () const override { return getString (" ConnectorPhaseRotation" ); }
106106 /* * @brief Maximum number of items in a ConnectorPhaseRotation Configuration Key. */
107- unsigned int connectorPhaseRotationMaxLength () const override { return getUInt (" ConnectorPhaseRotationMaxLength" ); }
107+ unsigned int connectorPhaseRotationMaxLength () const override { return get< unsigned int > (" ConnectorPhaseRotationMaxLength" ); }
108108 /* * @brief Maximum number of requested configuration keys in a GetConfiguration.req PDU. */
109- unsigned int getConfigurationMaxKeys () const override { return getUInt (" GetConfigurationMaxKeys" ); }
109+ unsigned int getConfigurationMaxKeys () const override { return get< unsigned int > (" GetConfigurationMaxKeys" ); }
110110 /* * @brief Interval of inactivity (no OCPP exchanges) with central system after which the Charge Point should send a Heartbeat.req PDU */
111111 std::chrono::seconds heartbeatInterval () const override { return get<std::chrono::seconds>(" HeartbeatInterval" ); }
112112 /* * @brief Percentage of maximum intensity at which to illuminate Charge Point lighting */
113- unsigned int lightIntensity () const override { return getUInt (" LightIntensity" ); }
113+ unsigned int lightIntensity () const override { return get< unsigned int > (" LightIntensity" ); }
114114 /* * @brief Whether the Charge Point, when offline, will start a transaction for locally-authorized identifiers. */
115115 bool localAuthorizeOffline () const override { return getBool (" LocalAuthorizeOffline" ); }
116116 /* * @brief Whether the Charge Point, when online, will start a transaction for locally-authorized identifiers without waiting for or
117117 requesting an Authorize.conf from the Central System */
118118 bool localPreAuthorize () const override { return getBool (" LocalPreAuthorize" ); }
119119 /* * @brief Maximum energy in Wh delivered when an identifier is invalidated by the Central System after start of a transaction. */
120- unsigned int maxEnergyOnInvalidId () const override { return getUInt (" MaxEnergyOnInvalidId" ); }
120+ unsigned int maxEnergyOnInvalidId () const override { return get< unsigned int > (" MaxEnergyOnInvalidId" ); }
121121 /* * @brief Clock-aligned measurand(s) to be included in a MeterValues.req PDU, every ClockAlignedDataInterval seconds */
122122 std::string meterValuesAlignedData () const override { return getString (" MeterValuesAlignedData" ); }
123123 /* * @brief Maximum number of items in a MeterValuesAlignedData Configuration Key. */
124- unsigned int meterValuesAlignedDataMaxLength () const override { return getUInt (" MeterValuesAlignedDataMaxLength" ); }
124+ unsigned int meterValuesAlignedDataMaxLength () const override { return get< unsigned int > (" MeterValuesAlignedDataMaxLength" ); }
125125 /* * @brief Sampled measurands to be included in a MeterValues.req PDU, every MeterValueSampleInterval seconds. Where
126126 applicable, the Measurand is combined with the optional phase; for instance: Voltage.L1
127127 Default: "Energy.Active.Import.Register" */
128128 std::string meterValuesSampledData () const override { return getString (" MeterValuesSampledData" ); }
129129 /* * @brief Maximum number of items in a MeterValuesSampledData Configuration Key. */
130- unsigned int meterValuesSampledDataMaxLength () const override { return getUInt (" MeterValuesSampledDataMaxLength" ); }
130+ unsigned int meterValuesSampledDataMaxLength () const override { return get< unsigned int > (" MeterValuesSampledDataMaxLength" ); }
131131 /* * @brief Interval between sampling of metering (or other) data, intended to be transmitted by "MeterValues" PDUs. For charging
132132 session data (ConnectorId>0), samples are acquired and transmitted periodically at this interval from the start of the charging
133133 transaction.
@@ -137,9 +137,9 @@ class OcppConfig : public ocpp::config::IOcppConfig
137137 Central System. */
138138 std::chrono::seconds minimumStatusDuration () const override { return get<std::chrono::seconds>(" MinimumStatusDuration" ); }
139139 /* * @brief The number of physical charging connectors of this Charge Point. */
140- unsigned int numberOfConnectors () const override { return getUInt (" NumberOfConnectors" ); }
140+ unsigned int numberOfConnectors () const override { return get< unsigned int > (" NumberOfConnectors" ); }
141141 /* * @brief Number of times to retry an unsuccessful reset of the Charge Point. */
142- unsigned int resetRetries () const override { return getUInt (" ResetRetries" ); }
142+ unsigned int resetRetries () const override { return get< unsigned int > (" ResetRetries" ); }
143143 /* * @brief When set to true, the Charge Point SHALL administratively stop the transaction when the cable is unplugged from the EV. */
144144 bool stopTransactionOnEVSideDisconnect () const override { return getBool (" StopTransactionOnEVSideDisconnect" ); }
145145 /* * @brief whether the Charge Point will stop an ongoing transaction when it receives a non- Accepted authorization status in a
@@ -149,19 +149,19 @@ class OcppConfig : public ocpp::config::IOcppConfig
149149 PDU for every ClockAlignedDataInterval of the Transaction */
150150 std::string stopTxnAlignedData () const override { return getString (" StopTxnAlignedData" ); }
151151 /* * @brief Maximum number of items in a StopTxnAlignedData Configuration Key. */
152- unsigned int stopTxnAlignedDataMaxLength () const override { return getUInt (" StopTxnAlignedDataMaxLength" ); }
152+ unsigned int stopTxnAlignedDataMaxLength () const override { return get< unsigned int > (" StopTxnAlignedDataMaxLength" ); }
153153 /* * @brief Sampled measurands to be included in the TransactionData element of StopTransaction.req PDU, every
154154 MeterValueSampleInterval seconds from the start of the charging session */
155155 std::string stopTxnSampledData () const override { return getString (" StopTxnSampledData" ); }
156156 /* * @brief Maximum number of items in a StopTxnSampledData Configuration Key.*/
157- unsigned int stopTxnSampledDataMaxLength () const override { return getUInt (" StopTxnSampledDataMaxLength" ); }
157+ unsigned int stopTxnSampledDataMaxLength () const override { return get< unsigned int > (" StopTxnSampledDataMaxLength" ); }
158158 /* * @brief A list of supported Feature Profiles. Possible profile identifiers: Core, FirmwareManagement, LocalAuthListManagement,
159159 Reservation, SmartCharging and RemoteTrigger. */
160160 std::string supportedFeatureProfiles () const override { return getString (" SupportedFeatureProfiles" ); }
161161 /* * @brief Maximum number of items in a SupportedFeatureProfiles Configuration Key. */
162- unsigned int supportedFeatureProfilesMaxLength () const override { return getUInt (" SupportedFeatureProfilesMaxLength" ); }
162+ unsigned int supportedFeatureProfilesMaxLength () const override { return get< unsigned int > (" SupportedFeatureProfilesMaxLength" ); }
163163 /* * @brief How often the Charge Point should try to submit a transaction-related message when the Central System fails to process it. */
164- unsigned int transactionMessageAttempts () const override { return getUInt (" TransactionMessageAttempts" ); }
164+ unsigned int transactionMessageAttempts () const override { return get< unsigned int > (" TransactionMessageAttempts" ); }
165165 /* * @brief How long the Charge Point should wait before resubmitting a transaction-related message that the Central System failed to
166166 process. */
167167 std::chrono::seconds transactionMessageRetryInterval () const override
@@ -180,9 +180,9 @@ class OcppConfig : public ocpp::config::IOcppConfig
180180 /* * @brief whether the Local Authorization List is enabled */
181181 bool localAuthListEnabled () const override { return getBool (" LocalAuthListEnabled" ); }
182182 /* * @brief Maximum number of identifications that can be stored in the Local Authorization List */
183- unsigned int localAuthListMaxLength () const override { return getUInt (" LocalAuthListMaxLength" ); }
183+ unsigned int localAuthListMaxLength () const override { return get< unsigned int > (" LocalAuthListMaxLength" ); }
184184 /* * @brief Maximum number of identifications that can be send in a single SendLocalList.req */
185- unsigned int sendLocalListMaxLength () const override { return getUInt (" SendLocalListMaxLength" ); }
185+ unsigned int sendLocalListMaxLength () const override { return get< unsigned int > (" SendLocalListMaxLength" ); }
186186
187187 // Reservation Profile
188188
@@ -193,15 +193,15 @@ class OcppConfig : public ocpp::config::IOcppConfig
193193
194194 /* * @brief Max StackLevel of a ChargingProfile. The number defined also indicates the max allowed number of installed charging
195195 schedules per Charging Profile Purposes. */
196- unsigned int chargeProfileMaxStackLevel () const override { return getUInt (" ChargeProfileMaxStackLevel" ); }
196+ unsigned int chargeProfileMaxStackLevel () const override { return get< unsigned int > (" ChargeProfileMaxStackLevel" ); }
197197 /* * @brief A list of supported quantities for use in a ChargingSchedule. Allowed values: 'Current' and 'Power' */
198198 std::string chargingScheduleAllowedChargingRateUnit () const override { return getString (" ChargingScheduleAllowedChargingRateUnit" ); }
199199 /* * @brief Maximum number of periods that may be defined per ChargingSchedule. */
200- unsigned int chargingScheduleMaxPeriods () const override { return getUInt (" ChargingScheduleMaxPeriods" ); }
200+ unsigned int chargingScheduleMaxPeriods () const override { return get< unsigned int > (" ChargingScheduleMaxPeriods" ); }
201201 /* * @brief If defined and true, this Charge Point support switching from 3 to 1 phase during a Transaction. */
202202 bool connectorSwitch3to1PhaseSupported () const override { return getBool (" ConnectorSwitch3to1PhaseSupported" ); }
203203 /* * @brief Maximum number of Charging profiles installed at a time */
204- unsigned int maxChargingProfilesInstalled () const override { return getUInt (" MaxChargingProfilesInstalled" ); }
204+ unsigned int maxChargingProfilesInstalled () const override { return get< unsigned int > (" MaxChargingProfilesInstalled" ); }
205205
206206 //
207207 // Specific setters
@@ -240,10 +240,10 @@ class OcppConfig : public ocpp::config::IOcppConfig
240240
241241 /* * @brief This configuration key can be used to limit the size of the 'certificateChain' field from the CertificateSigned.req PDU. The value
242242 of this configuration key has a maximum limit of 10.000 characters. */
243- unsigned int certificateSignedMaxChainSize () const override { return getUInt (" CertificateSignedMaxChainSize" ); }
243+ unsigned int certificateSignedMaxChainSize () const override { return get< unsigned int > (" CertificateSignedMaxChainSize" ); }
244244
245245 /* * @brief Maximum number of Root/CA certificates that can be installed in the Charge Point. */
246- unsigned int certificateStoreMaxLength () const override { return getUInt (" CertificateStoreMaxLength" ); }
246+ unsigned int certificateStoreMaxLength () const override { return get< unsigned int > (" CertificateStoreMaxLength" ); }
247247
248248 /* * @brief This configuration key contains CPO name (or an organization trusted by the CPO) as used in the Charge Point Certificate. This
249249 is the CPO name that is to be used in a CSR send via: SignCertificate.req */
@@ -257,7 +257,7 @@ class OcppConfig : public ocpp::config::IOcppConfig
257257 After the security profile was successfully changed, the Charge Point disconnects from the Central System and SHALL
258258 reconnect using the new configured Security Profile.
259259 Default, when no security profile is yet configured: 0. */
260- unsigned int securityProfile () const override { return getUInt (" SecurityProfile" ); }
260+ unsigned int securityProfile () const override { return get< unsigned int > (" SecurityProfile" ); }
261261
262262 /* * @brief Comma separated list of supported file transfer protocols for upload AND download
263263 Allowed values : FTP, FTPS, HTTP, HTTPS, SFTP */
@@ -269,8 +269,6 @@ class OcppConfig : public ocpp::config::IOcppConfig
269269
270270 /* * @brief Get a boolean parameter */
271271 bool getBool (const std::string& param) const { return m_config.get (OCPP_PARAMS, param).toBool (); }
272- /* * @brief Get an unsigned integer parameter */
273- unsigned int getUInt (const std::string& param) const { return m_config.get (OCPP_PARAMS, param).toUInt (); }
274272 /* * @brief Get a string parameter */
275273 std::string getString (const std::string& param) const { return m_config.get (OCPP_PARAMS, param); }
276274 /* * @brief Get a value which can be created from an unsigned integer */
0 commit comments