|
ESPHome 2026.11.0-dev
|
RFB (VNC) client that draws the remote framebuffer into a display. More...
#include <vnc_client.h>
Public Member Functions | |
| VncClient (display::Display *display, bool big_endian=false) | |
| void | set_host (const char *host) |
| void | set_port (uint16_t port) |
| void | set_reconnect_interval (uint32_t ms) |
| void | set_update_delay (uint32_t ms) |
| void | set_max_update_delay (uint32_t ms) |
| void | set_pixel_format (VncPixelFormat format) |
| void | setup () override |
| void | loop () override |
| void | dump_config () override |
| void | on_shutdown () override |
| float | get_setup_priority () const override |
| bool | is_connected () const |
| void | refresh () |
| Ask the server for the whole screen again. | |
| template<typename F > | |
| void | add_on_connect_callback (F &&callback) |
| template<typename F > | |
| void | add_on_disconnect_callback (F &&callback) |
Public Member Functions inherited from esphome::Component | |
| float | get_actual_setup_priority () const |
| void | set_setup_priority (float priority) |
| void | call () |
| virtual void | on_safe_shutdown () |
| virtual bool | teardown () |
| Called during teardown to allow component to gracefully finish operations. | |
| virtual void | on_powerdown () |
| Called after teardown is complete to power down hardware. | |
| uint8_t | get_component_state () const |
| void | reset_to_construction_state () |
| Reset this component back to the construction state to allow setup to run again. | |
| bool | is_in_loop_state () const |
| Check if this component has completed setup and is in the loop state. | |
| bool | is_idle () const |
| Check if this component is idle. | |
| void | mark_failed () |
| Mark this component as failed. | |
| void | mark_failed (const LogString *message) |
| void | disable_loop () |
| Disable this component's loop. | |
| void | enable_loop () |
| Enable this component's loop. | |
| void | enable_loop_soon_any_context () |
| Thread and ISR-safe version of enable_loop() that can be called from any context. | |
| bool | is_failed () const |
| bool | is_ready () const |
| virtual bool | can_proceed () |
| bool | status_has_warning () const |
| bool | status_has_error () const |
| void | status_set_warning () |
| void | status_set_warning (const char *message) |
| void | status_set_warning (const LogString *message) |
| bool | status_comm_result (bool ok) |
Clears the warning when ok, else sets it with message (default "Communication failed"); returns ok. | |
| bool | status_comm_result (bool ok, const LogString *message) |
| void | status_set_error () |
| void | status_set_error (const LogString *message) |
| void | status_clear_warning () |
| void | status_clear_error () |
| ESPDEPRECATED ("Use status_momentary_warning() without a name. Removed in 2027.5.0", "2026.11.0") void status_momentary_warning(const char *name | |
| void | status_momentary_warning (uint32_t length=5000) |
Set warning status flag and clear it after length ms. | |
| void | status_momentary_warning (const LogString *message, uint32_t length=5000) |
| ESPDEPRECATED ("Use status_momentary_error() without a name. Removed in 2027.5.0", "2026.11.0") void status_momentary_error(const char *name | |
| void | status_momentary_error (uint32_t length=5000) |
Set error status flag and clear it after length ms. | |
| void | status_momentary_error (const LogString *message, uint32_t length=5000) |
| bool | has_overridden_loop () const |
| const LogString * | get_component_log_str () const ESPHOME_ALWAYS_INLINE |
| Get the integration where this component was declared as a LogString for logging. | |
| bool | should_warn_of_blocking (uint32_t blocking_time, uint32_t &threshold_ms_out) |
Protected Member Functions | |
| void | connect_step_ (uint32_t now) |
| void | start_handshake_ (uint32_t now) |
| void | service_rx_ (uint32_t now) |
| VncParse | parse_ () |
| void | pace_ (uint32_t now) |
| bool | start_session_ (uint32_t now) |
| bool | send_client_init_ () |
| void | frame_done_ () |
| void | rect_done_ () |
| void | next_tile_ () |
| void | draw_tile_ () |
| uint32_t | tile_hash_ () const |
| void | clear_tiles_ () |
| void | forget_tiles_ (uint16_t x, uint16_t y, uint16_t w, uint16_t h) |
| void | draw_row_ (uint16_t x, uint16_t y, uint16_t count, const uint8_t *pixels) |
| void | fill_tile_ (uint8_t x, uint8_t y, uint8_t w, uint8_t h, const uint8_t *pixel) |
| void | skip_ (uint32_t count, VncStep next) |
| bool | budget_exhausted_ () const |
| bool | send_ (const uint8_t *data, size_t len) |
| bool | send_update_request_ (bool incremental, uint32_t now) |
| VncParse | fail_ (VncFailure failure, const LogString *reason) |
| VncParse | fail_send_ () |
| VncFailure | lost_failure_ () const |
| void | session_lost_ (uint32_t now) |
| void | session_end_ (uint32_t now, VncFailure failure, const LogString *reason) |
| void | reset_session_ () |
Protected Member Functions inherited from esphome::Component | |
| friend | void::setup () |
| friend | void::original_setup () |
| void | set_component_source_ (uint8_t index) |
| Set where this component was loaded from for some debug messages. | |
| virtual void | call_setup () |
| void | call_dump_config_ () |
| void | enable_loop_slow_path_ () |
| void | set_component_state_ (uint8_t state) |
| Helper to set component state (clears state bits and sets new state) | |
| bool | set_status_flag_ (uint8_t flag) |
| Helper to set a status LED flag on both this component and the app. | |
| bool | set_error_flag_ (const LogString *message) |
| Set the error flag and log it; true when it was not set before. | |
| void | set_interval (const char *name, uint32_t interval, std::function< void()> &&f) |
| Set an interval function with a const char* name. | |
| void | set_interval (uint32_t id, uint32_t interval, std::function< void()> &&f) |
| Set an interval function with a numeric ID (zero heap allocation). | |
| void | set_interval (InternalSchedulerID id, uint32_t interval, std::function< void()> &&f) |
| void | set_interval (uint32_t interval, std::function< void()> &&f) |
| bool | cancel_interval (const char *name) |
| Cancel an interval function. | |
| bool | cancel_interval (uint32_t id) |
| bool | cancel_interval (InternalSchedulerID id) |
| void | set_timeout (const char *name, uint32_t timeout, std::function< void()> &&f) |
| Set a timeout function with a const char* name. | |
| void | set_timeout (uint32_t id, uint32_t timeout, std::function< void()> &&f) |
| Set a timeout function with a numeric ID (zero heap allocation). | |
| void | set_timeout (InternalSchedulerID id, uint32_t timeout, std::function< void()> &&f) |
| void | set_timeout (uint32_t timeout, std::function< void()> &&f) |
| bool | cancel_timeout (const char *name) |
| Cancel a timeout function. | |
| bool | cancel_timeout (uint32_t id) |
| bool | cancel_timeout (InternalSchedulerID id) |
| void | defer (const char *name, std::function< void()> &&f) |
| Defer a callback to the next loop() call with a const char* name. | |
| void | defer (std::function< void()> &&f) |
| Defer a callback to the next loop() call. | |
| void | defer (uint32_t id, std::function< void()> &&f) |
| Defer a callback with a numeric ID (zero heap allocation) | |
| bool | cancel_defer (const char *name) |
| Cancel a defer callback using the specified name, name must not be empty. | |
| bool | cancel_defer (uint32_t id) |
| void | status_clear_warning_slow_path_ () |
| void | status_clear_error_slow_path_ () |
Static Protected Attributes | |
| static constexpr size_t | RX_BUFFER_SIZE = 512 |
| static constexpr size_t | TILE_BUFFER_SIZE = 16 * 16 * 2 |
Additional Inherited Members | |
Data Fields inherited from esphome::Component | |
| uint32_t | length = 5000) |
RFB (VNC) client that draws the remote framebuffer into a display.
Definition at line 58 of file vnc_client.h.
|
inlineexplicit |
Definition at line 60 of file vnc_client.h.
|
inline |
Definition at line 79 of file vnc_client.h.
|
inline |
Definition at line 82 of file vnc_client.h.
|
protected |
Definition at line 335 of file vnc_client.cpp.
|
protected |
Definition at line 105 of file vnc_client.cpp.
|
protected |
Definition at line 230 of file vnc_client.cpp.
|
protected |
Definition at line 784 of file vnc_client.cpp.
|
protected |
Definition at line 793 of file vnc_client.cpp.
|
overridevirtual |
Reimplemented from esphome::Component.
Definition at line 111 of file vnc_client.cpp.
|
protected |
Definition at line 291 of file vnc_client.cpp.
|
inlineprotected |
Definition at line 111 of file vnc_client.h.
|
protected |
Definition at line 853 of file vnc_client.cpp.
|
protected |
Definition at line 840 of file vnc_client.cpp.
|
protected |
Definition at line 766 of file vnc_client.cpp.
|
inlineoverridevirtual |
Reimplemented from esphome::Component.
Definition at line 73 of file vnc_client.h.
|
inline |
Definition at line 75 of file vnc_client.h.
|
overridevirtual |
Reimplemented from esphome::Component.
Definition at line 128 of file vnc_client.cpp.
|
protected |
Definition at line 278 of file vnc_client.cpp.
|
protected |
Definition at line 752 of file vnc_client.cpp.
|
overridevirtual |
Reimplemented from esphome::Component.
Definition at line 126 of file vnc_client.cpp.
|
protected |
Definition at line 947 of file vnc_client.cpp.
|
protected |
Definition at line 383 of file vnc_client.cpp.
|
protected |
Definition at line 744 of file vnc_client.cpp.
| void esphome::vnc::VncClient::refresh | ( | ) |
Ask the server for the whole screen again.
Definition at line 100 of file vnc_client.cpp.
|
protected |
Definition at line 250 of file vnc_client.cpp.
|
protected |
Definition at line 964 of file vnc_client.cpp.
|
protected |
Definition at line 378 of file vnc_client.cpp.
|
protected |
Definition at line 975 of file vnc_client.cpp.
|
protected |
Definition at line 337 of file vnc_client.cpp.
|
protected |
Definition at line 298 of file vnc_client.cpp.
|
protected |
Definition at line 287 of file vnc_client.cpp.
|
inline |
Definition at line 62 of file vnc_client.h.
|
inline |
Definition at line 66 of file vnc_client.h.
|
inline |
Definition at line 67 of file vnc_client.h.
|
inline |
Definition at line 63 of file vnc_client.h.
|
inline |
Definition at line 64 of file vnc_client.h.
|
inline |
Definition at line 65 of file vnc_client.h.
|
overridevirtual |
Reimplemented from esphome::Component.
Definition at line 80 of file vnc_client.cpp.
Definition at line 372 of file vnc_client.cpp.
|
protected |
Definition at line 271 of file vnc_client.cpp.
|
protected |
Definition at line 875 of file vnc_client.cpp.
|
protected |
Definition at line 822 of file vnc_client.cpp.
|
protected |
Definition at line 180 of file vnc_client.h.
|
protected |
Definition at line 128 of file vnc_client.h.
|
protected |
Definition at line 196 of file vnc_client.h.
|
protected |
Definition at line 176 of file vnc_client.h.
|
protected |
Definition at line 168 of file vnc_client.h.
|
protected |
Definition at line 132 of file vnc_client.h.
|
protected |
Definition at line 193 of file vnc_client.h.
|
protected |
Definition at line 119 of file vnc_client.h.
|
protected |
Definition at line 120 of file vnc_client.h.
|
protected |
Definition at line 117 of file vnc_client.h.
|
protected |
Definition at line 192 of file vnc_client.h.
|
protected |
Definition at line 191 of file vnc_client.h.
|
protected |
Definition at line 160 of file vnc_client.h.
|
protected |
Definition at line 148 of file vnc_client.h.
|
protected |
Definition at line 147 of file vnc_client.h.
|
protected |
Definition at line 136 of file vnc_client.h.
|
protected |
Definition at line 188 of file vnc_client.h.
|
protected |
Definition at line 161 of file vnc_client.h.
|
protected |
Definition at line 162 of file vnc_client.h.
|
protected |
Definition at line 173 of file vnc_client.h.
|
protected |
Definition at line 163 of file vnc_client.h.
|
protected |
Definition at line 174 of file vnc_client.h.
|
protected |
Definition at line 175 of file vnc_client.h.
|
protected |
Definition at line 121 of file vnc_client.h.
|
protected |
Definition at line 129 of file vnc_client.h.
|
protected |
Definition at line 130 of file vnc_client.h.
|
protected |
Definition at line 184 of file vnc_client.h.
|
protected |
Definition at line 137 of file vnc_client.h.
|
protected |
Definition at line 140 of file vnc_client.h.
|
protected |
Definition at line 141 of file vnc_client.h.
|
protected |
Definition at line 118 of file vnc_client.h.
|
protected |
Definition at line 127 of file vnc_client.h.
|
protected |
Definition at line 169 of file vnc_client.h.
|
protected |
Definition at line 187 of file vnc_client.h.
|
protected |
Definition at line 195 of file vnc_client.h.
|
protected |
Definition at line 142 of file vnc_client.h.
|
protected |
Definition at line 177 of file vnc_client.h.
|
protected |
Definition at line 157 of file vnc_client.h.
|
protected |
Definition at line 158 of file vnc_client.h.
|
protected |
Definition at line 181 of file vnc_client.h.
|
protected |
Definition at line 155 of file vnc_client.h.
|
protected |
Definition at line 154 of file vnc_client.h.
|
protected |
Definition at line 152 of file vnc_client.h.
|
protected |
Definition at line 153 of file vnc_client.h.
|
protected |
Definition at line 151 of file vnc_client.h.
|
protected |
Definition at line 186 of file vnc_client.h.
|
protected |
Definition at line 194 of file vnc_client.h.
|
protected |
Definition at line 185 of file vnc_client.h.
|
protected |
Definition at line 198 of file vnc_client.h.
|
staticconstexprprotected |
Definition at line 87 of file vnc_client.h.
|
protected |
Definition at line 146 of file vnc_client.h.
|
protected |
Definition at line 183 of file vnc_client.h.
|
protected |
Definition at line 145 of file vnc_client.h.
|
protected |
Definition at line 138 of file vnc_client.h.
|
protected |
Definition at line 170 of file vnc_client.h.
|
protected |
Definition at line 133 of file vnc_client.h.
|
protected |
Definition at line 131 of file vnc_client.h.
|
protected |
Definition at line 143 of file vnc_client.h.
|
protected |
Definition at line 178 of file vnc_client.h.
|
protected |
Definition at line 179 of file vnc_client.h.
|
protected |
Definition at line 189 of file vnc_client.h.
|
protected |
Definition at line 167 of file vnc_client.h.
|
protected |
Definition at line 171 of file vnc_client.h.
|
protected |
Definition at line 199 of file vnc_client.h.
|
staticconstexprprotected |
Definition at line 88 of file vnc_client.h.
|
protected |
Definition at line 159 of file vnc_client.h.
|
protected |
Definition at line 166 of file vnc_client.h.
|
protected |
Definition at line 124 of file vnc_client.h.
|
protected |
Definition at line 190 of file vnc_client.h.
|
protected |
Definition at line 165 of file vnc_client.h.
|
protected |
Definition at line 126 of file vnc_client.h.
|
protected |
Definition at line 139 of file vnc_client.h.
|
protected |
Definition at line 134 of file vnc_client.h.
|
protected |
Definition at line 150 of file vnc_client.h.
|
protected |
Definition at line 149 of file vnc_client.h.