You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Looking at how the signal_set_charging_profiles_callback and also set_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 by SetChargingProfile.req but also when transactions stop (because TxProfiles) might be removed.
Describe your solution
A more appropriate name would e.g. be charging_profiles_updated_callback.
Additional context
No response
The text was updated successfully, but these errors were encountered:
Rename the callbacks to charging_profiles_updated_callback. This name better reflects the actual purpose of the callback, which is to notify the user whenever the charging profiles are updated, regardless of the source of the update.
Rename the Callbacks:
Replace signal_set_charging_profiles_callback with charging_profiles_updated_callback.
Replace set_charging_profiles_callback with charging_profiles_updated_callback.
Update Documentation:
Ensure that the documentation clearly explains that the charging_profiles_updated_callback is triggered whenever there is a change in the charging profiles, including additions, removals, or modifications.
Backward Compatibility:
If the library is already in use, consider deprecating the old names and providing a transition period where both names are supported. This will give users time to update their code.
Testing:
After renaming, thoroughly test the library to ensure that the callback is triggered correctly in all scenarios where charging profiles are updated.
OCPP Version
OCPP1.6, OCPP2.0.1
Describe the problem
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.Describe your solution
A more appropriate name would e.g. be
charging_profiles_updated_callback
.Additional context
No response
The text was updated successfully, but these errors were encountered: