[OCPP 1.6] new interface to support OCPP 1.6 obtaining configuration from V2 data model#1714
[OCPP 1.6] new interface to support OCPP 1.6 obtaining configuration from V2 data model#1714
Conversation
27f9de5 to
c78e403
Compare
lib/everest/ocpp/include/ocpp/v16/charge_point_configuration_base.hpp
Outdated
Show resolved
Hide resolved
lib/everest/ocpp/lib/ocpp/v16/charge_point_configuration_base.cpp
Outdated
Show resolved
Hide resolved
lib/everest/ocpp/include/ocpp/v16/charge_point_configuration_interface.hpp
Outdated
Show resolved
Hide resolved
lib/everest/ocpp/lib/ocpp/v16/charge_point_configuration_base.cpp
Outdated
Show resolved
Hide resolved
lib/everest/ocpp/lib/ocpp/v16/charge_point_configuration_base.cpp
Outdated
Show resolved
Hide resolved
| using MessagesSet = std::set<MessageType>; | ||
| using SetResult = v2::SetVariableStatusEnum; | ||
|
|
||
| protected: |
There was a problem hiding this comment.
Is there any particular reason why this is not private ?
There was a problem hiding this comment.
using protected supports testing of methods in unit tests
Signed-off-by: James Chapman <james.chapman@pionix.de>
Signed-off-by: James Chapman <james.chapman@pionix.de>
b43148f to
2ac9f95
Compare
Signed-off-by: James Chapman <james.chapman@pionix.de>
2ac9f95 to
3f667b7
Compare
Signed-off-by: James Chapman <james.chapman@pionix.de>
3608e0a to
2b4c1a3
Compare
Pietfried
left a comment
There was a problem hiding this comment.
It looks like some integration tests with OCPP related configs fail:
FAILED core_tests/config_tests.py::TestConfigsInDirectory::test_config[config-sil-ocpp-custom-extension]
FAILED core_tests/config_tests.py::TestConfigsInDirectory::test_config[config-sil-ocpp-pnc]
FAILED core_tests/config_tests.py::TestConfigsInDirectory::test_config[config-sil-ocpp]
FAILED core_tests/config_tests.py::TestConfigsInDirectory::test_config[config-sil-ocpp-API]https://github.com/EVerest/everest-core/actions/runs/21707219409/job/62603234701?pr=1714
This is also reproducable when running e.g. ./run-scripts/run-sil-ocpp.sh
| result = true; | ||
| } | ||
| } | ||
| } catch (const std::invalid_argument&) { |
There was a problem hiding this comment.
We should catch out_of_range too
95078a9 to
ea0842b
Compare
|
Re integration tests - I've been looking into this and it looks to be an issue with unique_ptr and base classes. |
b7b9c91 to
1333c3e
Compare
6bdb50f to
1333c3e
Compare
lib/everest/ocpp/tests/lib/ocpp/v16/v2config/evse_security_stub.hpp
Outdated
Show resolved
Hide resolved
ChargePointConfiguration now inherits from ChargePointConfigurationInterface. The ChargePointConfigurationInterface implementation can be selected by the OCPP module in the ChargePoint constructor. Signed-off-by: James Chapman <james.chapman@pionix.de>
Moved from DeviceModelStorageInterface to DeviceModelInterface Signed-off-by: James Chapman <james.chapman@pionix.de>
Signed-off-by: James Chapman <james.chapman@pionix.de>
Signed-off-by: James Chapman <james.chapman@pionix.de>
fix: setting JSON configuration to include schema validation (#1782) Moved validation function to base class and added checks to V2 device model storage (OCPP 1.6) Additional tests to ensure that schema validation on set works for both JSON and database implemantations. Signed-off-by: James Chapman <james.chapman@pionix.de>
Signed-off-by: James Chapman <james.chapman@pionix.de>
Signed-off-by: James Chapman <james.chapman@pionix.de>
Signed-off-by: James Chapman <james.chapman@pionix.de>
Signed-off-by: James Chapman <james.chapman@pionix.de>
Signed-off-by: James Chapman <james.chapman@pionix.de>
1770eba to
18e6fc8
Compare
18e6fc8 to
f649cff
Compare
Signed-off-by: James Chapman <james.chapman@pionix.de>
f649cff to
1eed492
Compare
Describe your changes
OCPP 1.6 obtains configuration from JSON files.
This change creates a ChargePointConfigurationInterface that enables OCPP1.6 to either use the existing JSON files via ChargePointConfiguration or V2 device model (and database) via ChargePointConfigurationDeviceModel
Unit tests have been added to ensure that the same result occurs regardless of which implementation is used.
In addition there is a common ChargePointConfigurationBase base class where shared functionality between the implementations is located. This ensures where possible that the two implementations remain consistent.
Issue ticket number and link
Checklist before requesting a review