Skip to content

[OCPP 1.6] new interface to support OCPP 1.6 obtaining configuration from V2 data model#1714

Merged
james-ctc merged 11 commits intomainfrom
jc/experimental-unified-config
Feb 12, 2026
Merged

[OCPP 1.6] new interface to support OCPP 1.6 obtaining configuration from V2 data model#1714
james-ctc merged 11 commits intomainfrom
jc/experimental-unified-config

Conversation

@james-ctc
Copy link
Member

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

  • I have performed a self-review of my code
  • I have made corresponding changes to the documentation
  • I read the contribution documentation and made sure that my changes meet its requirements

using MessagesSet = std::set<MessageType>;
using SetResult = v2::SetVariableStatusEnum;

protected:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any particular reason why this is not private ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

using protected supports testing of methods in unit tests

james-ctc added a commit that referenced this pull request Feb 4, 2026
Signed-off-by: James Chapman <james.chapman@pionix.de>
james-ctc added a commit that referenced this pull request Feb 4, 2026
Signed-off-by: James Chapman <james.chapman@pionix.de>
@james-ctc james-ctc force-pushed the jc/experimental-unified-config branch from b43148f to 2ac9f95 Compare February 4, 2026 10:30
james-ctc added a commit that referenced this pull request Feb 4, 2026
Signed-off-by: James Chapman <james.chapman@pionix.de>
@james-ctc james-ctc force-pushed the jc/experimental-unified-config branch from 2ac9f95 to 3f667b7 Compare February 4, 2026 10:52
james-ctc added a commit that referenced this pull request Feb 4, 2026
Signed-off-by: James Chapman <james.chapman@pionix.de>
@james-ctc james-ctc force-pushed the jc/experimental-unified-config branch 3 times, most recently from 3608e0a to 2b4c1a3 Compare February 5, 2026 10:04
Copy link
Contributor

@Pietfried Pietfried left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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&) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should catch out_of_range too

@james-ctc james-ctc force-pushed the jc/experimental-unified-config branch from 95078a9 to ea0842b Compare February 6, 2026 13:01
@james-ctc
Copy link
Member Author

Re integration tests - I've been looking into this and it looks to be an issue with unique_ptr and base classes.
updating to use references - but that does mean that users of libocpp will always need to provide a configuration handler reference when creating a ChargePoint object.

@james-ctc james-ctc force-pushed the jc/experimental-unified-config branch 2 times, most recently from b7b9c91 to 1333c3e Compare February 9, 2026 10:13
@james-ctc james-ctc requested a review from Pietfried February 9, 2026 12:37
@james-ctc james-ctc force-pushed the jc/experimental-unified-config branch from 6bdb50f to 1333c3e Compare February 10, 2026 16:20
Pietfried
Pietfried previously approved these changes Feb 11, 2026
Pietfried
Pietfried previously approved these changes Feb 11, 2026
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>
@james-ctc james-ctc force-pushed the jc/experimental-unified-config branch from 18e6fc8 to f649cff Compare February 12, 2026 07:56
Signed-off-by: James Chapman <james.chapman@pionix.de>
@james-ctc james-ctc force-pushed the jc/experimental-unified-config branch from f649cff to 1eed492 Compare February 12, 2026 08:30
@james-ctc james-ctc added this pull request to the merge queue Feb 12, 2026
Merged via the queue into main with commit 0a2c98d Feb 12, 2026
11 of 12 checks passed
@james-ctc james-ctc deleted the jc/experimental-unified-config branch February 12, 2026 09:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants