-
Notifications
You must be signed in to change notification settings - Fork 57
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
Add websocket option update on component variable change #263
Add websocket option update on component variable change #263
Conversation
klemmpnx
commented
Nov 14, 2023
- if certain ControllerComponentVariables are changed, updates the websocket options (without a reconnect)
- removes the reset of connection_attempts on option settings since
- unclear, why this is part of setting the connection options (which does not have further side effects)
- so far, in libocpp set_connections_options is only called in the context of a websocket init (which implies connection_attempts=0)
Signed-off-by: Fabian Klemm <[email protected]>
I suggest to better make it explicit in the options itself. One way could be to split up the Perhaps you have a better idea, though? |
Co-authored-by: Dominik-K <[email protected]> Signed-off-by: Fabian Klemm <[email protected]>
Hmm yes that is tricky. I do not quite understand the intention how the Websocket class is to be used. The Websocket class does offer the So if we want to refactor this, I would rather make the websocket API safer instead of putting more knowledge/responsibility outside (and then also kick out this distinction between with/without reconnect). But I am not 100% aware of all implications here and also not sure, this should go into this PR then? |
There are quite some implications that need to be considered when changing the internal websocket handling and unfortunately the requirements of v16 and v201 differ a little bit concerning the change of ws options / reconnect / fallback handling. I agree that a general refactor makes sense, but I see this as part of another PR. |
* add websocket option update on component variable change Signed-off-by: Fabian Klemm <[email protected]> * Update lib/ocpp/v201/charge_point.cpp Co-authored-by: Dominik-K <[email protected]> Signed-off-by: Fabian Klemm <[email protected]> --------- Signed-off-by: Fabian Klemm <[email protected]> Co-authored-by: Dominik-K <[email protected]>