Skip to content

Conversation

@Pietfried
Copy link
Contributor

@Pietfried Pietfried commented Aug 9, 2024

Describe your changes

Implements SmartCharging use cases K09 and K10.
Adds support for the following messages:

  • ClearChargingProfile
  • GetChargingProfiles
  • ReportChargingProfiles

Tested Cases tested with OCTT:
TC_K_05
TC_K_06
TC_K_07
TC_K_08
TC_K_09 fails because GetCompositeSchedule handling is a prerequisite.
TC_K_24
TC_K_29
TC_K_30
TC_K_31
TC_K_32
TC_K_33
TC_K_34
TC_K_35
TC_K_36

This PR is branched off #711 .
Additional requires some changes in the code generator, which will be applied in this PR: #741

Issue ticket number and link

#309
#369

Checklist before requesting a review

@Pietfried Pietfried force-pushed the feature/k09-k10-get-profiles-clear-profiles branch from 9fd64ec to 17f65d1 Compare August 9, 2024 13:57
@Pietfried Pietfried marked this pull request as ready for review August 9, 2024 14:36
@Pietfried Pietfried force-pushed the feature/k09-k10-get-profiles-clear-profiles branch 3 times, most recently from 277c004 to 2655505 Compare August 14, 2024 09:07

// Functional Block K: Smart Charging
void handle_set_charging_profile_req(Call<SetChargingProfileRequest> call);
void handle_clear_charging_profile_req(Call<ClearChargingProfileRequest> call);
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we pass these by value? We pass by value for all calls but I think it could very well be const &

EVLOG_debug << "Rejecting SetChargingProfileRequest:\n reasonCode: " << response.statusInfo->reasonCode.get()
<< "\nadditionalInfo: " << response.statusInfo->additionalInfo->get();
} else {
response = this->smart_charging_handler->clear_profiles(msg);
Copy link
Contributor

Choose a reason for hiding this comment

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

I am a bit worried about the responsibilities of the smart charging handler. We filter out some edge cases but then still hand over the whole message to clear_profiles and get_reported_profiles. I think we should either move the whole handling of messages there or put an in between layer that handles the full message here. This feels like a kind of halfway solution.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Also this is based on the behavior of handle_set_charging_profile_req. We are actually checking a requirement for the CSMS (K10.FR.06) here and then we hand it over to the SmartChargingHandler. If we change it, I would change it for both occurences

Copy link
Contributor

Choose a reason for hiding this comment

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

For both of these I probably missed it earlier then or it was not as apparent. Maybe we don't need to do anything with it now but we are increasing coupling this way so certainly something to look out for later.

Copy link
Contributor

@marcemmers marcemmers left a comment

Choose a reason for hiding this comment

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

In general looks quite good I think. There are some things I would improve but they are more nice to haves and should not change the functionality so up to you to do them or not.

@Pietfried Pietfried force-pushed the feature/k09-k10-get-profiles-clear-profiles branch from 814fb55 to eee6e17 Compare August 14, 2024 19:42
@Pietfried Pietfried force-pushed the feature/k09-k10-get-profiles-clear-profiles branch from eee6e17 to 02f0193 Compare August 14, 2024 20:06
marcemmers and others added 11 commits August 21, 2024 14:30
…oint

Signed-off-by: pietfried <pietgoempel@gmail.com>
Signed-off-by: pietfried <pietgoempel@gmail.com>
Signed-off-by: pietfried <pietgoempel@gmail.com>
…it path to inside if statement

Signed-off-by: pietfried <pietgoempel@gmail.com>
Co-authored-by: Marc Emmers <35759328+marcemmers@users.noreply.github.com>
Signed-off-by: Piet Gömpel <37657534+Pietfried@users.noreply.github.com>
Signed-off-by: pietfried <pietgoempel@gmail.com>
Signed-off-by: pietfried <pietgoempel@gmail.com>
Signed-off-by: pietfried <pietgoempel@gmail.com>
Signed-off-by: pietfried <pietgoempel@gmail.com>
Signed-off-by: pietfried <pietgoempel@gmail.com>
Signed-off-by: pietfried <pietgoempel@gmail.com>
Signed-off-by: pietfried <pietgoempel@gmail.com>
@Pietfried Pietfried force-pushed the feature/k09-k10-get-profiles-clear-profiles branch from 4375639 to eb6b064 Compare August 21, 2024 12:31
@Pietfried Pietfried merged commit 21292cf into main Aug 22, 2024
@Pietfried Pietfried deleted the feature/k09-k10-get-profiles-clear-profiles branch August 22, 2024 06:48
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.

5 participants