-
Notifications
You must be signed in to change notification settings - Fork 123
RpcApi: add new JSON RPC API module #1583
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
Open
barsnick
wants to merge
66
commits into
main
Choose a base branch
from
feature/json-rpc-api
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Fabian Hartung <[email protected]> Signed-off-by: Moritz Barsnick <[email protected]> Co-authored-by: Fabian Hartung <[email protected]> Co-authored-by: Moritz Barsnick <[email protected]>
Signed-off-by: Fabian Hartung <[email protected]>
Signed-off-by: Moritz Barsnick <[email protected]>
Signed-off-by: Moritz Barsnick <[email protected]>
Signed-off-by: Fabian Hartung <[email protected]>
…tocol_to_charge_protocol function Signed-off-by: Fabian Hartung <[email protected]>
Signed-off-by: Fabian Hartung <[email protected]>
Signed-off-by: Fabian Hartung <[email protected]>
Signed-off-by: Fabian Hartung <[email protected]>
Signed-off-by: Fabian Hartung <[email protected]>
Signed-off-by: Fabian Hartung <[email protected]>
Signed-off-by: Fabian Hartung <[email protected]>
Signed-off-by: Fabian Hartung <[email protected]>
Signed-off-by: Moritz Barsnick <[email protected]>
Signed-off-by: Moritz Barsnick <[email protected]>
Signed-off-by: Moritz Barsnick <[email protected]>
As changed in the merged PR #1319. Signed-off-by: Moritz Barsnick <[email protected]>
Signed-off-by: Fabian Hartung <[email protected]>
Signed-off-by: Fabian Hartung <[email protected]>
Add a Findjson-rpc-cxx.cmake for non-EDM builds. The target_include_directories() directive needs to be different for EDM and non-EDM (Yocto) builds for the header-only json-rpc-cxx. Also remove json-rpc-cxx from target_link_libraries(), as it is header-only. Signed-off-by: Moritz Barsnick <[email protected]>
…figuration from YAML files Signed-off-by: Fabian Hartung <[email protected]>
Signed-off-by: Moritz Barsnick <[email protected]>
Signed-off-by: Fabian Hartung <[email protected]>
Signed-off-by: Moritz Barsnick <[email protected]>
Introduce a little bit more consistency. Signed-off-by: Moritz Barsnick <[email protected]>
Signed-off-by: Moritz Barsnick <[email protected]>
Only listen on all interfaces if explicitly asked via config "all". Do not accept an empty string. Signed-off-by: Moritz Barsnick <[email protected]>
Signed-off-by: Moritz Barsnick <[email protected]>
Signed-off-by: Moritz Barsnick <[email protected]>
… flag EVSE index 0 is reserved for the charger itself and should not be used to set/clear the EVSE error present flag. In the future, we might want to introduce a charger error present flag. Signed-off-by: Fabian Hartung <[email protected]>
Signed-off-by: Moritz Barsnick <[email protected]>
Signed-off-by: Moritz Barsnick <[email protected]>
Signed-off-by: Moritz Barsnick <[email protected]>
Signed-off-by: Moritz Barsnick <[email protected]>
Signed-off-by: Moritz Barsnick <[email protected]>
Is was accidentally handled as int (copy/paste error), and thereby rounded down. Also rename the method argument for clarity. Signed-off-by: Moritz Barsnick <[email protected]>
Signed-off-by: Moritz Barsnick <[email protected]>
The `limits` var will be deprecated. Signed-off-by: Moritz Barsnick <[email protected]>
Signed-off-by: Moritz Barsnick <[email protected]>
73ca4be to
873203c
Compare
Signed-off-by: Moritz Barsnick <[email protected]>
Signed-off-by: Moritz Barsnick <[email protected]>
This takes applicable values from DIN 70121 and ISO 15118-2 ev_info, and maps them to the display parameters originally meant for ISO 15118-20. Most notably, the EV's SoC - also determined by "AC with SoC" - is now exported to the API. Signed-off-by: Moritz Barsnick <[email protected]>
Signed-off-by: Moritz Barsnick <[email protected]>
The API modules don't work well without. RpcApi could partially work around this, but it's not worth the effort right now. Signed-off-by: Moritz Barsnick <[email protected]>
This leads to proper constification. (Noticed by cppcheck.) Also constify an EVSEInfoStore method to now properly satisfy the const requirement. Signed-off-by: Moritz Barsnick <[email protected]>
(Noticed by cppcheck, but mostly cosmetic, not performance relevant.) Signed-off-by: Moritz Barsnick <[email protected]>
(Suggested by cppcheck.) Signed-off-by: Moritz Barsnick <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Describe your changes
This introduces a new API module RpcApi, which uses JSON RPC, and WebSockets as a transport layer.
It uses both RPC Methods and Notifications.
This is the implementation according to the proposal with was discussed here on Zulip and documented here. The original proposal was slightly modified, as several details proved inconsistent, impractical, or just mis-specified.
Documentation of the current state of implementation is included in the module's
docs/subdirectory. The current (or the final merged) state will be manifested as API version 1.0.0. Future updates to the external API definition will require API version bumps.A Python GUI test client is included under
modules/API/RpcApi/tools/python-client-gui/.Not implemented in the current state of the API:
This will be added later, with corresponding bumps of the API version (where applicable).
A non-squashed version of this work is found in the branch feature/json-rpc-api-nosquash, for reference regarding small change steps, commit messages with motivations, and so on.
Co-authored-by: Fabian Hartung [email protected]
Co-authored-by: Moritz Barsnick [email protected]
Issue ticket number and link
This is a new request after incorrect closure of #1324.
Checklist before requesting a review