Hi,
> If the "which_payload" is not sent as part of the message, what is its
> purpose, and how does the decoder know which payload is used?
It is encoded as part of the tag number - the same way normal fields are
distinguished from eachother. I agree that the documentation is a bit
misleading on this part, but it is technically correct in that it
doesn't take any extra space compared to what every field takes anyway.
> Is there a full example showing the encode and decode?
This could help:
https://github.com/nanopb/nanopb/tree/master/tests/oneof
--
Petteri