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

Generate client API based on protobuf definitions #45

Open
bobvanderlinden opened this issue Dec 14, 2015 · 2 comments
Open

Generate client API based on protobuf definitions #45

bobvanderlinden opened this issue Dec 14, 2015 · 2 comments

Comments

@bobvanderlinden
Copy link
Contributor

As discussed in #44, to keep up with changes on machinetalk-protobuf it would be helpful to generate API code from protobuf definitions. This can be done once a base has been defined as described in #44.

Once the base is defined, we have a way to update several kinds of status objects (MT_FULL_UPDATE) and a way to call commands and request data (MT_REQ, MT_ACK, MT_NACK). These status objects and commands need to be defined in a way so that a generator can create code for Python, Javascript and C/C++.

@machinekoder
Copy link
Member

@bobvanderlinden This might be a little miss misunderstanding. I want to generate the code not from the protobuf spec but from a model for the protocol. However, this model should also be used to document the messages, as this is very essential for a protocol. My tests so far are very promising.

A single model can be used to create binding for various languages (just add a code generator) and documentation with a single model. If it works out that would drastically simplify creating new protocols with Machinetalk and maintaining them.

@machinekoder
Copy link
Member

Here is my attempt: https://github.com/strahlex/machinetalk-gsl

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