Protobuf notes

From Wiki at Neela Nurseries
Revision as of 23:34, 3 October 2024 by Ted (talk | contribs) (Add protobuf.dev links.)
Jump to: navigation, search

Introduction:

^ References To Sort

Protobuf references, somewhat arbitrary starting point yet introduces some key topics of Protobuf standard and use cases:

JSON supported data types:


First Protobuf .proto file, compiles using `protoc-c`, part of a package available with Ubuntu 20.04:

// syntax = "proto3";
syntax = "proto2";

// Notes:
// $ protoc-c --c_out=. ./first.proto

message sensorUpdates {
  required int32 message_id = 1;
  optional float vrms = 2;
}

. . . It appears that the integer values which message elements are assigned as tantamount to key names in JSON.

^ Nanopb

2022-01-08 Saturday

Cmake script to locate Nanopb headers and sources: