Skip to content

parse URL instead of explicit host param#220

Merged
matth-x merged 1 commit intodevelopfrom
feature/parse-url
Oct 21, 2023
Merged

parse URL instead of explicit host param#220
matth-x merged 1 commit intodevelopfrom
feature/parse-url

Conversation

@matth-x
Copy link
Copy Markdown
Owner

@matth-x matth-x commented Oct 21, 2023

This PR changes the signature of mocpp_initialize(const char *host, ...). Instead of an OCPP host, port and URL, it expects the OCPP backend URL and the chargeBoxId. This aligns better with the typical instructions of OCPP backends.

For example, the previous notation

const char *host = "my.instance.com";
uint16_t port = 8443;
const char *url = "wss://my.instance.com/steve/websocket/CentralSystemService/charger001";

mocpp_initialize(host, port, url);

becomes

const char *backendUrl = "wss://my.instance.com:8443/steve/websocket/CentralSystemService";
const char *chargeBoxId = "charger001";

mocpp_initialize(backendUrl, chargeBoxId);

@matth-x matth-x merged commit c96ede3 into develop Oct 21, 2023
@matth-x matth-x deleted the feature/parse-url branch October 21, 2023 12:57
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