Files
nanopb/docs/encoding.rst
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

19 lines
519 B
ReStructuredText

=========================
Nanopb: Encoding messages
=========================
The basic way to encode messages is to:
1) Create an `output stream`_.
2) Fill a structure with your data.
3) Call *pb_encode* with the stream, a pointer to *const pb_field_t* array and a pointer to your structure.
A few extra steps are necessary if you need to know the size of the message beforehand, or if you have dynamically sized fields.
.. _`output stream`: concepts.html#output-streams
Function: pb_encode
===================