Skip to content

Commit 2283e27

Browse files
committed
fix: compile & incorporate PR comments
Signed-off-by: James Chapman <james.chapman@pionix.de>
1 parent 21f06ab commit 2283e27

File tree

14 files changed

+1299
-667
lines changed

14 files changed

+1299
-667
lines changed

lib/everest/ocpp/include/ocpp/v16/charge_point_configuration_devicemodel.hpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
#include <ocpp/v16/charge_point_configuration_interface.hpp>
99
#include <ocpp/v16/types.hpp>
1010

11-
#include <map>
1211
#include <set>
1312
#include <vector>
1413

@@ -94,6 +93,9 @@ class ChargePointConfigurationDeviceModel : private ChargePointConfigurationBase
9493
SetResult setInternalTimeOffsetNextTransition(const std::string& value);
9594
SetResult setInternalWaitForSetUserPriceTimeout(const std::string& value);
9695

96+
std::optional<std::string> calculateEvseIds();
97+
std::string calculateSupportedMeasurands();
98+
9799
public:
98100
explicit ChargePointConfigurationDeviceModel(const std::string_view& ocpp_main_path,
99101
std::unique_ptr<v2::DeviceModelInterface> device_model_interface);

lib/everest/ocpp/include/ocpp/v16/known_keys.hpp

Lines changed: 284 additions & 276 deletions
Large diffs are not rendered by default.

lib/everest/ocpp/include/ocpp/v16/utils.hpp

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
#include <ocpp/v16/ocpp_types.hpp>
99
#include <ocpp/v16/types.hpp>
1010

11+
#include <cstddef>
12+
#include <map>
1113
#include <string>
1214
#include <vector>
1315

@@ -32,6 +34,38 @@ std::string to_csl(const std::vector<std::string>& vec);
3234
/// \note will not contain empty strings when a comma is repeated
3335
std::vector<std::string> from_csl(const std::string& csl);
3436

37+
class OrderedUniqueStringList {
38+
private:
39+
using Store = std::map<std::string, std::size_t>;
40+
std::size_t count{0};
41+
Store list{};
42+
43+
void do_insert(std::string&& s);
44+
45+
public:
46+
void insert(const std::string& s) {
47+
do_insert(std::string{s});
48+
}
49+
void insert(std::string&& s) {
50+
do_insert(std::move(s));
51+
}
52+
53+
void clear() {
54+
count = 0;
55+
list.clear();
56+
}
57+
58+
std::vector<std::string> get();
59+
60+
bool empty() const {
61+
return list.empty();
62+
}
63+
64+
auto size() const {
65+
return list.size();
66+
}
67+
};
68+
3569
} // namespace ocpp::v16::utils
3670

3771
#endif

lib/everest/ocpp/include/ocpp/v2/ctrlr_component_variables.hpp

Lines changed: 2 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ extern const Component SmartChargingCtrlr;
8989
extern const Component TariffCostCtrlr;
9090
extern const Component TxCtrlr;
9191
extern const Component
92-
OCPP16MavericksCtrlr; // This controller contains OCPP1.6 configuration keys without a clear mapping to OCPP2.x.
92+
OCPP16LegacyCtrlr; // This controller contains OCPP1.6 configuration keys without a clear mapping to OCPP2.x.
9393
} // namespace ControllerComponents
9494

9595
namespace StandardizedVariables {
@@ -317,6 +317,7 @@ extern const ComponentVariable ISO15118CtrlrAvailable;
317317
// do not map to any existing component variable combination in OCPP2.x. The following definitions only control the
318318
// OCPP1.6 implementation
319319
extern const ComponentVariable BlinkRepeat;
320+
extern const ComponentVariable ConnectorPhaseRotation;
320321
extern const ComponentVariable ConnectorPhaseRotationMaxLength;
321322
extern const RequiredComponentVariable GetConfigurationMaxKeys;
322323
extern const ComponentVariable LightIntensity;
@@ -342,43 +343,6 @@ extern const ComponentVariable SupportedLanguages;
342343
extern const ComponentVariable CustomMultiLanguageMessages;
343344
extern const ComponentVariable Language;
344345
extern const ComponentVariable WaitForSetUserPriceTimeout;
345-
346-
// Additional OCPP1.6 Mavericks - Configuration keys without direct OCPP 2.x equivalents
347-
// TODO(james-ctc): double check there is no V2 mapping
348-
349-
extern const ComponentVariable AuthorizeRemoteTxRequests;
350-
extern const ComponentVariable CentralSystemURI;
351-
extern const ComponentVariable CertificateStoreMaxLength;
352-
extern const ComponentVariable ChargeProfileMaxStackLevel;
353-
extern const ComponentVariable ChargingScheduleAllowedChargingRateUnit;
354-
extern const ComponentVariable ChargingScheduleMaxPeriods;
355-
extern const ComponentVariable ClockAlignedDataInterval;
356-
extern const ComponentVariable ConnectionTimeOut;
357-
extern const ComponentVariable ConnectorEvseIds;
358-
extern const ComponentVariable ConnectorPhaseRotation;
359-
extern const ComponentVariable ISO15118PnCEnabled;
360-
extern const ComponentVariable LocalAuthListEnabled;
361-
extern const ComponentVariable LocalAuthListMaxLength;
362-
extern const ComponentVariable MaxChargingProfilesInstalled;
363-
extern const ComponentVariable MeterValueSampleInterval;
364-
extern const ComponentVariable MeterValuesAlignedData;
365-
extern const ComponentVariable MeterValuesAlignedDataMaxLength;
366-
extern const ComponentVariable MeterValuesSampledData;
367-
extern const ComponentVariable MeterValuesSampledDataMaxLength;
368-
extern const ComponentVariable RetryBackoffRandomRange;
369-
extern const ComponentVariable RetryBackoffRepeatTimes;
370-
extern const ComponentVariable RetryBackoffWaitMinimum;
371-
extern const ComponentVariable SendLocalListMaxLength;
372-
extern const ComponentVariable StopTransactionOnInvalidId;
373-
extern const ComponentVariable StopTxnAlignedData;
374-
extern const ComponentVariable StopTxnAlignedDataMaxLength;
375-
extern const ComponentVariable StopTxnSampledData;
376-
extern const ComponentVariable StopTxnSampledDataMaxLength;
377-
extern const ComponentVariable SupportedFileTransferProtocols;
378-
extern const ComponentVariable SupportedMeasurands;
379-
extern const ComponentVariable TransactionMessageAttempts;
380-
extern const ComponentVariable TransactionMessageRetryInterval;
381-
382346
} // namespace ControllerComponentVariables
383347

384348
namespace EvseComponentVariables {

0 commit comments

Comments
 (0)