Skip to content
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

how to address attributes/properties? #378

Open
BenediktBurger opened this issue Mar 29, 2023 · 3 comments
Open

how to address attributes/properties? #378

BenediktBurger opened this issue Mar 29, 2023 · 3 comments

Comments

@BenediktBurger
Copy link

We're developing a laboratory control protocol LECO and are looking for a way to encode messages.
open-rpc seems to be great for encoding method calls. We need, however, to access attributes/properties of the remote object (i.e. read/write variables of that object).
Is there any suggestion, how to do it via open-rpc or is there any other useful protocol?

json-schema seems to do the job of encoding attributes, but cannot handle method calls.

Does anyone use a combination of open-rpc and json-schema?

@github-actions
Copy link

Welcome to OpenRPC! Thank you for taking the time to create an issue. Please review the guidelines

@BelfordZ
Copy link
Member

BelfordZ commented Jul 6, 2023

@bmoneke Thanks for checking out openrpc. OpenRPC is simply put a description of methods using JSON Schema + some other stuff. In OpenRPC, json-rpc params and results are represented as "ContentDescriptors" - basically a wrapper for the JSON schema that describes the data type. You might find some of these examples useful:

https://playground.open-rpc.org/?url=https://raw.githubusercontent.com/open-rpc/examples/master/service-descriptions/simple-math-openrpc.json

@BenediktBurger
Copy link
Author

I know, how params for rpc calls are represented.
My question touches a different point: Is there a possibility to describe class/instance attributes?

As far as I know, json-rpc does not define how to get/set variables/attributes, but only how to call methods remotely.

Therefore, I think, open-rpc only describes a remote methoc call, but not a "remote variable getting/setting". Am I right?

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

No branches or pull requests

2 participants