How it works
You define the structure of your message in a .proto file. This .proto file is the universal language in protocol buffers. Click here to find more information on all the possibilities of protobuf. Below you see an example of a protobuf message stored in a .proto file:
message request { uint32 A = 1; int64 B = 2; // More variables. }
The .proto files are the input for protoc, the protocol buffer’s compiler. Protoc is a source code generator rather than a compiler. It converts the messages defined in the .proto files into the source code of your selected programming language. You can use this to generate message definition code for your project.
Protoc natively supports many different programming languages. You and a colleague working in a different programming language can use the same message definitions. When either one updates the message definition, the other person reruns protoc and gets the latest source code.
By default, protoc generates C++ code which is not suitable for microcontrollers. The C++ generated is written for server and desktop processors. Embedded Proto offers an alternative.
Embedded Proto is a plugin for protoc generating C++ code suitable for microcontrollers. In this way, Embedded Proto provides an easy to use interface to exchange data between embedded devices and the outside world. Specify the data format between your IoT device and other devices, servers, apps, or desktop applications in a standardized way.