62 Commits

Author SHA1 Message Date
Petteri Aimonen
acd7291791 Publishing nanopb-0.3.2 2015-01-24 17:33:01 +02:00
Petteri Aimonen
8d12fecc7e New generator options for oneofs: allow skipping or generating as normal 'optional' fields.
The behaviour with no_unions:true is the same as of nanopb 0.3.1 and earlier.
2015-01-11 19:45:16 +02:00
Petteri Aimonen
50c67ecec4 Add int_size option for generator.
This allows overriding the integer field types to e.g. uint8_t for
saving RAM.

Update issue 139
Status: FixedInGit
2015-01-04 12:02:15 +02:00
Petteri Aimonen
cfc517f36b Add compilation option to disable struct packing.
Update issue 136
Status: FixedInGit
2014-12-22 20:52:40 +02:00
Petteri Aimonen
d82a264c41 Update security model with regards to pointer fields 2014-09-07 15:58:38 +03:00
Petteri Aimonen
9e866b4853 Add missing * in migration docs 2014-08-26 18:22:13 +03:00
Petteri Aimonen
e60dee698a Update changelog 2014-08-26 18:08:01 +03:00
Petteri Aimonen
be0b9e047a Rename poorly named identifier to avoid name conflicts.
Update issue 106
Status: FixedInGit
2014-08-18 21:11:10 +03:00
Petteri Aimonen
1dd9f1900f Change the _count fields to use pb_size_t datatype.
Update issue 82
Status: FixedInGit
2014-08-18 20:09:52 +03:00
Petteri Aimonen
adf0ab81d4 Add document detailing migration from old versions 2014-08-10 17:40:17 +03:00
Petteri Aimonen
ba2ab9ea65 Docs update, remove malloc from limitations list 2014-04-26 20:11:54 +03:00
Petteri Aimonen
70dee34da6 Add some missing 'static' specifiers
Update issue 91
Status: FixedInGit
2014-04-02 21:08:15 +03:00
Petteri Aimonen
ab62402059 Documentation updates 2014-03-16 15:52:19 +02:00
Petteri Aimonen
ae7b9a3bd3 Fix path change: compat/ -> extra/ 2013-12-29 20:41:36 +02:00
Petteri Aimonen
287207841d Remove the NANOPB_INTERNALS functions from public API.
These have been deprecated since nanopb-0.1.6 (some since 0.1.3).
Equivalent functions with better interface are available in the API.

Update issue 91
Status: FixedInGit
2013-10-29 16:32:47 +02:00
Petteri Aimonen
c7b4ce0293 Add a definition of the security model to the documentation. 2013-10-29 15:44:35 +02:00
Petteri Aimonen
73142ba082 Add a new very simple example 2013-09-13 13:35:25 +03:00
Petteri Aimonen
f15093e8bd Document field extensions support
Update issue 17
Status: FixedInGit
2013-08-08 20:42:46 +03:00
Petteri Aimonen
b663909fb6 Document PB_SYSTEM_HEADER 2013-08-08 20:05:30 +03:00
Petteri Aimonen
f064c2c48a Fix formatting in documentation 2013-07-16 11:31:38 +03:00
Petteri Aimonen
0ed3158560 Add section in pb.h for changing compilation settings.
Update issue 76
Status: FixedInGit
2013-07-06 15:27:31 +03:00
Petteri Aimonen
4b705bf64b Add error message macros to API reference. 2013-07-06 15:25:42 +03:00
Petteri Aimonen
6e9e532927 Document the .options file usage.
Also add note about the 'packed' message option being incompatible
with CPUs that do not support unaligned access.

Update issue 12
Status: FixedInGit

Update issue 77
Status: FixedInGit
2013-07-06 13:49:47 +03:00
Petteri Aimonen
214b0eae8a Change the callback function to use void**.
NOTE: This change breaks backwards-compatibility by default.
If you have old callback functions, you can define PB_OLD_CALLBACK_STYLE
to retain the old behaviour.

If you want to convert your old callbacks to new signature, you need
to do the following:

1) Change decode callback argument to   void **arg
      and encode callback argument to   void * const *arg.

2) Change any reference to arg into *arg.

The rationale for making the new behaviour the default is that it
simplifies the common case of "allocate some memory in decode callback".

Update issue 69
Status: FixedInGit
2013-04-02 19:55:21 +03:00
Petteri Aimonen
f8a143fdfe Update documentation 2013-03-02 16:27:31 +02:00
Petteri Aimonen
4ba6a3027d Add compile-time option PB_BUFFER_ONLY.
This allows slight optimizations if only memory buffer support
(as opposed to stream callbacks) is wanted. On ARM difference
is -12% execution time, -4% code size when enabled.
2013-02-06 20:54:25 +02:00
Petteri Aimonen
871e5be9dd Fix small error in field callback documentation.
Update issue 44
Status: FixedInGit
2012-12-06 11:13:53 +02:00
Petteri Aimonen
ad9a885644 Document new generator options 2012-10-29 19:33:33 +02:00
Petteri Aimonen
dcab39a41c Remove the "buf = NULL" => skip requirement from pb_istream_t callbacks.
Rationale: it's easy to implement the callback wrong. Doing so introduces
io errors when unknown fields are present in the input. If code is not
tested with unknown fields, these bugs can remain hidden for long time.

Added a special case for the memory buffer stream, where it gives a small
speed benefit.

Added testcase for skipping fields with test_decode2 implementation.

Update issue 37
Status: FixedInGit
2012-10-18 19:45:28 +03:00
Petteri Aimonen
160f02e4d0 Add pb_decode_noinit and use it from pb_dec_submessage.
This avoids double initialization when decoding nested submessages.
Fixes an issue with submessage arrays that was present in previous
version of this patch.

Update issue 28
Status: FixedInGit
2012-08-26 11:04:55 +03:00
Petteri Aimonen
1463e687e3 Revert "Add pb_decode_noinit and use it from pb_dec_submessage."
The patch breaks default values inside submessage arrays (I think).
Have to add test cases and check back.

This reverts commit f1d7640fe1.
2012-08-26 10:05:46 +03:00
Petteri Aimonen
f1d7640fe1 Add pb_decode_noinit and use it from pb_dec_submessage.
This avoids double initialization when decoding nested submessages.

Update issue 28
Status: FixedInGit
2012-08-26 09:56:11 +03:00
Petteri Aimonen
440da6959f Add note that stream callbacks must read the whole requested length.
Fixes issue #22.
2012-08-24 21:32:42 +03:00
Petteri Aimonen
0fb5e5e068 Implement error messages in the decoder side.
Update issue 7
Status: Started
2012-08-24 21:22:20 +03:00
Petteri Aimonen
ea57f74741 Document pb_close_string_substream. 2012-08-24 20:51:29 +03:00
Petteri Aimonen
2941e90e04 Reorganize the field decoder interface.
This makes the field decoding functions more intuitive to use.
The old interface is still present if you specify NANOPB_INTERNALS.

Update issue 2
Status: FixedInGit
2012-08-24 20:23:25 +03:00
Petteri Aimonen
9b1e1b440a Replace PB_MANY_FIELDS with PB_FIELD_16BIT and PB_FIELD_32BIT.
This allows more precise control over the memory use vs. field size.
2012-07-01 10:15:37 +03:00
Petteri Aimonen
78086cc27d Add PB_MANY_FIELDS option for supporting fields > 255.
Add generator warning if this is necessary.
Fixes issue #14.
2012-06-30 19:28:49 +03:00
Petteri Aimonen
95eb4a5499 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.
2012-06-30 18:10:08 +03:00
Petteri Aimonen
7bcf7ef579 Fixed formatting in docs 2012-06-25 22:17:13 +03:00
Petteri Aimonen
99375a132f Documented NANOPB_INTERNALS compilation option 2012-06-25 22:08:05 +03:00
Petteri Aimonen
c07e576de8 Note about __BIG_ENDIAN__ compilation option 2012-06-25 21:45:40 +03:00
Petteri Aimonen
e18352d506 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.
2012-06-16 14:07:37 +03:00
Petteri Aimonen
9fbe9a5de3 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.
2012-03-01 13:46:52 +02:00
Petteri Aimonen
b36a1a259a Improved documentation on field decoders. 2012-01-23 18:13:26 +02:00
Petteri Aimonen
113bd7ee87 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.
2012-01-12 19:08:05 +02:00
Petteri Aimonen
28aa0ce096 Added logo for project :)
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@1095 e3a754e5-d11d-0410-8d38-ebb782a927b9
2012-01-05 18:35:12 +00:00
Petteri Aimonen
85e0afd894 Some additions to documentation
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@1003 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-11-04 07:22:05 +00:00
Petteri Aimonen
c7e2d6cc2f Documentation outdated phrase
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@980 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-09-18 16:10:08 +00:00
Petteri Aimonen
b2a696795e Added README
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@976 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-09-14 10:36:04 +00:00