ESPHome 2025.5.0
Loading...
Searching...
No Matches
esphome::api::APIFrameHelper Class Referenceabstract

#include <api_frame_helper.h>

Inheritance diagram for esphome::api::APIFrameHelper:
esphome::api::APINoiseFrameHelper esphome::api::APIPlaintextFrameHelper

Public Member Functions

virtual ~APIFrameHelper ()=default
 
virtual APIError init ()=0
 
virtual APIError loop ()=0
 
virtual APIError read_packet (ReadPacketBuffer *buffer)=0
 
virtual bool can_write_without_blocking ()=0
 
virtual APIError write_protobuf_packet (uint16_t type, ProtoWriteBuffer buffer)=0
 
virtual std::string getpeername ()=0
 
virtual int getpeername (struct sockaddr *addr, socklen_t *addrlen)=0
 
virtual APIError close ()=0
 
virtual APIError shutdown (int how)=0
 
virtual void set_log_info (std::string info)=0
 
virtual uint8_t frame_header_padding ()=0
 
virtual uint8_t frame_footer_size ()=0
 

Protected Member Functions

template<typename StateEnum >
APIError write_raw_ (const struct iovec *iov, int iovcnt, socket::Socket *socket, std::vector< uint8_t > &tx_buf, const std::string &info, StateEnum &state, StateEnum failed_state)
 

Protected Attributes

uint8_t frame_header_padding_ {0}
 
uint8_t frame_footer_size_ {0}
 

Detailed Description

Definition at line 63 of file api_frame_helper.h.

Constructor & Destructor Documentation

◆ ~APIFrameHelper()

virtual esphome::api::APIFrameHelper::~APIFrameHelper ( )
virtualdefault

Member Function Documentation

◆ can_write_without_blocking()

virtual bool esphome::api::APIFrameHelper::can_write_without_blocking ( )
pure virtual

◆ close()

virtual APIError esphome::api::APIFrameHelper::close ( )
pure virtual

◆ frame_footer_size()

virtual uint8_t esphome::api::APIFrameHelper::frame_footer_size ( )
pure virtual

◆ frame_header_padding()

virtual uint8_t esphome::api::APIFrameHelper::frame_header_padding ( )
pure virtual

◆ getpeername() [1/2]

virtual std::string esphome::api::APIFrameHelper::getpeername ( )
pure virtual

◆ getpeername() [2/2]

virtual int esphome::api::APIFrameHelper::getpeername ( struct sockaddr * addr,
socklen_t * addrlen )
pure virtual

◆ init()

virtual APIError esphome::api::APIFrameHelper::init ( )
pure virtual

◆ loop()

virtual APIError esphome::api::APIFrameHelper::loop ( )
pure virtual

◆ read_packet()

virtual APIError esphome::api::APIFrameHelper::read_packet ( ReadPacketBuffer * buffer)
pure virtual

◆ set_log_info()

virtual void esphome::api::APIFrameHelper::set_log_info ( std::string info)
pure virtual

◆ shutdown()

virtual APIError esphome::api::APIFrameHelper::shutdown ( int how)
pure virtual

◆ write_protobuf_packet()

virtual APIError esphome::api::APIFrameHelper::write_protobuf_packet ( uint16_t type,
ProtoWriteBuffer buffer )
pure virtual

◆ write_raw_()

template<typename StateEnum >
APIError esphome::api::APIFrameHelper::write_raw_ ( const struct iovec * iov,
int iovcnt,
socket::Socket * socket,
std::vector< uint8_t > & tx_buf,
const std::string & info,
StateEnum & state,
StateEnum failed_state )
protected

Definition at line 78 of file api_frame_helper.cpp.

Field Documentation

◆ frame_footer_size_

uint8_t esphome::api::APIFrameHelper::frame_footer_size_ {0}
protected

Definition at line 89 of file api_frame_helper.h.

◆ frame_header_padding_

uint8_t esphome::api::APIFrameHelper::frame_header_padding_ {0}
protected

Definition at line 88 of file api_frame_helper.h.


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