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

If no changeconfiguration callback is register call the generic one, … #282

Merged

Conversation

bWF0dGhpYXMK
Copy link
Contributor

…if present

@@ -280,6 +280,11 @@ void ChargePoint::register_configuration_key_changed_callback(
this->charge_point->register_configuration_key_changed_callback(key, callback);
}

void ChargePoint::register_configuration_key_changed_callback(
const std::function<void(const CiString<50>& key, const CiString<500>& valuee)>& callback) {
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
const std::function<void(const CiString<50>& key, const CiString<500>& valuee)>& callback) {
const std::function<void(const CiString<50>& key, const CiString<500>& value)>& callback) {

@@ -280,6 +280,11 @@ void ChargePoint::register_configuration_key_changed_callback(
this->charge_point->register_configuration_key_changed_callback(key, callback);
}

void ChargePoint::register_configuration_key_changed_callback(
const std::function<void(const CiString<50>& key, const CiString<500>& valuee)>& callback) {
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
const std::function<void(const CiString<50>& key, const CiString<500>& valuee)>& callback) {
const std::function<void(const CiString<50>& key, const CiString<500>& value)>& callback) {

/// \brief registers a \p callback function that can be used to react on changed configuration key. This
/// callback is called when a configuration key has been changed by the CSMS
/// \param callback executed when this configuration key changed
void register_configuration_key_changed_callback(
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
void register_configuration_key_changed_callback(
void register_generic_configuration_key_changed_callback(

Copy link
Contributor

Choose a reason for hiding this comment

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

Please adjust other respective members accordingly.

@@ -436,6 +436,12 @@ class ChargePoint {
void register_configuration_key_changed_callback(const CiString<50>& key,
const std::function<void(const KeyValue& key_value)>& callback);

/// \brief registers a \p callback function that can be used to react on changed configuration key. This
Copy link
Contributor

Choose a reason for hiding this comment

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

Please adjust the method docs so to point out that this is a generic callback and that it will only be called in case no specific callback for the key is registered.

Matthias-NIDEC and others added 5 commits February 22, 2024 05:44
…is specified for the configuration_key_changed_callback

Signed-off-by: pietfried <[email protected]>
Signed-off-by: pietfried <[email protected]>
Signed-off-by: pietfried <[email protected]>
Signed-off-by: pietfried <[email protected]>
@Pietfried Pietfried merged commit bcfae6d into EVerest:main Feb 26, 2024
4 checks passed
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.

3 participants