X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;ds=sidebyside;f=docs%2Fconcepts.rst;h=2e0d3f9b1f0765f0f52d7b42943ce82f9eda6171;hb=07375a126337916f3a34ea94f8085b8f89d789a1;hp=ef880cff95a8edbf52e4b1b1a40b918acf4a309f;hpb=bc2c47ef77a29e7efdaf088b9a0f7bf15a53c976;p=apps%2Fagl-service-can-low-level.git diff --git a/docs/concepts.rst b/docs/concepts.rst index ef880cff..2e0d3f9b 100644 --- a/docs/concepts.rst +++ b/docs/concepts.rst @@ -148,7 +148,7 @@ Most Protocol Buffers datatypes have directly corresponding C datatypes, such as 1) Strings, bytes and repeated fields of any type map to callback functions by default. 2) If there is a special option *(nanopb).max_size* specified in the .proto file, string maps to null-terminated char array and bytes map to a structure containing a char array and a size field. -3) If *(nanopb).type* is set to *FT_INLINE* and *(nanopb).max_size* is also set, then bytes map to an inline byte array of fixed size. +3) If *(nanopb).fixed_length* is set to *true* and *(nanopb).max_size* is also set, then bytes map to an inline byte array of fixed size. 4) If there is a special option *(nanopb).max_count* specified on a repeated field, it maps to an array of whatever type is being repeated. Another field will be created for the actual number of entries stored. =============================================================================== ======================= @@ -164,7 +164,7 @@ required bytes data = 1 [(nanopb).max_size = 40]; | pb_byte_t bytes[40]; | } Person_data_t; | Person_data_t data; -required bytes data = 1 [(nanopb).max_size = 40, (nanopb.type) = FT_INLINE]; | pb_byte_t data[40]; +required bytes data = 1 [(nanopb).max_size = 40, (nanopb).fixed_length = true]; | pb_byte_t data[40]; =============================================================================== ======================= The maximum lengths are checked in runtime. If string/bytes/array exceeds the allocated length, *pb_decode* will return false.