#include <api_frame_helper.h>
Definition at line 142 of file api_frame_helper.h.
◆ State
◆ APIPlaintextFrameHelper()
esphome::api::APIPlaintextFrameHelper::APIPlaintextFrameHelper |
( |
std::unique_ptr< socket::Socket > |
socket | ) |
|
|
inline |
◆ ~APIPlaintextFrameHelper()
esphome::api::APIPlaintextFrameHelper::~APIPlaintextFrameHelper |
( |
| ) |
|
|
overridedefault |
◆ can_write_without_blocking()
bool esphome::api::APIPlaintextFrameHelper::can_write_without_blocking |
( |
| ) |
|
|
overridevirtual |
◆ close()
APIError esphome::api::APIPlaintextFrameHelper::close |
( |
| ) |
|
|
overridevirtual |
◆ getpeername() [1/2]
std::string esphome::api::APIPlaintextFrameHelper::getpeername |
( |
| ) |
|
|
inlineoverridevirtual |
◆ getpeername() [2/2]
int esphome::api::APIPlaintextFrameHelper::getpeername |
( |
struct sockaddr * |
addr, |
|
|
socklen_t * |
addrlen |
|
) |
| |
|
inlineoverridevirtual |
◆ init()
APIError esphome::api::APIPlaintextFrameHelper::init |
( |
| ) |
|
|
overridevirtual |
◆ loop()
APIError esphome::api::APIPlaintextFrameHelper::loop |
( |
| ) |
|
|
overridevirtual |
◆ read_packet()
◆ set_log_info()
void esphome::api::APIPlaintextFrameHelper::set_log_info |
( |
std::string |
info | ) |
|
|
inlineoverridevirtual |
◆ shutdown()
APIError esphome::api::APIPlaintextFrameHelper::shutdown |
( |
int |
how | ) |
|
|
overridevirtual |
◆ try_read_frame_()
Read a packet into the rx_buf_.
If successful, stores frame data in the frame parameter
- Parameters
-
frame | The struct to hold the frame information in. msg: store the parsed frame in that struct |
- Returns
- See APIError
error API_ERROR_BAD_INDICATOR: Bad indicator byte at start of frame.
Definition at line 794 of file api_frame_helper.cpp.
◆ try_send_tx_buf_()
APIError esphome::api::APIPlaintextFrameHelper::try_send_tx_buf_ |
( |
| ) |
|
|
protected |
◆ write_packet()
APIError esphome::api::APIPlaintextFrameHelper::write_packet |
( |
uint16_t |
type, |
|
|
const uint8_t * |
payload, |
|
|
size_t |
len |
|
) |
| |
|
overridevirtual |
◆ write_raw_()
APIError esphome::api::APIPlaintextFrameHelper::write_raw_ |
( |
const struct iovec * |
iov, |
|
|
int |
iovcnt |
|
) |
| |
|
protected |
Write the data to the socket, or buffer it a write would block.
- Parameters
-
data | The data to write |
len | The length of data |
Definition at line 950 of file api_frame_helper.cpp.
◆ info_
std::string esphome::api::APIPlaintextFrameHelper::info_ |
|
protected |
◆ rx_buf_
std::vector<uint8_t> esphome::api::APIPlaintextFrameHelper::rx_buf_ |
|
protected |
◆ rx_buf_len_
size_t esphome::api::APIPlaintextFrameHelper::rx_buf_len_ = 0 |
|
protected |
◆ rx_header_buf_
std::vector<uint8_t> esphome::api::APIPlaintextFrameHelper::rx_header_buf_ |
|
protected |
◆ rx_header_parsed_
bool esphome::api::APIPlaintextFrameHelper::rx_header_parsed_ = false |
|
protected |
◆ rx_header_parsed_len_
uint32_t esphome::api::APIPlaintextFrameHelper::rx_header_parsed_len_ = 0 |
|
protected |
◆ rx_header_parsed_type_
uint32_t esphome::api::APIPlaintextFrameHelper::rx_header_parsed_type_ = 0 |
|
protected |
◆ socket_
std::unique_ptr<socket::Socket> esphome::api::APIPlaintextFrameHelper::socket_ |
|
protected |
◆ state_
◆ tx_buf_
std::vector<uint8_t> esphome::api::APIPlaintextFrameHelper::tx_buf_ |
|
protected |
The documentation for this class was generated from the following files: