|
ESPHome 2026.11.0-dev
|
Data Structures | |
| class | SerialProxy |
| class | SerialProxyTap |
| Observes a port's traffic without owning it, and may inject bytes of its own. More... | |
Enumerations | |
| enum | SerialProxyLineStateFlag : uint32_t { SERIAL_PROXY_LINE_STATE_FLAG_RTS = 1 << 0 , SERIAL_PROXY_LINE_STATE_FLAG_DTR = 1 << 1 } |
| Bit flags for the line_states field exchanged with API clients. More... | |
| enum class | SerialProxyResult : uint8_t { SERIAL_PROXY_RESULT_OK , SERIAL_PROXY_RESULT_ASSUMED_SUCCESS , SERIAL_PROXY_RESULT_PORT_IN_USE , SERIAL_PROXY_RESULT_INVALID_ARGUMENT , SERIAL_PROXY_RESULT_ERROR , SERIAL_PROXY_RESULT_TIMEOUT , SERIAL_PROXY_RESULT_NOT_SUPPORTED } |
| Result of a client-initiated operation; mapped to api::enums::SerialProxyStatus by the API layer. More... | |
Functions | |
| ESPHOME_LOG_TAG (TAG, "serial_proxy") | |
| void | __attribute__ ((noinline)) SerialProxy |
Variables | |
| constexpr size_t | SERIAL_PROXY_MAX_READ_SIZE = 256 |
| Maximum bytes to read from UART in a single loop iteration. | |
| constexpr uint32_t | SERIAL_PROXY_MAX_WRITE_STALL_MS = 1000 |
| Longest main-loop stall client writes may cause per loop pass, shared by every instance; bytes the UART cannot buffer within it are dropped. | |
Bit flags for the line_states field exchanged with API clients.
Bit positions are stable API — new signals must use the next available bit.
| Enumerator | |
|---|---|
| SERIAL_PROXY_LINE_STATE_FLAG_RTS | RTS (Request To Send) |
| SERIAL_PROXY_LINE_STATE_FLAG_DTR | DTR (Data Terminal Ready) |
Definition at line 52 of file serial_proxy.h.
|
strong |
Result of a client-initiated operation; mapped to api::enums::SerialProxyStatus by the API layer.
Definition at line 58 of file serial_proxy.h.
| void esphome::serial_proxy::__attribute__ | ( | (noinline) | ) |
Definition at line 114 of file serial_proxy.cpp.
| esphome::serial_proxy::ESPHOME_LOG_TAG | ( | TAG | , |
| "serial_proxy" | ) |
|
inlineconstexpr |
Maximum bytes to read from UART in a single loop iteration.
Definition at line 69 of file serial_proxy.h.
|
inlineconstexpr |
Longest main-loop stall client writes may cause per loop pass, shared by every instance; bytes the UART cannot buffer within it are dropped.
Well under the shortest watchdog timeout, since the API hands the proxies up to ten writes in one pass.
Definition at line 74 of file serial_proxy.h.