Conversation
|
One informational note: I generated the json texts by calling the "rpc.discover" method (defined by openrpc) of the different Components, which returns (per definition) the methods of the (python) Components in openrpc json format. If I made mistakes in the pyleco components (type hinting) or if the |
Ah, that makes this clearer! Makes sense. |
|
In general, this RPC thing sometimes feels a little "inverted" to me somehow.... Coordinator A calls a method If A calls a method of B to tell B about A's details, that method would be something like So, inherently, I sometimes feel this mismatch between the names of commands, and those same names being method names in another object. I think it's an indication that the names or interfaces could be improved 😕 Mind you, this is not always the case -- a Coordinator calling an Actor's |
I agree. The most prominent (and simple) example is "ping": I send a ping message and expect a pong response.
I see your point. The Coordinator messages (regarding the directory) are the least obvious ones and require some collaboration. Maybe we can use names like (these are methods in Coordinator |
|
To store openRPC links globally, not in discussion:
|
|
Note to myself:
|
Co-authored-by: Christoph Buchner <bilderbuchi@users.noreply.github.com>
Yeah untangling this could be a bit tiresome, but clear names are worth it. I hope we manage to unify the "command"/"message" character with the "method" being called in most cases.
Maybe moving away from a simple
|
|
I added examples to the dictionary methods to better understand how they work. |
|
Different idea to show json: https://github.com/useblocks/sphinx-data-viewer |
6e44556 to
12d4589
Compare
|
I noticed, that there is a "summary" field for a method, not only description. We should use that instead (in many cases). |
I added message types and error codes.
They are based on the current pyleco implementation pymeasure/pyleco#3
If you prefer looking at messages in python style, have a look here: https://github.com/pymeasure/pyleco/blob/add-core/pyleco/core/leco_protocols.py
As we follow openrpc, I figured, we should define the methods in openrpc style and not as python methods.
Closes #29
ToDo: