Commit Graph

34 Commits

Author SHA1 Message Date
Petteri Aimonen
ab62402059 Documentation updates 2014-03-16 15:52:19 +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
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
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
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
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
Petteri Aimonen
fcfc99f766 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
2011-09-13 16:14:08 +00:00
Petteri Aimonen
a353417021 More unittests
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@966 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-08-23 18:50:09 +00:00
Petteri Aimonen
5a9f85b876 unittests, change to PB_LTYPE_BYTES data size
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@959 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-08-22 18:57:23 +00:00
Petteri Aimonen
7f53c3f748 Example
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@957 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-08-17 19:03:06 +00:00
Petteri Aimonen
2cefaeaf61 Docs
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@956 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-08-16 17:28:59 +00:00
Petteri Aimonen
842d52633d More documentation, small improvements
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@955 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-08-14 20:11:05 +00:00