Notify consumer about charging profile update when a transaction stops #788
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Describe your changes
This PR adds executing
signal_set_charging_profiles_callback
when a transaction is stopped to notify the consumer. The stopped transaction might have removed previously reported TxProfiles (as part of the composite schedule) which could influence the load balancing / charging power of the EVSEs.Remark: Looking at how the
signal_set_charging_profiles_callback
and alsoset_charging_profiles_callback
(of ocpp201) I would suggest to change the name of these variables to better represent their purpose. A libocpp user should get notified in case profiles are added / removed which leads to a change of the composite schedule. This can happen when charging profiles are added bySetChargingProfile.req
but also when transactions stop (because TxProfiles) might be removed. A more appropriate name would e.g. becharging_profiles_updated_callback
.I covered that in this issue.
Issue ticket number and link
Checklist before requesting a review