Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Device Model Database initialization: Move from python to C++ #656

Closed
Pietfried opened this issue Jun 3, 2024 · 1 comment
Closed

Device Model Database initialization: Move from python to C++ #656

Pietfried opened this issue Jun 3, 2024 · 1 comment
Assignees
Labels
advanced DM OCPP 2.0.1 Advanced device management Certfication Profile OCPP2.0.1

Comments

@Pietfried
Copy link
Contributor

OCPP Version

OCPP2.0.1

Describe the problem

Currently version OCPP2.0.1 of libocpp requires the device model storage database to be initialized and set up before startup. Tooling for setting up the device model database is currently provided by a python initialization script .

For some charging stations that use libocpp, the initialization of the device model database needs to be executed on the target device, which usually do not support python.

Also the database migration support that has been added recently does currently not cover the device model database, but only the core database of ocpp2.0.1.

Describe your solution

A rewrite of the device model database initialization is required. The python initialization script can be used as a reference. The rewrite should provide the same functionality like the python initialization script and perform the steps at the start of the application. This includes:

  • Execute the init sql script
  • Insert components and variables according the the component schema files
  • Insert the variable attribute values based on a JSON config. This is an example of a OCPP JSON config.

The rewrite shall make use of the migration support to allow downgrade and upgrades of the device model database schema.

Additional context

In order to execute the device model database initialization on the target, the component_schemas need be to be installed on the target. The is currently not done in cmake.

@Pietfried
Copy link
Contributor Author

Done with #681

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
advanced DM OCPP 2.0.1 Advanced device management Certfication Profile OCPP2.0.1
Projects
None yet
Development

No branches or pull requests

2 participants