Skip to content

Add AuthorizationSetup to EV side state machine, including a feedback mechanism to report EVSE parameters to the EV.#165

Open
cienporcien wants to merge 2 commits intoEVerest:feat/adding-ev-d20from
rogerbedell:feat/adding-ev-d20-AuthorizationSetup2
Open

Add AuthorizationSetup to EV side state machine, including a feedback mechanism to report EVSE parameters to the EV.#165
cienporcien wants to merge 2 commits intoEVerest:feat/adding-ev-d20from
rogerbedell:feat/adding-ev-d20-AuthorizationSetup2

Conversation

@cienporcien
Copy link
Contributor

Describe your changes

Add AuthorizationSetup to EV side state machine, including a feedback mechanism to report EVSE parameters to the EV.

Issue ticket number and link

#163

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

Signed-off-by: Roger Bedell <rogerbedell@hotmail.com>
@SebaLukas
Copy link
Member

@cienporcien I'll review this PR this week.
I'd like to merge this PR here in libiso. And then migrate the “feat/adding-ev-d20” branch to everest-core.
Then all further PRs from you would have to be opened in everest-core.

Copy link
Member

@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.

Overall looks good!
Only some small changes needed :)

Comment on lines 59 to 61
if (pnc_auth_mode.supported_providers.has_value()) {
m_ctx.evse_session_info.supported_providers = pnc_auth_mode.supported_providers.value();
}
Copy link
Member

Choose a reason for hiding this comment

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

Because m_ctx.evse_session_info.supported_providers is also optional, it is enough to write:
m_ctx.evse_session_info.supported_providers = pnc_auth_mode.supported_providers;
Then you dont need the if.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point.

Copy link
Member

Choose a reason for hiding this comment

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

Your changes are here not correct: m_ctx.evse_session_info.supported_providers = pnc_auth_mode.supported_providers.value();
Please remove .value()

Comment on lines +16 to +23
bool check_response_code(ResponseCode response_code) {
switch (response_code) {
case ResponseCode::OK:
return true;
[[fallthrough]];
default:
return false;
}
Copy link
Member

Choose a reason for hiding this comment

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

Other OK_* and Warning_* response codes are also acceptable here and should not lead to immediate termination. Only Failed_* response codes should lead to termination.
In the future every state should check if the OK_* or Warning_* response_code is really used in the state according to the standard and react accordingly.

Copy link
Contributor Author

@cienporcien cienporcien Jan 18, 2026

Choose a reason for hiding this comment

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

I was looking at Table 224 in the standard, and for AuthorizationSetupRes it only has OK, FAILED, FAILED_SequenceError, and FAILED_UnknownSession. So I think it is ok as is.

Copy link
Member

Choose a reason for hiding this comment

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

The problem is with this approach, that if the charger sends a different OK_ or Warning_ ResponseCode as expected then the ev state machine abort the session. Thats not ideal. I think it is okay that the car can continue the session

Signed-off-by: Roger Bedell <rogerbedell@hotmail.com>
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.

2 participants