Difference between revisions of "Protobuf notes"
		
		
		
		
		
		Jump to navigation
		Jump to search
		
				
		
		
	
m  | 
				m  | 
				||
| Line 6: | Line 6: | ||
*  https://developers.google.com/protocol-buffers/docs/proto  | *  https://developers.google.com/protocol-buffers/docs/proto  | ||
*  https://spline.de/talks/protobuf.pdf  | *  https://spline.de/talks/protobuf.pdf  | ||
| + | |||
| + | <pre>  | ||
| + | // syntax = "proto3";  | ||
| + | syntax = "proto2";  | ||
| + | |||
| + | // Notes:  | ||
| + | // $ protoc-c --c_out=. ./first.proto  | ||
| + | |||
| + | message sensorUpdates {  | ||
| + |   required int32 message_id = 1;  | ||
| + |   optional float vrms = 2;  | ||
| + | }  | ||
| + | </pre>  | ||
Revision as of 08:09, 27 December 2021
- https://www.crankuptheamps.com/blog/posts/2017/10/12/protobuf-battle-of-the-syntaxes/
 - https://www.educative.io/edpresso/what-is-the-difference-between-protocol-buffers-and-json
 
// syntax = "proto3";
syntax = "proto2";
// Notes:
// $ protoc-c --c_out=. ./first.proto
message sensorUpdates {
  required int32 message_id = 1;
  optional float vrms = 2;
}