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

OCPP: Adjusted argument of on_session_started from string to SessionStartedReason #495

Merged
merged 1 commit into from
Jan 17, 2024

Conversation

Pietfried
Copy link
Contributor

Adjusted changed argument type for reason of on_session_started from string to ocpp::SessionStartedReason.

This change is required by: EVerest/libocpp#402

@hikinggrass
Copy link
Contributor

Looks good, just needs a version bump for the libocpp dependency once EVerest/libocpp#402 is merged

return ocpp::SessionStartedReason::EVConnected;
case types::evse_manager::StartSessionReason::Authorized:
return ocpp::SessionStartedReason::Authorized;
default:
Copy link
Contributor

Choose a reason for hiding this comment

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

@Pietfried best practice here is to do the throw outside of the switch. That way the compiler might see, that some switch cases are missing (for example, if new values are added to the enum).

…string to ocpp::SessionStartedReason

Signed-off-by: pietfried <[email protected]>
@Pietfried Pietfried force-pushed the feature/adjust-session-started-reason branch from 6798d38 to f319e5e Compare January 17, 2024 09:08
@Pietfried Pietfried merged commit 13b2e9c into main Jan 17, 2024
4 checks passed
@Pietfried Pietfried deleted the feature/adjust-session-started-reason branch January 17, 2024 09:40
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.

3 participants