Open bobvanderlinden opened 8 years ago
@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.
Here is my attempt: https://github.com/strahlex/machinetalk-gsl
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++.