Skip to content

Expose ChargePointStatus in API#309

Merged
matth-x merged 3 commits intomainfrom
feature/cp-status-in-api
May 29, 2024
Merged

Expose ChargePointStatus in API#309
matth-x merged 3 commits intomainfrom
feature/cp-status-in-api

Conversation

@matth-x
Copy link
Owner

@matth-x matth-x commented May 29, 2024

Introduce a new function getChargePointStatus() in the C/C++ API which returns the OCPP field ChargePointStatus as reported via StatusNotification.

Furthermore, this PR changes the scoped enum ChargePointStatus in namespace MicroOcpp to a C-style enum not lying in a namespace. This could break your integration if you fetched the ChargePointStatus over the Connector class (and going beyond the API). To upgrade, the following changes are necessary:

  • Definitions: MicroOcpp::ChargePointStatus myStatus; --> ChargePointStatus myStatus;
  • Literals: MicroOcpp::ChargePointStatus::Available --> ChargePointStatus_Available
  • Null-literal: MicroOcpp::ChargePointStatus::NOT_SET --> ChargePointStatus_UNDEFINED

This refactoring step is part of the changes to make C integrations easier. All enums which could be relevant to the firmware integration will be changed to C-style enums.

@matth-x matth-x merged commit a72104e into main May 29, 2024
@matth-x matth-x deleted the feature/cp-status-in-api branch May 29, 2024 09:53
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.

1 participant