apps/agl-service-can-low-level.git
12 years agoAdd PB_MANY_FIELDS option for supporting fields > 255.
Petteri Aimonen [Sat, 30 Jun 2012 16:28:49 +0000 (19:28 +0300)]
Add PB_MANY_FIELDS option for supporting fields > 255.

Add generator warning if this is necessary.
Fixes issue #14.

12 years agoWarn if PB_MAX_REQUIRED_FIELDS is not large enough.
Petteri Aimonen [Sat, 30 Jun 2012 15:23:18 +0000 (18:23 +0300)]
Warn if PB_MAX_REQUIRED_FIELDS is not large enough.

12 years agoImprove the detection of missing required fields.
Petteri Aimonen [Sat, 30 Jun 2012 15:10:08 +0000 (18:10 +0300)]
Improve the detection of missing required fields.

Now the limit of tracked fields is configurable at compile-time using
PB_MAX_REQUIRED_FIELDS. Added related test and updated documentation.

Fixes issue #18.

12 years agoFixed formatting in docs
Petteri Aimonen [Mon, 25 Jun 2012 19:17:13 +0000 (22:17 +0300)]
Fixed formatting in docs

12 years agoDocumented NANOPB_INTERNALS compilation option
Petteri Aimonen [Mon, 25 Jun 2012 19:08:05 +0000 (22:08 +0300)]
Documented NANOPB_INTERNALS compilation option

12 years agoNote about __BIG_ENDIAN__ compilation option
Petteri Aimonen [Mon, 25 Jun 2012 18:45:40 +0000 (21:45 +0300)]
Note about __BIG_ENDIAN__ compilation option

12 years agoFix error when .proto contains no Messages (e.g. just enums).
Petteri Aimonen [Wed, 20 Jun 2012 18:31:23 +0000 (21:31 +0300)]
Fix error when .proto contains no Messages (e.g. just enums).

Thanks to Paul Fertser for reporting this bug.

12 years agoAdded example on how to handle unions.
Petteri Aimonen [Sat, 16 Jun 2012 11:08:40 +0000 (14:08 +0300)]
Added example on how to handle unions.

12 years agoAdded new functions to public interface in pb_decode.h.
Petteri Aimonen [Sat, 16 Jun 2012 11:07:37 +0000 (14:07 +0300)]
Added new functions to public interface in pb_decode.h.

pb_decode_tag and pb_skip_field allow manually iterating the fields
in a message.

12 years agoFix non-constant initializer errors with some compilers.
Petteri Aimonen [Wed, 13 Jun 2012 18:43:40 +0000 (21:43 +0300)]
Fix non-constant initializer errors with some compilers.

Fixes issue #13. Thanks to Kevin Worth for reporting.

12 years agoAdd descriptor.proto into the #include exclusion list
Petteri Aimonen [Tue, 12 Jun 2012 14:51:08 +0000 (17:51 +0300)]
Add descriptor.proto into the #include exclusion list

12 years agoMerge branch 'master' of https://code.google.com/p/nanopb
Petteri Aimonen [Sat, 19 May 2012 18:25:47 +0000 (21:25 +0300)]
Merge branch 'master' of https://code.google.com/p/nanopb

12 years agoAdd better error messages in the generator when libraries cannot be imported.
Petteri Aimonen [Sat, 19 May 2012 18:25:10 +0000 (21:25 +0300)]
Add better error messages in the generator when libraries cannot be imported.
Fixes issue #5.

12 years agoFix 64-bitness warnings in the example.
Petteri Aimonen [Sat, 19 May 2012 18:15:52 +0000 (21:15 +0300)]
Fix 64-bitness warnings in the example.

Fixes issues 9 and 10.

12 years agoFixing compiler warnings, mostly related to unused parameters.
Petteri Aimonen [Wed, 18 Apr 2012 17:15:36 +0000 (20:15 +0300)]
Fixing compiler warnings, mostly related to unused parameters.

Thanks to David Hotham for the patch. Fixes issue 8.

12 years agoRefactoring the field encoder interface.
Petteri Aimonen [Thu, 1 Mar 2012 11:46:52 +0000 (13:46 +0200)]
Refactoring the field encoder interface.

Replaced the confusing pb_enc_* functions with new pb_encode_* functions that
have a cleaner interface. Updated documentation.

Got rid of the endian_copy stuff in pb_encode.c, instead using C casts to do it automatically.
This makes the code safer and also reduces binary size by about 5%.

Fixes Issue 6.

12 years agoModified nanopb_generator.py to generate includes for other .proto files.
Petteri Aimonen [Wed, 15 Feb 2012 15:34:48 +0000 (17:34 +0200)]
Modified nanopb_generator.py to generate includes for other .proto files.
Implementation was suggested by extremeblue99.
Fixes issue 4.

12 years agoFixed nanopb_generator.py to read the input file in binary mode.
Petteri Aimonen [Mon, 30 Jan 2012 08:36:17 +0000 (10:36 +0200)]
Fixed nanopb_generator.py to read the input file in binary mode.

12 years agoImproved documentation on field decoders.
Petteri Aimonen [Mon, 23 Jan 2012 16:13:26 +0000 (18:13 +0200)]
Improved documentation on field decoders.

12 years agoFixed issue 1 reported by Erik Rosen:
Petteri Aimonen [Thu, 12 Jan 2012 17:08:05 +0000 (19:08 +0200)]
Fixed issue 1 reported by Erik Rosen:
The size of non-callback bytes-fields was miscalculated, which
caused all following fields in a message to contain garbage.

Previous commit contains a testcase for this.

This fix changes the generated message description. If your protocol uses
bytes-fields, you should regenerate *.pb.c.

12 years agoAdded an encode/decode test for 'required' fields of all types.
Petteri Aimonen [Thu, 12 Jan 2012 17:06:33 +0000 (19:06 +0200)]
Added an encode/decode test for 'required' fields of all types.

12 years agoFixed a bug in the generator that caused a compiler error on sfixed32 and sfixed64...
Petteri Aimonen [Thu, 12 Jan 2012 16:10:12 +0000 (18:10 +0200)]
Fixed a bug in the generator that caused a compiler error on sfixed32 and sfixed64 fields.

12 years agoLinewrapping in license
Petteri Aimonen [Fri, 6 Jan 2012 17:04:49 +0000 (19:04 +0200)]
Linewrapping in license

12 years agoAdded logo for project :)
Petteri Aimonen [Thu, 5 Jan 2012 18:35:12 +0000 (18:35 +0000)]
Added logo for project :)

git-svn-id: https://svn.kapsi.fi/jpa/nanopb@1095 e3a754e5-d11d-0410-8d38-ebb782a927b9

12 years agoMake the fuzztest runnable again
Petteri Aimonen [Fri, 30 Dec 2011 09:05:01 +0000 (09:05 +0000)]
Make the fuzztest runnable again

git-svn-id: https://svn.kapsi.fi/jpa/nanopb@1091 e3a754e5-d11d-0410-8d38-ebb782a927b9

12 years agoExpanding the tests to better cover decoding from memory buffer.
Petteri Aimonen [Fri, 30 Dec 2011 08:57:27 +0000 (08:57 +0000)]
Expanding the tests to better cover decoding from memory buffer.

git-svn-id: https://svn.kapsi.fi/jpa/nanopb@1090 e3a754e5-d11d-0410-8d38-ebb782a927b9

12 years agoFixed a bug related to submessage encoding into memory buffer.
Petteri Aimonen [Fri, 30 Dec 2011 08:43:50 +0000 (08:43 +0000)]
Fixed a bug related to submessage encoding into memory buffer.
Stream state was not copied back from substream in pb_enc_submessage,
which caused garbage output if the stream callback modified the state.

Expanded tests to cover this problem.

Thanks to PaweÅ‚ Pery for debugging and reporting this problem.

git-svn-id: https://svn.kapsi.fi/jpa/nanopb@1089 e3a754e5-d11d-0410-8d38-ebb782a927b9

12 years agoMerged 0005-Handle-endianness-correctly.patch by Matt Kern.
Petteri Aimonen [Wed, 30 Nov 2011 15:08:32 +0000 (15:08 +0000)]
Merged 0005-Handle-endianness-correctly.patch by Matt Kern.
On big endian machines, pb_dec_fixed32 and pb_dec_fixed64 were
incorrectly overwriting the result value even if reading failed.

git-svn-id: https://svn.kapsi.fi/jpa/nanopb@1022 e3a754e5-d11d-0410-8d38-ebb782a927b9

12 years agoMerged 0004-Added-missing-trailing-newlines.patch by Matt Kern.
Petteri Aimonen [Wed, 30 Nov 2011 15:03:23 +0000 (15:03 +0000)]
Merged 0004-Added-missing-trailing-newlines.patch by Matt Kern.
Just adding newlines at the end of files to satisfy old GCC versions.

git-svn-id: https://svn.kapsi.fi/jpa/nanopb@1021 e3a754e5-d11d-0410-8d38-ebb782a927b9

12 years agoMerged 0003-Fixed-format-specifiers.patch by Matt Kern.
Petteri Aimonen [Wed, 30 Nov 2011 15:01:59 +0000 (15:01 +0000)]
Merged 0003-Fixed-format-specifiers.patch by Matt Kern.
Fixes cross-platform issues with the length modifier in printf specifiers,
most importantly %d -> %ld.

git-svn-id: https://svn.kapsi.fi/jpa/nanopb@1020 e3a754e5-d11d-0410-8d38-ebb782a927b9

12 years agoAdded Makefile for generating nanopb_pb2.py.
Petteri Aimonen [Wed, 30 Nov 2011 14:59:25 +0000 (14:59 +0000)]
Added Makefile for generating nanopb_pb2.py.
I still left the precompiled version in place, as it "often works" :)

git-svn-id: https://svn.kapsi.fi/jpa/nanopb@1019 e3a754e5-d11d-0410-8d38-ebb782a927b9

12 years agoFix some compiler warnings in strict C89 mode
Petteri Aimonen [Thu, 10 Nov 2011 16:19:55 +0000 (16:19 +0000)]
Fix some compiler warnings in strict C89 mode
Contributed by Michael Poole.

git-svn-id: https://svn.kapsi.fi/jpa/nanopb@1004 e3a754e5-d11d-0410-8d38-ebb782a927b9

12 years agoSome additions to documentation
Petteri Aimonen [Fri, 4 Nov 2011 07:22:05 +0000 (07:22 +0000)]
Some additions to documentation

git-svn-id: https://svn.kapsi.fi/jpa/nanopb@1003 e3a754e5-d11d-0410-8d38-ebb782a927b9

12 years agoDocumentation outdated phrase
Petteri Aimonen [Sun, 18 Sep 2011 16:10:08 +0000 (16:10 +0000)]
Documentation outdated phrase

git-svn-id: https://svn.kapsi.fi/jpa/nanopb@980 e3a754e5-d11d-0410-8d38-ebb782a927b9

12 years agoAdded comments to the simplest decode/encode examples.
Petteri Aimonen [Sun, 18 Sep 2011 16:04:45 +0000 (16:04 +0000)]
Added comments to the simplest decode/encode examples.

git-svn-id: https://svn.kapsi.fi/jpa/nanopb@979 e3a754e5-d11d-0410-8d38-ebb782a927b9

12 years agoAdded README
Petteri Aimonen [Wed, 14 Sep 2011 10:36:04 +0000 (10:36 +0000)]
Added README

git-svn-id: https://svn.kapsi.fi/jpa/nanopb@976 e3a754e5-d11d-0410-8d38-ebb782a927b9

12 years agoFixed a bunch of bugs related to callback fields.
Petteri Aimonen [Tue, 13 Sep 2011 16:14:08 +0000 (16:14 +0000)]
Fixed a bunch of bugs related to callback fields.

Most importantly, callback fields in submessages were being overwritten with garbage, causing segfaults.

Additionally, converted PB_LTYPE_FIXED to PB_LTYPE_FIXED32 and PB_LTYPE_FIXED64. This makes the interface
a bit easier to use, and in addition runs faster.

git-svn-id: https://svn.kapsi.fi/jpa/nanopb@975 e3a754e5-d11d-0410-8d38-ebb782a927b9

12 years agoTests for callback fields
Petteri Aimonen [Mon, 12 Sep 2011 18:53:33 +0000 (18:53 +0000)]
Tests for callback fields

git-svn-id: https://svn.kapsi.fi/jpa/nanopb@974 e3a754e5-d11d-0410-8d38-ebb782a927b9

12 years agoPython 2.6 compatibility for the generator
Petteri Aimonen [Thu, 1 Sep 2011 08:30:48 +0000 (08:30 +0000)]
Python 2.6 compatibility for the generator

git-svn-id: https://svn.kapsi.fi/jpa/nanopb@973 e3a754e5-d11d-0410-8d38-ebb782a927b9

12 years agoCyclic messages not supported - thanks to Josh for pointing this out.
Petteri Aimonen [Wed, 24 Aug 2011 19:03:28 +0000 (19:03 +0000)]
Cyclic messages not supported - thanks to Josh for pointing this out.

git-svn-id: https://svn.kapsi.fi/jpa/nanopb@972 e3a754e5-d11d-0410-8d38-ebb782a927b9

12 years agoMake fuzz test runnable again :)
Petteri Aimonen [Wed, 24 Aug 2011 18:23:05 +0000 (18:23 +0000)]
Make fuzz test runnable again :)

git-svn-id: https://svn.kapsi.fi/jpa/nanopb@971 e3a754e5-d11d-0410-8d38-ebb782a927b9

12 years agoGenerator bugfixes
Petteri Aimonen [Wed, 24 Aug 2011 13:52:08 +0000 (13:52 +0000)]
Generator bugfixes

git-svn-id: https://svn.kapsi.fi/jpa/nanopb@970 e3a754e5-d11d-0410-8d38-ebb782a927b9

12 years agodocumentation
Petteri Aimonen [Wed, 24 Aug 2011 12:57:16 +0000 (12:57 +0000)]
documentation

git-svn-id: https://svn.kapsi.fi/jpa/nanopb@969 e3a754e5-d11d-0410-8d38-ebb782a927b9

12 years agomakefile fix
Petteri Aimonen [Wed, 24 Aug 2011 12:14:44 +0000 (12:14 +0000)]
makefile fix

git-svn-id: https://svn.kapsi.fi/jpa/nanopb@968 e3a754e5-d11d-0410-8d38-ebb782a927b9

12 years agowrong file name
Petteri Aimonen [Wed, 24 Aug 2011 12:13:24 +0000 (12:13 +0000)]
wrong file name

git-svn-id: https://svn.kapsi.fi/jpa/nanopb@967 e3a754e5-d11d-0410-8d38-ebb782a927b9

12 years agoMore unittests
Petteri Aimonen [Tue, 23 Aug 2011 18:50:09 +0000 (18:50 +0000)]
More unittests

git-svn-id: https://svn.kapsi.fi/jpa/nanopb@966 e3a754e5-d11d-0410-8d38-ebb782a927b9

12 years agoChanged autogenerated file naming from foo.c to foo.pb.c
Petteri Aimonen [Tue, 23 Aug 2011 16:16:33 +0000 (16:16 +0000)]
Changed autogenerated file naming from foo.c to foo.pb.c

git-svn-id: https://svn.kapsi.fi/jpa/nanopb@965 e3a754e5-d11d-0410-8d38-ebb782a927b9

12 years agomore unittests
Petteri Aimonen [Tue, 23 Aug 2011 15:57:47 +0000 (15:57 +0000)]
more unittests

git-svn-id: https://svn.kapsi.fi/jpa/nanopb@964 e3a754e5-d11d-0410-8d38-ebb782a927b9

12 years agolicense
Petteri Aimonen [Tue, 23 Aug 2011 15:57:40 +0000 (15:57 +0000)]
license

git-svn-id: https://svn.kapsi.fi/jpa/nanopb@963 e3a754e5-d11d-0410-8d38-ebb782a927b9

12 years agoAllocated extension number
Petteri Aimonen [Tue, 23 Aug 2011 15:57:20 +0000 (15:57 +0000)]
Allocated extension number

git-svn-id: https://svn.kapsi.fi/jpa/nanopb@962 e3a754e5-d11d-0410-8d38-ebb782a927b9

12 years agocheck return values
Petteri Aimonen [Tue, 23 Aug 2011 13:33:43 +0000 (13:33 +0000)]
check return values

git-svn-id: https://svn.kapsi.fi/jpa/nanopb@961 e3a754e5-d11d-0410-8d38-ebb782a927b9

12 years agoMore unittests
Petteri Aimonen [Tue, 23 Aug 2011 09:59:18 +0000 (09:59 +0000)]
More unittests

git-svn-id: https://svn.kapsi.fi/jpa/nanopb@960 e3a754e5-d11d-0410-8d38-ebb782a927b9

12 years agounittests, change to PB_LTYPE_BYTES data size
Petteri Aimonen [Mon, 22 Aug 2011 18:57:23 +0000 (18:57 +0000)]
unittests, change to PB_LTYPE_BYTES data size

git-svn-id: https://svn.kapsi.fi/jpa/nanopb@959 e3a754e5-d11d-0410-8d38-ebb782a927b9

12 years agoexample client
Petteri Aimonen [Mon, 22 Aug 2011 15:22:41 +0000 (15:22 +0000)]
example client

git-svn-id: https://svn.kapsi.fi/jpa/nanopb@958 e3a754e5-d11d-0410-8d38-ebb782a927b9

12 years agoExample
Petteri Aimonen [Wed, 17 Aug 2011 19:03:06 +0000 (19:03 +0000)]
Example

git-svn-id: https://svn.kapsi.fi/jpa/nanopb@957 e3a754e5-d11d-0410-8d38-ebb782a927b9

12 years agoDocs
Petteri Aimonen [Tue, 16 Aug 2011 17:28:59 +0000 (17:28 +0000)]
Docs

git-svn-id: https://svn.kapsi.fi/jpa/nanopb@956 e3a754e5-d11d-0410-8d38-ebb782a927b9

12 years agoMore documentation, small improvements
Petteri Aimonen [Sun, 14 Aug 2011 20:11:05 +0000 (20:11 +0000)]
More documentation, small improvements

git-svn-id: https://svn.kapsi.fi/jpa/nanopb@955 e3a754e5-d11d-0410-8d38-ebb782a927b9

12 years agoDocumenting and improving stream behaviour
Petteri Aimonen [Thu, 11 Aug 2011 19:22:36 +0000 (19:22 +0000)]
Documenting and improving stream behaviour

git-svn-id: https://svn.kapsi.fi/jpa/nanopb@954 e3a754e5-d11d-0410-8d38-ebb782a927b9

12 years agoStarted writing documentation
Petteri Aimonen [Wed, 10 Aug 2011 20:08:06 +0000 (20:08 +0000)]
Started writing documentation

git-svn-id: https://svn.kapsi.fi/jpa/nanopb@953 e3a754e5-d11d-0410-8d38-ebb782a927b9

12 years agoUnittests for encode
Petteri Aimonen [Wed, 10 Aug 2011 17:54:15 +0000 (17:54 +0000)]
Unittests for encode

git-svn-id: https://svn.kapsi.fi/jpa/nanopb@952 e3a754e5-d11d-0410-8d38-ebb782a927b9

12 years agoEncoder
Petteri Aimonen [Thu, 4 Aug 2011 16:49:32 +0000 (16:49 +0000)]
Encoder

git-svn-id: https://svn.kapsi.fi/jpa/nanopb@951 e3a754e5-d11d-0410-8d38-ebb782a927b9

12 years agoFirst version of header generator
Petteri Aimonen [Sun, 31 Jul 2011 12:55:09 +0000 (12:55 +0000)]
First version of header generator

git-svn-id: https://svn.kapsi.fi/jpa/nanopb@950 e3a754e5-d11d-0410-8d38-ebb782a927b9

12 years agounittests (some)
Petteri Aimonen [Sat, 30 Jul 2011 09:59:08 +0000 (09:59 +0000)]
unittests (some)

git-svn-id: https://svn.kapsi.fi/jpa/nanopb@949 e3a754e5-d11d-0410-8d38-ebb782a927b9

12 years agoiter
Petteri Aimonen [Thu, 28 Jul 2011 15:38:05 +0000 (15:38 +0000)]
iter

git-svn-id: https://svn.kapsi.fi/jpa/nanopb@948 e3a754e5-d11d-0410-8d38-ebb782a927b9

12 years agogit-svn-id: https://svn.kapsi.fi/jpa/nanopb@947 e3a754e5-d11d-0410-8d38-ebb782a927b9
Petteri Aimonen [Thu, 28 Jul 2011 14:54:03 +0000 (14:54 +0000)]
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@947 e3a754e5-d11d-0410-8d38-ebb782a927b9

12 years agobugfix
Petteri Aimonen [Wed, 27 Jul 2011 20:06:17 +0000 (20:06 +0000)]
bugfix

git-svn-id: https://svn.kapsi.fi/jpa/nanopb@946 e3a754e5-d11d-0410-8d38-ebb782a927b9

12 years agogit-svn-id: https://svn.kapsi.fi/jpa/nanopb@945 e3a754e5-d11d-0410-8d38-ebb782a927b9
Petteri Aimonen [Wed, 27 Jul 2011 20:01:50 +0000 (20:01 +0000)]
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@945 e3a754e5-d11d-0410-8d38-ebb782a927b9

12 years agoMaking code ansi-compatible
Petteri Aimonen [Wed, 27 Jul 2011 19:57:43 +0000 (19:57 +0000)]
Making code ansi-compatible

git-svn-id: https://svn.kapsi.fi/jpa/nanopb@944 e3a754e5-d11d-0410-8d38-ebb782a927b9

12 years agoImprovements, array support
Petteri Aimonen [Wed, 27 Jul 2011 19:22:11 +0000 (19:22 +0000)]
Improvements, array support

git-svn-id: https://svn.kapsi.fi/jpa/nanopb@943 e3a754e5-d11d-0410-8d38-ebb782a927b9

12 years agoFirst version of decoding
Petteri Aimonen [Mon, 25 Jul 2011 20:42:48 +0000 (20:42 +0000)]
First version of decoding

git-svn-id: https://svn.kapsi.fi/jpa/nanopb@942 e3a754e5-d11d-0410-8d38-ebb782a927b9