![]() |
WPILibC++ 2025.3.2
|
Class for wrapping a nanopb istream. More...
#include <wpi/protobuf/Protobuf.h>
Public Member Functions | |
| ProtoInputStream (pb_istream_t *stream) | |
| Constructs a nanopb istream from an existing istream object. | |
| ProtoInputStream (std::span< const uint8_t > stream) | |
| Constructs a nanopb istream from a buffer. | |
| pb_istream_t * | Stream () noexcept |
| Gets the backing nanopb stream object. | |
| const pb_msgdesc_t * | MsgDesc () const noexcept |
| Gets the nanopb message descriptor. | |
| bool | Decode (typename Protobuf< std::remove_cvref_t< T > >::MessageStruct &msg, unsigned int flags=0) |
| Decodes a protobuf. | |
Class for wrapping a nanopb istream.
|
inlineexplicit |
Constructs a nanopb istream from an existing istream object.
Generally used internally for decoding submessages
| [in] | stream | the nanopb istream |
|
inlineexplicit |
Constructs a nanopb istream from a buffer.
| [in] | stream | the stream buffer |
|
inline |
Decodes a protobuf.
Flags are the same flags passed to pb_decode_ex.
| [in] | msg | The message to decode into |
| [in] | flags | Flags to pass |
|
inlinenoexcept |
Gets the nanopb message descriptor.
|
inlinenoexcept |
Gets the backing nanopb stream object.