summaryrefslogtreecommitdiffstats
path: root/generator
AgeCommit message (Collapse)AuthorFilesLines
2015-09-13Fix maximum encoded size for negative enums (issue #166).Petteri Aimonen1-1/+15
2015-09-12Make the generator understand included files (issue #165).Petteri Aimonen1-29/+59
This will allow message sizes and enum options to be available across the include files. Currently searching for .options files for included files may not work for all path combinations, this is related to issue #116. Should probably make a pull request to protoc about that.
2015-09-12Refactor the generator logic into a ProtoFile class.Petteri Aimonen1-285/+297
In preparation for multi-file support in generator. No functional changes yet.
2015-09-12Fix handling of unsigned 8- or 16-bit enums.Petteri Aimonen1-1/+16
Previously unsigned enums would throw errors on decoding if the value went outside the signed range (issue #164). Currently only helps for enums defined within the same file, but solving issue #165 will make it work for multiple files also.
2015-09-12Add packed_enum option to generator.Petteri Aimonen2-1/+10
This can be generally useful for saving RAM, but also makes it easier to test for issue #164.
2015-04-28Fix for previous (issue #155)Petteri Aimonen1-1/+1
2015-04-28Prefer python2 in generator/protoc-gen-nanopb.Petteri Aimonen1-0/+1
Update issue 155 Status: FixedInGit
2015-04-10Setting version to 0.3.4-devPetteri Aimonen1-1/+1
2015-04-10Publishing nanopb-0.3.3Petteri Aimonen1-1/+1
2015-04-08Fix problem with plugin options on Python 2.7.2 and older.Petteri Aimonen1-1/+8
Update issue 153 Status: FixedInGit
2015-04-03Improve comment support in .options files.Petteri Aimonen1-2/+7
Update issue 145 Status: FixedInGit
2015-04-03Always define enum long names so that cross-file references work.Petteri Aimonen1-0/+7
Update issue 118 Status: FixedInGit
2015-04-03Generate #defines for plain message idsPetteri Aimonen1-3/+7
2015-03-22Use make_identifier() to create the name for FOO_MESSAGES define.Petteri Aimonen1-3/+4
This handles special charaters like in "my-file.proto" properly. Also use headerbasename instead of full path, so that compiling files with relative path doesn't create symbols like FOO/BAR/BAZ_MESSAGES.
2015-03-22nanopb_generator.py: emit macros for msgid message type id useMichael Haberler1-4/+30
2015-03-22nanopb.proto: add msgid message-level optionMichael Haberler1-0/+3
2015-02-26Better error messages for syntax errors in .options filePetteri Aimonen1-2/+16
2015-02-26Fix generator error when long_names:false is combined with Oneofs.Petteri Aimonen1-0/+3
Update issue 147 Status: FixedInGit
2015-01-27Fix generator bug when oneof is first field in a message.Petteri Aimonen1-1/+0
Added test case for the same. Update issue 142 Status: FixedInGit
2015-01-24Setting version to nanopb-0.3.3-devPetteri Aimonen1-1/+1
2015-01-24Publishing nanopb-0.3.2Petteri Aimonen1-1/+1
2015-01-23Fix encoded_size #defines for oneof messages.Petteri Aimonen1-1/+11
The sizes are represented as EncodedSize() instances, which cause max() operation to sort them by address instead of value. This caused pretty much random item to be selected for the maximum. Update issue 141 Status: FixedInGit
2015-01-11New generator options for oneofs: allow skipping or generating as normal ↵Petteri Aimonen2-10/+23
'optional' fields. The behaviour with no_unions:true is the same as of nanopb 0.3.1 and earlier.
2015-01-07Fix generator error with OneOfsPetteri Aimonen1-2/+3
2015-01-05Allow using 8/16/32/64 as values in int_size settingPetteri Aimonen1-4/+4
2015-01-04Fix build failurePetteri Aimonen1-1/+1
2015-01-04Implement support for oneofs (C unions).Petteri Aimonen1-72/+192
Basic test included, should probably add an oneof to the AllTypes test also. Update issue 131 Status: Started
2015-01-04Add int_size option for generator.Petteri Aimonen2-15/+41
This allows overriding the integer field types to e.g. uint8_t for saving RAM. Update issue 139 Status: FixedInGit
2014-12-26Include the field type in a comment for extension fieldsPetteri Aimonen1-1/+2
2014-12-22Verify build with protobuf-3.0.0, fix problems.Petteri Aimonen3-26/+124
Also updated descriptor.proto from protobuf-3.0.0.
2014-09-16Set version to nanopb-0.3.2-devPetteri Aimonen1-1/+1
2014-09-11Publishing nanopb-0.3.1Petteri Aimonen1-1/+1
2014-09-07Fix compilation error with generated initializers for repeated pointer fieldsPetteri Aimonen1-0/+2
2014-08-28Fix cyclic messages support in generator. Beginnings of test.Petteri Aimonen1-1/+1
Update issue 130 Status: Started
2014-08-26Setting version to 0.3.1-devPetteri Aimonen1-1/+1
2014-08-26Publishing nanopb-0.3.0Petteri Aimonen1-1/+1
2014-08-19Add #if guard for .pb.h version.Petteri Aimonen1-1/+11
The version in PB_PROTO_HEADER_VERSION can be bumped whenever there is a breaking change to the generated files, and it will then alert to the difference. Update issue 129 Status: FixedInGit
2014-08-18Rename poorly named identifier to avoid name conflicts.Petteri Aimonen1-2/+2
Update issue 106 Status: FixedInGit
2014-08-18Rename UNUSED() and STATIC_ASSERT() macros with PB_ prefix.Petteri Aimonen1-3/+3
This avoids possible namespace conflicts with other macros.
2014-08-18Change the _count fields to use pb_size_t datatype.Petteri Aimonen1-6/+3
Update issue 82 Status: FixedInGit
2014-08-09Setting version to 0.3.0-devPetteri Aimonen1-1/+1
2014-08-09Publishing nanopb-0.2.9Petteri Aimonen1-1/+1
2014-08-04Generate #defines for initializing message structures.Petteri Aimonen1-16/+79
Usage like: MyMessage foo = MyMessage_init_default; MyMessage_init_default will initialize to default values defined in .proto. MyMessage_init_zero will initialize to null/zero values. Same results as {} or {0}, but will avoid compiler warnings by initializing everything explicitly. Update issue 79 Status: FixedInGit
2014-07-20Add skip_message option to generator.Petteri Aimonen2-0/+7
Update issue 121 Status: FixedInGit
2014-07-20Do not automatically add a dot with generator -e option.Petteri Aimonen1-6/+6
Now -e option in generator is more versatile. Especially it avoids double-dot problem with some build systems. Given foobar.proto, we now get: -e .pb => foobar.pb.c (default) -e _pb => foobar_pb.c -e '' => foobar.c Note that if you have used -e option previously, you will have to prepend . to the argument to get the same filenames as before. Update issue 122 Status: FixedInGit
2014-07-20Give better messages about the .options file path.Petteri Aimonen1-1/+10
Update issue 124 Status: FixedInGit
2014-07-20Fix problem with .options file and extension fields.Petteri Aimonen1-1/+1
The options for an extension field were being looked up under wrong name (MessageName instead of MessageName.fieldname). Fixed the problem and added regression test. Created a new subfolder for regression test cases. Update issue 125 Status: FixedInGit
2014-05-20Setting version to 0.2.9-devPetteri Aimonen1-1/+1
2014-05-20Publishing nanopb-0.2.8Petteri Aimonen1-1/+1
2014-04-18Add option to not add timestamps to .pb.h and .pb.c preambles.Petteri Aimonen1-2/+10
Patch by rusnakp. Update issue 115 Status: FixedInGit