ESPHome 2026.5.0-dev
Loading...
Searching...
No Matches
esphome::api::ProtoLengthDelimited Class Reference

#include <proto.h>

Public Member Functions

 ProtoLengthDelimited (const uint8_t *value, size_t length)
 
std::string as_string () const
 
const uint8_t * data () const
 
size_t size () const
 
template<typename T >
void decode_to_message (T &msg) const
 Decode the length-delimited data into a message instance.
 

Protected Attributes

const uint8_t *const value_
 
const size_t length_
 

Detailed Description

Definition at line 173 of file proto.h.

Constructor & Destructor Documentation

◆ ProtoLengthDelimited()

esphome::api::ProtoLengthDelimited::ProtoLengthDelimited ( const uint8_t * value,
size_t length )
inlineexplicit

Definition at line 175 of file proto.h.

Member Function Documentation

◆ as_string()

std::string esphome::api::ProtoLengthDelimited::as_string ( ) const
inline

Definition at line 176 of file proto.h.

◆ data()

const uint8_t * esphome::api::ProtoLengthDelimited::data ( ) const
inline

Definition at line 179 of file proto.h.

◆ decode_to_message()

template<typename T >
void esphome::api::ProtoLengthDelimited::decode_to_message ( T & msg) const

Decode the length-delimited data into a message instance.

Template preserves concrete type so decode() resolves statically.

Definition at line 865 of file proto.h.

◆ size()

size_t esphome::api::ProtoLengthDelimited::size ( ) const
inline

Definition at line 180 of file proto.h.

Field Documentation

◆ length_

const size_t esphome::api::ProtoLengthDelimited::length_
protected

Definition at line 188 of file proto.h.

◆ value_

const uint8_t* const esphome::api::ProtoLengthDelimited::value_
protected

Definition at line 187 of file proto.h.


The documentation for this class was generated from the following file: