#include <wire.hpp>
|
| | ProtoReader ()=default |
| |
| | ProtoReader (const void *data, const std::size_t size) |
| |
| bool | ok () const |
| |
| bool | eof () const |
| |
| bool | read_tag (std::uint32_t &field_number, WireType &wt) |
| | Read a field tag.
|
| |
| bool | varint (std::uint64_t &out) |
| |
| bool | fixed32 (std::uint32_t &out) |
| |
| bool | fixed64 (std::uint64_t &out) |
| |
| bool | length_delimited (std::string &out) |
| | Read a length-delimited blob into out.
|
| |
| bool | sub_reader (ProtoReader &out) |
| | Obtain a sub-reader over the next length-delimited region (for embedded messages and packed repeated fields) and advance past it.
|
| |
| bool | skip_field (const WireType wt) |
| | Skip a field of the given wire type (unknown field forward-compat).
|
| |
◆ ProtoReader() [1/2]
| esphome::api::ProtoReader::ProtoReader |
( |
| ) |
|
|
default |
◆ ProtoReader() [2/2]
| esphome::api::ProtoReader::ProtoReader |
( |
const void * |
data, |
|
|
const std::size_t |
size |
|
) |
| |
|
inline |
◆ eof()
| bool esphome::api::ProtoReader::eof |
( |
| ) |
const |
|
inline |
◆ fixed32()
| bool esphome::api::ProtoReader::fixed32 |
( |
std::uint32_t & |
out | ) |
|
|
inline |
◆ fixed64()
| bool esphome::api::ProtoReader::fixed64 |
( |
std::uint64_t & |
out | ) |
|
|
inline |
◆ length_delimited()
| bool esphome::api::ProtoReader::length_delimited |
( |
std::string & |
out | ) |
|
|
inline |
Read a length-delimited blob into out.
◆ ok()
| bool esphome::api::ProtoReader::ok |
( |
| ) |
const |
|
inline |
◆ read_tag()
| bool esphome::api::ProtoReader::read_tag |
( |
std::uint32_t & |
field_number, |
|
|
WireType & |
wt |
|
) |
| |
|
inline |
Read a field tag.
Returns false at clean end-of-input or on error; distinguish with ok().
◆ skip_field()
| bool esphome::api::ProtoReader::skip_field |
( |
const WireType |
wt | ) |
|
|
inline |
Skip a field of the given wire type (unknown field forward-compat).
◆ sub_reader()
| bool esphome::api::ProtoReader::sub_reader |
( |
ProtoReader & |
out | ) |
|
|
inline |
Obtain a sub-reader over the next length-delimited region (for embedded messages and packed repeated fields) and advance past it.
◆ varint()
| bool esphome::api::ProtoReader::varint |
( |
std::uint64_t & |
out | ) |
|
|
inline |
The documentation for this class was generated from the following file: