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

Add composed device model storage and everest device model storage. #846

Conversation

maaikez
Copy link
Contributor

@maaikez maaikez commented Sep 3, 2024

Describe your changes

Created composed device model storage and everest device model storage like stated in https://github.com/EVerest/everest-core/tree/doc/config-service/doc/config_service#next-steps-to-adjust-ocpp201-and-libocpp

Issue ticket number and link

#844

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

@maaikez maaikez linked an issue Sep 3, 2024 that may be closed by this pull request
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.

This looks good!

I would like to see at least some parts of this documented here as part of the OCPP201 module documentation:

  • Class diagram + explaination
  • Variable attributes and variable characteristics for externally managed variables
  • Sequence of variable access for internally and externally managed variables

@maaikez
Copy link
Contributor Author

maaikez commented Sep 5, 2024

This looks good!

I would like to see at least some parts of this documented here as part of the OCPP201 module documentation:

* Class diagram + explaination

* Variable attributes and variable characteristics for externally managed variables

* Sequence of variable access for internally and externally managed variables

ok, in doc.rst? Or where else?

@Pietfried
Copy link
Contributor

This looks good!
I would like to see at least some parts of this documented here as part of the OCPP201 module documentation:

* Class diagram + explaination

* Variable attributes and variable characteristics for externally managed variables

* Sequence of variable access for internally and externally managed variables

ok, in doc.rst? Or where else?

Yep 👍

@maaikez
Copy link
Contributor Author

maaikez commented Sep 5, 2024

This looks good!
I would like to see at least some parts of this documented here as part of the OCPP201 module documentation:

* Class diagram + explaination

* Variable attributes and variable characteristics for externally managed variables

* Sequence of variable access for internally and externally managed variables

ok, in doc.rst? Or where else?

Yep 👍

Ok, added!

@Pietfried Pietfried self-assigned this Sep 8, 2024
@Pietfried Pietfried force-pushed the feature/844-configuration-service-create-skeleton-for-device-model-storage branch from fa45d41 to 15e70bf Compare September 8, 2024 12:43
@maaikez
Copy link
Contributor Author

maaikez commented Sep 12, 2024

Is there still a change requested?

@maaikez maaikez marked this pull request as ready for review September 23, 2024 12:57
maaikez and others added 8 commits October 29, 2024 12:17
…ariables will throw.

Signed-off-by: Maaike Zijderveld, iolar <[email protected]>
Signed-off-by: Maaike Zijderveld, iolar <[email protected]>
Signed-off-by: Maaike Zijderveld, iolar <[email protected]>
Signed-off-by: Maaike Zijderveld, iolar <[email protected]>
@Pietfried Pietfried force-pushed the feature/844-configuration-service-create-skeleton-for-device-model-storage branch from 9eff3af to 473c2b8 Compare October 29, 2024 13:12
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.

lgtm! Requested some documentation changes partially caused by the renaming to DeviceModelStorageInterface

ComposedDeviceModelStorage::get_variable_attribute(const ocpp::v201::Component& component_id,
const ocpp::v201::Variable& variable_id,
const ocpp::v201::AttributeEnum& attribute_enum) {
if (get_variable_source(component_id, variable_id) == "OCPP") {
Copy link
Contributor

Choose a reason for hiding this comment

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

"OCPP" can be defined as a constant

}

class DeviceModel {
- device_model: DeviceModelInterface
Copy link
Contributor

Choose a reason for hiding this comment

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

This now became DeviceModelStorageInterface right? Must therefore be changed at these places.

Note that the EVerest config service is not yet implemented. Currently all components and variables are controlled
by the libocpp device model storage implementation.

Device Model Implementation this module
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Device Model Implementation this module
Device Model Implementation of this module

* Contains device model representation and business logic to prevalidate requests to the device model variables
* Contains reference to device model interface implementation

* DeviceModelInterface:
Copy link
Contributor

Choose a reason for hiding this comment

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

DeviceModelStorageInterface

Comment on lines 7 to 8
database InternalStorage order 40
database ExternalStorage order 50
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like

Suggested change
database InternalStorage order 40
database ExternalStorage order 50
database DeviceModelStorageSqlite order 40
database EverestDeviceModelStorage order 50

would be more appropriate

@@ -3,6 +3,8 @@

#include <device_model/composed_device_model_storage.hpp>

#define VARIABLE_SOURCE_OCPP "OCPP"
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
#define VARIABLE_SOURCE_OCPP "OCPP"
static constexpr auto VARIABLE_SOURCE_OCPP = "OCPP";

@Pietfried Pietfried self-requested a review November 12, 2024 12:32
@Pietfried
Copy link
Contributor

👍

please merge EVerest/libocpp#768 and update the dependencies.yaml in this PR afterwards

@maaikez maaikez merged commit e786c57 into main Nov 14, 2024
11 checks passed
@maaikez maaikez deleted the feature/844-configuration-service-create-skeleton-for-device-model-storage branch November 14, 2024 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Configuration Service: create skeleton for device model storage
2 participants