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

- Fix TC_SECC_CMN_VTB_CmSlacParm_004/5/6 #928

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

corneliusclaussen
Copy link
Contributor

  • Fix TC_SECC_CMN_VTB_CmSlacMatch_003
  • Add reset event handling while waiting for Link
  • Add link detection to matching state and reset if link got lost

Describe your changes

Issue ticket number and link

Checklist before requesting a review

  • I have performed a self-review of my code
  • I have made corresponding changes to the documentation
  • I read the contribution documentation and made sure that my changes meet its requirements

@corneliusclaussen corneliusclaussen added the post-release Tag that this PR should not go into the current merge window for the upcoming release label Oct 23, 2024
- Fix TC_SECC_CMN_VTB_CmSlacMatch_003
- Add reset event handling while waiting for Link
- Add link detection to matching state and reset if link got lost

Signed-off-by: Cornelius Claussen <cc@pionix.de>
Copy link
Contributor

@SebaLukas SebaLukas left a comment

Choose a reason for hiding this comment

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

Looks good 👍

Copy link
Contributor

@a-w50 a-w50 left a comment

Choose a reason for hiding this comment

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

Will add these changes by myself

FSMSimpleState::CallbackReturnType MatchedState::callback() {
const auto& cfg = ctx.slac_config;

if (not ctx.slac_config.link_status.do_detect) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not using cfg here, already? Could even use const auto& link_status = ctx.slac_config.link_status

Comment on lines 193 to 195
} else {
return false;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

would drop the else here. Just return false; at the end of the function

@@ -212,6 +213,7 @@ struct Context {
void log_info(const std::string& text);

ModemVendor modem_vendor{ModemVendor::Unknown};
slac::messages::cm_slac_match_cnf match_cnf_message;
Copy link
Contributor

Choose a reason for hiding this comment

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

This doesn't really belong here, as it is shared information only between Matching and WaitForLink state. Matching state should keep it for itself and pass it to WaitForLink state with create_simple<WaitForLink>(ctx, std::move(match_cnf_message)). You would need to modify the constructor of WaitForLink state.

Signed-off-by: aw <aw@pionix.de>
Copy link
Contributor

@a-w50 a-w50 left a comment

Choose a reason for hiding this comment

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

Style-wise I'm fine. But it looks like the only necessary change for the 4/5/6 tests is the checking for a valid cm_slac_match_req message.
Everything else seems to be unrelated and I would appreciate if we could add this in a separate commit with corresponding documentation (i.e. what the WaitForLinkState is for and why it can resend the slac_match_cnf message).

@@ -72,7 +72,8 @@ FSMSimpleState::CallbackReturnType MatchingState::callback() {

if (!seen_slac_parm_req) {
if (now_tp >= timeout_slac_parm_req) {
return Event::RETRY_MATCHING;
ctx.log_info("CM_SLAC_PARM_REQ timed out -> FAILED");
return Event::FAILED;
Copy link
Contributor

Choose a reason for hiding this comment

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

This change should not be necessary for the tests 4/5/6 to succeed, because it still won't sent any confirm message.
Nevertheless, according to [V2G3-A09-13] it shall consider, that no SLAC will be performed.
@corneliusclaussen might this be overpessimistic for slower cars?
While looking at the implementation, it also seems we don't handle [V2G3-A09-45].

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
post-release Tag that this PR should not go into the current merge window for the upcoming release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants