All in one solution demonstrating how to use nanopb Protocol Buffers library from within mbed environment. Test case is very simple. It works.

Dependencies:   nanopb protocol

Original import was an all-in-one solution that only depends on mbed.

Current implementation extracted 2 librarires:

1) nanopb contains code required to use nanopb and Timestamp dependency. 2) protocol is a specific research protocol used by LCE at Itron at the moment of commit.

The application decodes Protocol Buffers message generated with GO application using the same 'protocol'. This test level application decodes message and validates that it matches expected.

It is simply a proof that nanopb library can be used.

Revision:
1:78f2fa2c125e
Parent:
0:fbdd0d307c19
--- a/source/protocol/eagle.pb.c	Wed Jul 12 22:40:29 2017 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,22 +0,0 @@
-/* Automatically generated nanopb constant definitions */
-/* Generated by nanopb-0.3.8 at Wed Jul 12 11:04:33 2017. */
-
-#include "eagle.pb.h"
-
-/* @@protoc_insertion_point(includes) */
-#if PB_PROTO_HEADER_VERSION != 30
-#error Regenerate this file with the current version of nanopb generator.
-#endif
-
-
-
-const pb_field_t protocol_EagleRawSample_fields[4] = {
-    PB_FIELD(  2, UENUM   , SINGULAR, STATIC  , FIRST, protocol_EagleRawSample, ValveStatusType, ValveStatusType, 0),
-    PB_FIELD(  3, BYTES   , SINGULAR, CALLBACK, OTHER, protocol_EagleRawSample, ValveStatus, ValveStatusType, 0),
-    PB_FIELD(  4, BYTES   , SINGULAR, CALLBACK, OTHER, protocol_EagleRawSample, Consumption, ValveStatus, 0),
-    PB_LAST_FIELD
-};
-
-
-
-/* @@protoc_insertion_point(eof) */