Update nanopb to 0.2.5 and fix max string length options.
authorChristopher Peplin <chris.peplin@rhubarbtech.com>
Fri, 17 Jan 2014 19:02:38 +0000 (14:02 -0500)
committerChristopher Peplin <chris.peplin@rhubarbtech.com>
Fri, 17 Jan 2014 19:02:38 +0000 (14:02 -0500)
Makefile
gen/cpp/openxc.pb.c
gen/cpp/openxc.pb.h
libs/nanopb
openxc.options

index 4b1b687..7b968e6 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,6 @@
 nanopb: proto
-       python libs/nanopb/generator/nanopb_generator.py -s max_size:100 -f openxc.options gen/cpp/openxc.pb
+       make -C libs/nanopb/generator/proto
+       python libs/nanopb/generator/nanopb_generator.py gen/cpp/openxc.pb -f openxc.options
 
 proto: openxc.proto
        @mkdir -p gen/java
index 1625254..8451121 100644 (file)
@@ -1,33 +1,33 @@
 /* Automatically generated nanopb constant definitions */
-/* Generated by nanopb-0.2.4-dev at Thu Oct 24 10:06:38 2013. */
+/* Generated by nanopb-0.2.5 at Fri Jan 17 14:02:23 2014. */
 
 #include "openxc.pb.h"
 
 
 
 const pb_field_t openxc_VehicleMessage_fields[4] = {
-    PB_FIELD2(  1, ENUM    , OPTIONAL, STATIC, FIRST, openxc_VehicleMessage, type, type, 0),
-    PB_FIELD2(  2, MESSAGE , OPTIONAL, STATIC, OTHER, openxc_VehicleMessage, raw_message, type, &openxc_RawMessage_fields),
-    PB_FIELD2(  3, MESSAGE , OPTIONAL, STATIC, OTHER, openxc_VehicleMessage, translated_message, raw_message, &openxc_TranslatedMessage_fields),
+    PB_FIELD2(  1, ENUM    , OPTIONAL, STATIC  , FIRST, openxc_VehicleMessage, type, type, 0),
+    PB_FIELD2(  2, MESSAGE , OPTIONAL, STATIC  , OTHER, openxc_VehicleMessage, raw_message, type, &openxc_RawMessage_fields),
+    PB_FIELD2(  3, MESSAGE , OPTIONAL, STATIC  , OTHER, openxc_VehicleMessage, translated_message, raw_message, &openxc_TranslatedMessage_fields),
     PB_LAST_FIELD
 };
 
 const pb_field_t openxc_RawMessage_fields[4] = {
-    PB_FIELD2(  1, INT32   , OPTIONAL, STATIC, FIRST, openxc_RawMessage, bus, bus, 0),
-    PB_FIELD2(  2, UINT32  , OPTIONAL, STATIC, OTHER, openxc_RawMessage, message_id, bus, 0),
-    PB_FIELD2(  3, UINT64  , OPTIONAL, STATIC, OTHER, openxc_RawMessage, data, message_id, 0),
+    PB_FIELD2(  1, INT32   , OPTIONAL, STATIC  , FIRST, openxc_RawMessage, bus, bus, 0),
+    PB_FIELD2(  2, UINT32  , OPTIONAL, STATIC  , OTHER, openxc_RawMessage, message_id, bus, 0),
+    PB_FIELD2(  3, UINT64  , OPTIONAL, STATIC  , OTHER, openxc_RawMessage, data, message_id, 0),
     PB_LAST_FIELD
 };
 
 const pb_field_t openxc_TranslatedMessage_fields[9] = {
-    PB_FIELD2(  1, ENUM    , OPTIONAL, STATIC, FIRST, openxc_TranslatedMessage, type, type, 0),
-    PB_FIELD2(  2, STRING  , OPTIONAL, STATIC, OTHER, openxc_TranslatedMessage, name, type, 0),
-    PB_FIELD2(  3, STRING  , OPTIONAL, STATIC, OTHER, openxc_TranslatedMessage, string_value, name, 0),
-    PB_FIELD2(  4, DOUBLE  , OPTIONAL, STATIC, OTHER, openxc_TranslatedMessage, numeric_value, string_value, 0),
-    PB_FIELD2(  5, BOOL    , OPTIONAL, STATIC, OTHER, openxc_TranslatedMessage, boolean_value, numeric_value, 0),
-    PB_FIELD2(  6, STRING  , OPTIONAL, STATIC, OTHER, openxc_TranslatedMessage, string_event, boolean_value, 0),
-    PB_FIELD2(  7, DOUBLE  , OPTIONAL, STATIC, OTHER, openxc_TranslatedMessage, numeric_event, string_event, 0),
-    PB_FIELD2(  8, BOOL    , OPTIONAL, STATIC, OTHER, openxc_TranslatedMessage, boolean_event, numeric_event, 0),
+    PB_FIELD2(  1, ENUM    , OPTIONAL, STATIC  , FIRST, openxc_TranslatedMessage, type, type, 0),
+    PB_FIELD2(  2, STRING  , OPTIONAL, STATIC  , OTHER, openxc_TranslatedMessage, name, type, 0),
+    PB_FIELD2(  3, STRING  , OPTIONAL, STATIC  , OTHER, openxc_TranslatedMessage, string_value, name, 0),
+    PB_FIELD2(  4, DOUBLE  , OPTIONAL, STATIC  , OTHER, openxc_TranslatedMessage, numeric_value, string_value, 0),
+    PB_FIELD2(  5, BOOL    , OPTIONAL, STATIC  , OTHER, openxc_TranslatedMessage, boolean_value, numeric_value, 0),
+    PB_FIELD2(  6, STRING  , OPTIONAL, STATIC  , OTHER, openxc_TranslatedMessage, string_event, boolean_value, 0),
+    PB_FIELD2(  7, DOUBLE  , OPTIONAL, STATIC  , OTHER, openxc_TranslatedMessage, numeric_event, string_event, 0),
+    PB_FIELD2(  8, BOOL    , OPTIONAL, STATIC  , OTHER, openxc_TranslatedMessage, boolean_event, numeric_event, 0),
     PB_LAST_FIELD
 };
 
index 81a0779..bc84515 100644 (file)
@@ -1,5 +1,5 @@
 /* Automatically generated nanopb header */
-/* Generated by nanopb-0.2.4-dev at Thu Oct 24 10:06:38 2013. */
+/* Generated by nanopb-0.2.5 at Fri Jan 17 14:02:23 2014. */
 
 #ifndef _PB_OPENXC_PB_H_
 #define _PB_OPENXC_PB_H_
@@ -86,8 +86,8 @@ extern const pb_field_t openxc_RawMessage_fields[4];
 extern const pb_field_t openxc_TranslatedMessage_fields[9];
 
 /* Maximum encoded size of messages (where known) */
-#define openxc_VehicleMessage_size               368
-#define openxc_RawMessage_size                   23
+#define openxc_VehicleMessage_size               373
+#define openxc_RawMessage_size                   28
 #define openxc_TranslatedMessage_size            334
 
 #ifdef __cplusplus
index 388d4de..906c828 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 388d4de833cf4e2127b2ab0489cb6b14ecc0cbb5
+Subproject commit 906c8283b5995eb7b27f4958a6a6502ae0deea07
index 1863c0d..40ebed9 100644 (file)
@@ -1,2 +1,3 @@
-# TODO this isn't working yet, so I'm defining it for everything in the Makefile
-openxc_TranslatedMessage.name max_size:100
+openxc.TranslatedMessage.name max_size:100
+openxc.TranslatedMessage.string_value max_size:100
+openxc.TranslatedMessage.string_event max_size:100