-
Notifications
You must be signed in to change notification settings - Fork 56
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
Feature/move smart charging handlers and callbacks to functional block #957
base: main
Are you sure you want to change the base?
Feature/move smart charging handlers and callbacks to functional block #957
Conversation
Signed-off-by: Maaike Zijderveld, iolar <git.mail@iolar.nl>
Signed-off-by: Maaike Zijderveld, iolar <git.mail@iolar.nl>
… the same class). Fix tests. Signed-off-by: Maaike Zijderveld, iolar <git.mail@iolar.nl>
Signed-off-by: Maaike Zijderveld, iolar <git.mail@iolar.nl>
Signed-off-by: Maaike Zijderveld, iolar <git.mail@iolar.nl>
Signed-off-by: Maaike Zijderveld, iolar <git.mail@iolar.nl>
Signed-off-by: Maaike Zijderveld, iolar <git.mail@iolar.nl>
Signed-off-by: Maaike Zijderveld, iolar <git.mail@iolar.nl>
702147a
to
e95572a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mainly would like to see those 2 get_composite_schedule
functions remain. The other two are really just nits so do with them what you want ;)
virtual ~SmartChargingInterface() { | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
virtual ~SmartChargingInterface() { | |
} | |
virtual ~SmartChargingInterface() = default; |
I would just leave it like this
/// \param duration How long the schedule should be | ||
/// \param unit ChargingRateUnit to thet the schedule for | ||
/// \return the composite schedule if the operation was successful, otherwise nullopt | ||
virtual std::optional<CompositeSchedule> get_composite_schedule(int32_t evse_id, std::chrono::seconds duration, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can imagine consumers don't always need to get all the schedules so it might be better to leave these in. We use the latter of these function to get a schedule.
@@ -200,7 +200,7 @@ std::vector<ChargingProfilePurposeEnum> get_purposes_to_ignore(const std::string | |||
std::vector<ChargingProfilePurposeEnum> purposes_to_ignore; | |||
const auto purposes_to_ignore_vec = split_string(csl, ','); | |||
|
|||
for (const auto purpose : purposes_to_ignore_vec) { | |||
for (const auto& purpose : purposes_to_ignore_vec) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is a vector of enums, so no need to take by reference (enum is only 4 bytes anyway)
Describe your changes
Move smart charging handlers and callbacks to a new smart charging functional block.
Issue ticket number and link
#953
Checklist before requesting a review