ESPHome 2026.11.0b6
Loading...
Searching...
No Matches
esphome::vnc::VncClient Class Reference

RFB (VNC) client that draws the remote framebuffer into a display. More...

#include <vnc_client.h>

Inheritance diagram for esphome::vnc::VncClient:
esphome::Component esphome::touchscreen::TouchListener

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 set_auth_key (const uint8_t *key)
 8 bytes, already bit-reversed for VNC, may live in PROGMEM.
 
void register_touchscreen (touchscreen::Touchscreen *touchscreen)
 
void touch (touchscreen::TouchPoint tp) override
 
void update (const touchscreen::TouchPoints_t &tpoints) override
 
void release () override
 
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 connect ()
 Retry now, also after an authentication failure or disconnect().
 
void disconnect ()
 Close the session and stop retrying until connect().
 
void refresh ()
 Ask the server for the whole screen again.
 
bool send_pointer (uint16_t x, uint16_t y, uint8_t buttons)
 
void send_key (uint32_t keysym, VncKeyAction action)
 
void type_text (const char *text, size_t len)
 
void type_text (const std::string &text)
 
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 last before a reboot or deep sleep 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)
 
bool ESPHOME_ALWAYS_INLINE setup_check (bool ok)
 Marks the component failed with message (default "Communication failed") unless ok; returns ok.
 
bool ESPHOME_ALWAYS_INLINE setup_check (bool ok, 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)
 
- Public Member Functions inherited from esphome::touchscreen::TouchListener

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_ ()
 
bool select_security_ (uint8_t type)
 
bool has_auth_key_ () const
 
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)
 
bool send_key_event_ (uint32_t keysym, VncKeyAction action)
 
bool send_input_ (const uint8_t *msg, size_t len, bool release)
 
bool send_pending_ ()
 
void note_input_ ()
 
void handle_touch_ (uint16_t x, uint16_t y)
 Touch input in display coordinates.
 
void handle_release_ ()
 
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 schedule_retry_ (uint32_t now, VncFailure failure, const LogString *reason, bool was_running)
 
void reset_session_ ()
 
void clear_link_warning_ ()
 
- 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_ ()
 

Protected Attributes

display::Display * display_
 
socket::TcpClientLink link_
 
const uint8_t * auth_key_ {nullptr}
 
LazyCallbackManager< void()> connect_callback_
 
LazyCallbackManager< void()> disconnect_callback_
 
HighFrequencyLoopRequester high_freq_
 
uint32_t * tile_hashes_ {nullptr}
 
uint32_t update_delay_ms_ {200}
 
uint32_t max_update_delay_ms_ {1000}
 
uint32_t backoff_ms_ {0}
 
uint32_t hold_ms_ {0}
 
uint32_t hold_start_ms_ {0}
 
uint32_t setup_ms_ {0}
 
uint32_t busy_since_ms_ {0}
 
uint32_t session_start_ms_ {0}
 
uint32_t update_start_ms_ {0}
 
uint32_t first_change_ms_ {0}
 
uint32_t last_change_ms_ {0}
 
uint32_t last_input_ms_ {0}
 
uint32_t rx_total_ {0}
 
uint32_t update_start_bytes_ {0}
 
uint32_t last_request_ms_ {0}
 
uint32_t last_rx_ms_ {0}
 
uint32_t pass_start_ms_ {0}
 
uint32_t skip_left_ {0}
 
uint16_t rx_pos_ {0}
 
uint16_t rx_len_ {0}
 
uint16_t fb_w_ {0}
 
uint16_t fb_h_ {0}
 
uint16_t vis_w_ {0}
 
uint16_t vis_h_ {0}
 
uint16_t rects_left_ {0}
 
uint16_t rect_x_ {0}
 
uint16_t rect_y_ {0}
 
uint16_t rect_w_ {0}
 
uint16_t rect_h_ {0}
 
uint16_t pos_x_ {0}
 
uint16_t pos_y_ {0}
 
uint16_t tile_fill_ {0}
 
uint16_t drawn_tiles_ {0}
 
uint16_t hash_capacity_ {0}
 
uint16_t hash_cols_ {0}
 
uint16_t hash_rows_ {0}
 
uint16_t ptr_x_ {0}
 
uint16_t ptr_y_ {0}
 
uint16_t press_x_ {0}
 
uint16_t press_y_ {0}
 
uint8_t ptr_buttons_ {0}
 
uint8_t pending_count_ {0}
 
uint8_t tile_w_ {0}
 
uint8_t tile_h_ {0}
 
uint8_t subrects_left_ {0}
 
uint8_t bpp_ {2}
 
uint8_t minor_ {8}
 
uint8_t sec_type_ {0}
 
uint8_t sec_count_ {0}
 
uint8_t text_len_ {0}
 
uint8_t hash_rotation_ {0}
 
uint8_t hex_bg_ [2] {}
 
uint8_t hex_fg_ [2] {}
 
display::ColorBitness bitness_ {display::COLOR_BITNESS_565}
 
VncPixelFormat pixel_format_ {VncPixelFormat::VNC_PIXEL_FORMAT_AUTO}
 
VncState state_ {VncState::VNC_STATE_IDLE}
 
VncStep step_ {VncStep::VNC_STEP_VERSION}
 
VncStep after_skip_ {VncStep::VNC_STEP_MESSAGE}
 
VncFailure reason_failure_ {VncFailure::VNC_FAILURE_TRANSIENT}
 
bool rx_pending_ {false}
 
bool auth_retried_ {false}
 
bool auth_hold_ {false}
 
bool in_update_ {false}
 
bool request_outstanding_ {false}
 
bool refresh_pending_ {false}
 
bool need_full_ {false}
 
bool frame_drawn_ {false}
 
bool subrects_coloured_ {false}
 
bool tile_hidden_ {false}
 
bool display_parks_ {false}
 
bool display_busy_ {false}
 
bool busy_warned_ {false}
 
bool refresh_retried_ {false}
 
bool network_was_up_ {false}
 
bool has_touchscreen_ {false}
 
bool dragging_ {false}
 
bool touching_ {false}
 
bool big_endian_
 
uint8_t rx_ [RX_BUFFER_SIZE]
 
uint8_t pending_ [MAX_PENDING_RELEASES][KEY_EVENT_SIZE]
 
uint8_t tile_ [TILE_BUFFER_SIZE]
 
- Protected Attributes inherited from esphome::Component
uint8_t component_source_index_ {0}
 Index into component source PROGMEM lookup table (0 = not set)
 
uint8_t warn_if_blocking_over_ {WARN_IF_BLOCKING_OVER_CS}
 Warn threshold in centiseconds (max 2550ms)
 
uint8_t component_state_ {0x00}
 State of this component - each bit has a purpose: Bits 0-2: Component state (0x00=CONSTRUCTION, 0x01=SETUP, 0x02=LOOP, 0x03=FAILED, 0x04=LOOP_DONE) Bit 3: STATUS_LED_WARNING Bit 4: STATUS_LED_ERROR Bit 5: Has overridden loop() (set at registration time) Bits 6-7: Unused - reserved for future expansion.
 
volatile bool pending_enable_loop_ {false}
 ISR-safe flag for enable_loop_soon_any_context.
 
ComponentRuntimeStats runtime_stats_
 

Static Protected Attributes

static constexpr size_t RX_BUFFER_SIZE = 512
 
static constexpr size_t TILE_BUFFER_SIZE = 16 * 16 * 2
 
static constexpr uint32_t INPUT_BOOST_MS = 2000
 
static constexpr size_t KEY_EVENT_SIZE = 8
 
static constexpr size_t POINTER_EVENT_SIZE = 6
 
static constexpr size_t MAX_PENDING_RELEASES = 4
 

Additional Inherited Members

- Data Fields inherited from esphome::Component
uint32_t length = 5000)
 

Detailed Description

RFB (VNC) client that draws the remote framebuffer into a display.

Definition at line 75 of file vnc_client.h.

Constructor & Destructor Documentation

◆ VncClient()

esphome::vnc::VncClient::VncClient ( display::Display * display,
bool big_endian = false )
inlineexplicit

Definition at line 82 of file vnc_client.h.

Member Function Documentation

◆ add_on_connect_callback()

template<typename F >
void esphome::vnc::VncClient::add_on_connect_callback ( F && callback)
inline

Definition at line 125 of file vnc_client.h.

◆ add_on_disconnect_callback()

template<typename F >
void esphome::vnc::VncClient::add_on_disconnect_callback ( F && callback)
inline

Definition at line 128 of file vnc_client.h.

◆ budget_exhausted_()

bool esphome::vnc::VncClient::budget_exhausted_ ( ) const
protected

Definition at line 515 of file vnc_client.cpp.

◆ clear_link_warning_()

void esphome::vnc::VncClient::clear_link_warning_ ( )
protected

Definition at line 369 of file vnc_client.cpp.

◆ clear_tiles_()

void esphome::vnc::VncClient::clear_tiles_ ( )
protected

Definition at line 164 of file vnc_client.cpp.

◆ connect()

void esphome::vnc::VncClient::connect ( )

Retry now, also after an authentication failure or disconnect().

Definition at line 308 of file vnc_client.cpp.

◆ connect_step_()

void esphome::vnc::VncClient::connect_step_ ( uint32_t now)
protected

Definition at line 342 of file vnc_client.cpp.

◆ disconnect()

void esphome::vnc::VncClient::disconnect ( )

Close the session and stop retrying until connect().

Definition at line 327 of file vnc_client.cpp.

◆ draw_row_()

void esphome::vnc::VncClient::draw_row_ ( uint16_t x,
uint16_t y,
uint16_t count,
const uint8_t * pixels )
protected

Definition at line 1000 of file vnc_client.cpp.

◆ draw_tile_()

void esphome::vnc::VncClient::draw_tile_ ( )
protected

Definition at line 1009 of file vnc_client.cpp.

◆ dump_config()

void esphome::vnc::VncClient::dump_config ( )
overridevirtual

Reimplemented from esphome::Component.

Definition at line 170 of file vnc_client.cpp.

◆ fail_()

VncParse esphome::vnc::VncClient::fail_ ( VncFailure failure,
const LogString * reason )
protected

Definition at line 433 of file vnc_client.cpp.

◆ fail_send_()

VncParse esphome::vnc::VncClient::fail_send_ ( )
inlineprotected

Definition at line 183 of file vnc_client.h.

◆ fill_tile_()

void esphome::vnc::VncClient::fill_tile_ ( uint8_t x,
uint8_t y,
uint8_t w,
uint8_t h,
const uint8_t * pixel )
protected

Definition at line 1069 of file vnc_client.cpp.

◆ forget_tiles_()

void esphome::vnc::VncClient::forget_tiles_ ( uint16_t x,
uint16_t y,
uint16_t w,
uint16_t h )
protected

Definition at line 1056 of file vnc_client.cpp.

◆ frame_done_()

void esphome::vnc::VncClient::frame_done_ ( )
protected

Definition at line 982 of file vnc_client.cpp.

◆ get_setup_priority()

float esphome::vnc::VncClient::get_setup_priority ( ) const
inlineoverridevirtual

Reimplemented from esphome::Component.

Definition at line 108 of file vnc_client.h.

◆ handle_release_()

void esphome::vnc::VncClient::handle_release_ ( )
protected

Definition at line 1336 of file vnc_client.cpp.

◆ handle_touch_()

void esphome::vnc::VncClient::handle_touch_ ( uint16_t x,
uint16_t y )
protected

Touch input in display coordinates.

Definition at line 1308 of file vnc_client.cpp.

◆ has_auth_key_()

bool esphome::vnc::VncClient::has_auth_key_ ( ) const
inlineprotected

Definition at line 151 of file vnc_client.h.

◆ is_connected()

bool esphome::vnc::VncClient::is_connected ( ) const
inline

Definition at line 110 of file vnc_client.h.

◆ loop()

void esphome::vnc::VncClient::loop ( )
overridevirtual

Reimplemented from esphome::Component.

Definition at line 193 of file vnc_client.cpp.

◆ lost_failure_()

VncFailure esphome::vnc::VncClient::lost_failure_ ( ) const
protected

Definition at line 414 of file vnc_client.cpp.

◆ next_tile_()

void esphome::vnc::VncClient::next_tile_ ( )
protected

Definition at line 968 of file vnc_client.cpp.

◆ note_input_()

void esphome::vnc::VncClient::note_input_ ( )
protected

Definition at line 1268 of file vnc_client.cpp.

◆ on_shutdown()

void esphome::vnc::VncClient::on_shutdown ( )
overridevirtual

Reimplemented from esphome::Component.

Definition at line 191 of file vnc_client.cpp.

◆ pace_()

void esphome::vnc::VncClient::pace_ ( uint32_t now)
protected

Definition at line 1164 of file vnc_client.cpp.

◆ parse_()

VncParse esphome::vnc::VncClient::parse_ ( )
protected

Definition at line 579 of file vnc_client.cpp.

◆ rect_done_()

void esphome::vnc::VncClient::rect_done_ ( )
protected

Definition at line 960 of file vnc_client.cpp.

◆ refresh()

void esphome::vnc::VncClient::refresh ( )

Ask the server for the whole screen again.

Definition at line 159 of file vnc_client.cpp.

◆ register_touchscreen()

void esphome::vnc::VncClient::register_touchscreen ( touchscreen::Touchscreen * touchscreen)
inline

Definition at line 95 of file vnc_client.h.

◆ release()

void esphome::vnc::VncClient::release ( )
overridevirtual

Reimplemented from esphome::touchscreen::TouchListener.

Definition at line 133 of file vnc_client.cpp.

◆ reset_session_()

void esphome::vnc::VncClient::reset_session_ ( )
protected

Definition at line 376 of file vnc_client.cpp.

◆ schedule_retry_()

void esphome::vnc::VncClient::schedule_retry_ ( uint32_t now,
VncFailure failure,
const LogString * reason,
bool was_running )
protected

Definition at line 449 of file vnc_client.cpp.

◆ select_security_()

bool esphome::vnc::VncClient::select_security_ ( uint8_t type)
protected

Definition at line 563 of file vnc_client.cpp.

◆ send_()

bool esphome::vnc::VncClient::send_ ( const uint8_t * data,
size_t len )
protected

Definition at line 1181 of file vnc_client.cpp.

◆ send_client_init_()

bool esphome::vnc::VncClient::send_client_init_ ( )
protected

Definition at line 558 of file vnc_client.cpp.

◆ send_input_()

bool esphome::vnc::VncClient::send_input_ ( const uint8_t * msg,
size_t len,
bool release )
protected

Definition at line 1217 of file vnc_client.cpp.

◆ send_key()

void esphome::vnc::VncClient::send_key ( uint32_t keysym,
VncKeyAction action )

Definition at line 1270 of file vnc_client.cpp.

◆ send_key_event_()

bool esphome::vnc::VncClient::send_key_event_ ( uint32_t keysym,
VncKeyAction action )
protected

Definition at line 1205 of file vnc_client.cpp.

◆ send_pending_()

bool esphome::vnc::VncClient::send_pending_ ( )
protected

Definition at line 1234 of file vnc_client.cpp.

◆ send_pointer()

bool esphome::vnc::VncClient::send_pointer ( uint16_t x,
uint16_t y,
uint8_t buttons )

Definition at line 1247 of file vnc_client.cpp.

◆ send_update_request_()

bool esphome::vnc::VncClient::send_update_request_ ( bool incremental,
uint32_t now )
protected

Definition at line 1192 of file vnc_client.cpp.

◆ service_rx_()

void esphome::vnc::VncClient::service_rx_ ( uint32_t now)
protected

Definition at line 517 of file vnc_client.cpp.

◆ session_end_()

void esphome::vnc::VncClient::session_end_ ( uint32_t now,
VncFailure failure,
const LogString * reason )
protected

Definition at line 440 of file vnc_client.cpp.

◆ session_lost_()

void esphome::vnc::VncClient::session_lost_ ( uint32_t now)
protected

Definition at line 429 of file vnc_client.cpp.

◆ set_auth_key()

void esphome::vnc::VncClient::set_auth_key ( const uint8_t * key)
inline

8 bytes, already bit-reversed for VNC, may live in PROGMEM.

Definition at line 92 of file vnc_client.h.

◆ set_host()

void esphome::vnc::VncClient::set_host ( const char * host)
inline

Definition at line 84 of file vnc_client.h.

◆ set_max_update_delay()

void esphome::vnc::VncClient::set_max_update_delay ( uint32_t ms)
inline

Definition at line 88 of file vnc_client.h.

◆ set_pixel_format()

void esphome::vnc::VncClient::set_pixel_format ( VncPixelFormat format)
inline

Definition at line 89 of file vnc_client.h.

◆ set_port()

void esphome::vnc::VncClient::set_port ( uint16_t port)
inline

Definition at line 85 of file vnc_client.h.

◆ set_reconnect_interval()

void esphome::vnc::VncClient::set_reconnect_interval ( uint32_t ms)
inline

Definition at line 86 of file vnc_client.h.

◆ set_update_delay()

void esphome::vnc::VncClient::set_update_delay ( uint32_t ms)
inline

Definition at line 87 of file vnc_client.h.

◆ setup()

void esphome::vnc::VncClient::setup ( )
overridevirtual

Reimplemented from esphome::Component.

Definition at line 136 of file vnc_client.cpp.

◆ skip_()

void esphome::vnc::VncClient::skip_ ( uint32_t count,
VncStep next )
protected

Definition at line 552 of file vnc_client.cpp.

◆ start_handshake_()

void esphome::vnc::VncClient::start_handshake_ ( uint32_t now)
protected

Definition at line 407 of file vnc_client.cpp.

◆ start_session_()

bool esphome::vnc::VncClient::start_session_ ( uint32_t now)
protected

Definition at line 1091 of file vnc_client.cpp.

◆ tile_hash_()

uint32_t esphome::vnc::VncClient::tile_hash_ ( ) const
protected

Definition at line 1038 of file vnc_client.cpp.

◆ touch()

void esphome::vnc::VncClient::touch ( touchscreen::TouchPoint tp)
overridevirtual

Reimplemented from esphome::touchscreen::TouchListener.

Definition at line 118 of file vnc_client.cpp.

◆ type_text() [1/2]

void esphome::vnc::VncClient::type_text ( const char * text,
size_t len )

Definition at line 1280 of file vnc_client.cpp.

◆ type_text() [2/2]

void esphome::vnc::VncClient::type_text ( const std::string & text)
inline

Definition at line 122 of file vnc_client.h.

◆ update()

void esphome::vnc::VncClient::update ( const touchscreen::TouchPoints_t & tpoints)
overridevirtual

Reimplemented from esphome::touchscreen::TouchListener.

Definition at line 124 of file vnc_client.cpp.

Field Documentation

◆ after_skip_

VncStep esphome::vnc::VncClient::after_skip_ {VncStep::VNC_STEP_MESSAGE}
protected

Definition at line 275 of file vnc_client.h.

◆ auth_hold_

bool esphome::vnc::VncClient::auth_hold_ {false}
protected

Definition at line 282 of file vnc_client.h.

◆ auth_key_

const uint8_t* esphome::vnc::VncClient::auth_key_ {nullptr}
protected

Definition at line 194 of file vnc_client.h.

◆ auth_retried_

bool esphome::vnc::VncClient::auth_retried_ {false}
protected

Definition at line 281 of file vnc_client.h.

◆ backoff_ms_

uint32_t esphome::vnc::VncClient::backoff_ms_ {0}
protected

Definition at line 205 of file vnc_client.h.

◆ big_endian_

bool esphome::vnc::VncClient::big_endian_
protected

Definition at line 301 of file vnc_client.h.

◆ bitness_

display::ColorBitness esphome::vnc::VncClient::bitness_ {display::COLOR_BITNESS_565}
protected

Definition at line 271 of file vnc_client.h.

◆ bpp_

uint8_t esphome::vnc::VncClient::bpp_ {2}
protected

Definition at line 260 of file vnc_client.h.

◆ busy_since_ms_

uint32_t esphome::vnc::VncClient::busy_since_ms_ {0}
protected

Definition at line 209 of file vnc_client.h.

◆ busy_warned_

bool esphome::vnc::VncClient::busy_warned_ {false}
protected

Definition at line 293 of file vnc_client.h.

◆ connect_callback_

LazyCallbackManager<void()> esphome::vnc::VncClient::connect_callback_
protected

Definition at line 196 of file vnc_client.h.

◆ disconnect_callback_

LazyCallbackManager<void()> esphome::vnc::VncClient::disconnect_callback_
protected

Definition at line 197 of file vnc_client.h.

◆ display_

display::Display* esphome::vnc::VncClient::display_
protected

Definition at line 191 of file vnc_client.h.

◆ display_busy_

bool esphome::vnc::VncClient::display_busy_ {false}
protected

Definition at line 292 of file vnc_client.h.

◆ display_parks_

bool esphome::vnc::VncClient::display_parks_ {false}
protected

Definition at line 291 of file vnc_client.h.

◆ dragging_

bool esphome::vnc::VncClient::dragging_ {false}
protected

Definition at line 298 of file vnc_client.h.

◆ drawn_tiles_

uint16_t esphome::vnc::VncClient::drawn_tiles_ {0}
protected

Definition at line 240 of file vnc_client.h.

◆ fb_h_

uint16_t esphome::vnc::VncClient::fb_h_ {0}
protected

Definition at line 228 of file vnc_client.h.

◆ fb_w_

uint16_t esphome::vnc::VncClient::fb_w_ {0}
protected

Definition at line 227 of file vnc_client.h.

◆ first_change_ms_

uint32_t esphome::vnc::VncClient::first_change_ms_ {0}
protected

Definition at line 213 of file vnc_client.h.

◆ frame_drawn_

bool esphome::vnc::VncClient::frame_drawn_ {false}
protected

Definition at line 288 of file vnc_client.h.

◆ has_touchscreen_

bool esphome::vnc::VncClient::has_touchscreen_ {false}
protected

Definition at line 297 of file vnc_client.h.

◆ hash_capacity_

uint16_t esphome::vnc::VncClient::hash_capacity_ {0}
protected

Definition at line 241 of file vnc_client.h.

◆ hash_cols_

uint16_t esphome::vnc::VncClient::hash_cols_ {0}
protected

Definition at line 242 of file vnc_client.h.

◆ hash_rotation_

uint8_t esphome::vnc::VncClient::hash_rotation_ {0}
protected

Definition at line 268 of file vnc_client.h.

◆ hash_rows_

uint16_t esphome::vnc::VncClient::hash_rows_ {0}
protected

Definition at line 243 of file vnc_client.h.

◆ hex_bg_

uint8_t esphome::vnc::VncClient::hex_bg_[2] {}
protected

Definition at line 269 of file vnc_client.h.

◆ hex_fg_

uint8_t esphome::vnc::VncClient::hex_fg_[2] {}
protected

Definition at line 270 of file vnc_client.h.

◆ high_freq_

HighFrequencyLoopRequester esphome::vnc::VncClient::high_freq_
protected

Definition at line 198 of file vnc_client.h.

◆ hold_ms_

uint32_t esphome::vnc::VncClient::hold_ms_ {0}
protected

Definition at line 206 of file vnc_client.h.

◆ hold_start_ms_

uint32_t esphome::vnc::VncClient::hold_start_ms_ {0}
protected

Definition at line 207 of file vnc_client.h.

◆ in_update_

bool esphome::vnc::VncClient::in_update_ {false}
protected

Definition at line 284 of file vnc_client.h.

◆ INPUT_BOOST_MS

uint32_t esphome::vnc::VncClient::INPUT_BOOST_MS = 2000
staticconstexprprotected

Definition at line 137 of file vnc_client.h.

◆ KEY_EVENT_SIZE

size_t esphome::vnc::VncClient::KEY_EVENT_SIZE = 8
staticconstexprprotected

Definition at line 138 of file vnc_client.h.

◆ last_change_ms_

uint32_t esphome::vnc::VncClient::last_change_ms_ {0}
protected

Definition at line 214 of file vnc_client.h.

◆ last_input_ms_

uint32_t esphome::vnc::VncClient::last_input_ms_ {0}
protected

Definition at line 216 of file vnc_client.h.

◆ last_request_ms_

uint32_t esphome::vnc::VncClient::last_request_ms_ {0}
protected

Definition at line 220 of file vnc_client.h.

◆ last_rx_ms_

uint32_t esphome::vnc::VncClient::last_rx_ms_ {0}
protected

Definition at line 221 of file vnc_client.h.

◆ link_

socket::TcpClientLink esphome::vnc::VncClient::link_
protected

Definition at line 192 of file vnc_client.h.

◆ MAX_PENDING_RELEASES

size_t esphome::vnc::VncClient::MAX_PENDING_RELEASES = 4
staticconstexprprotected

Definition at line 140 of file vnc_client.h.

◆ max_update_delay_ms_

uint32_t esphome::vnc::VncClient::max_update_delay_ms_ {1000}
protected

Definition at line 204 of file vnc_client.h.

◆ minor_

uint8_t esphome::vnc::VncClient::minor_ {8}
protected

Definition at line 261 of file vnc_client.h.

◆ need_full_

bool esphome::vnc::VncClient::need_full_ {false}
protected

Definition at line 287 of file vnc_client.h.

◆ network_was_up_

bool esphome::vnc::VncClient::network_was_up_ {false}
protected

Definition at line 295 of file vnc_client.h.

◆ pass_start_ms_

uint32_t esphome::vnc::VncClient::pass_start_ms_ {0}
protected

Definition at line 222 of file vnc_client.h.

◆ pending_

uint8_t esphome::vnc::VncClient::pending_[MAX_PENDING_RELEASES][KEY_EVENT_SIZE]
protected

Definition at line 306 of file vnc_client.h.

◆ pending_count_

uint8_t esphome::vnc::VncClient::pending_count_ {0}
protected

Definition at line 255 of file vnc_client.h.

◆ pixel_format_

VncPixelFormat esphome::vnc::VncClient::pixel_format_ {VncPixelFormat::VNC_PIXEL_FORMAT_AUTO}
protected

Definition at line 272 of file vnc_client.h.

◆ POINTER_EVENT_SIZE

size_t esphome::vnc::VncClient::POINTER_EVENT_SIZE = 6
staticconstexprprotected

Definition at line 139 of file vnc_client.h.

◆ pos_x_

uint16_t esphome::vnc::VncClient::pos_x_ {0}
protected

Definition at line 237 of file vnc_client.h.

◆ pos_y_

uint16_t esphome::vnc::VncClient::pos_y_ {0}
protected

Definition at line 238 of file vnc_client.h.

◆ press_x_

uint16_t esphome::vnc::VncClient::press_x_ {0}
protected

Definition at line 249 of file vnc_client.h.

◆ press_y_

uint16_t esphome::vnc::VncClient::press_y_ {0}
protected

Definition at line 250 of file vnc_client.h.

◆ ptr_buttons_

uint8_t esphome::vnc::VncClient::ptr_buttons_ {0}
protected

Definition at line 254 of file vnc_client.h.

◆ ptr_x_

uint16_t esphome::vnc::VncClient::ptr_x_ {0}
protected

Definition at line 245 of file vnc_client.h.

◆ ptr_y_

uint16_t esphome::vnc::VncClient::ptr_y_ {0}
protected

Definition at line 246 of file vnc_client.h.

◆ reason_failure_

VncFailure esphome::vnc::VncClient::reason_failure_ {VncFailure::VNC_FAILURE_TRANSIENT}
protected

Definition at line 276 of file vnc_client.h.

◆ rect_h_

uint16_t esphome::vnc::VncClient::rect_h_ {0}
protected

Definition at line 235 of file vnc_client.h.

◆ rect_w_

uint16_t esphome::vnc::VncClient::rect_w_ {0}
protected

Definition at line 234 of file vnc_client.h.

◆ rect_x_

uint16_t esphome::vnc::VncClient::rect_x_ {0}
protected

Definition at line 232 of file vnc_client.h.

◆ rect_y_

uint16_t esphome::vnc::VncClient::rect_y_ {0}
protected

Definition at line 233 of file vnc_client.h.

◆ rects_left_

uint16_t esphome::vnc::VncClient::rects_left_ {0}
protected

Definition at line 231 of file vnc_client.h.

◆ refresh_pending_

bool esphome::vnc::VncClient::refresh_pending_ {false}
protected

Definition at line 286 of file vnc_client.h.

◆ refresh_retried_

bool esphome::vnc::VncClient::refresh_retried_ {false}
protected

Definition at line 294 of file vnc_client.h.

◆ request_outstanding_

bool esphome::vnc::VncClient::request_outstanding_ {false}
protected

Definition at line 285 of file vnc_client.h.

◆ rx_

uint8_t esphome::vnc::VncClient::rx_[RX_BUFFER_SIZE]
protected

Definition at line 303 of file vnc_client.h.

◆ RX_BUFFER_SIZE

size_t esphome::vnc::VncClient::RX_BUFFER_SIZE = 512
staticconstexprprotected

Definition at line 133 of file vnc_client.h.

◆ rx_len_

uint16_t esphome::vnc::VncClient::rx_len_ {0}
protected

Definition at line 226 of file vnc_client.h.

◆ rx_pending_

bool esphome::vnc::VncClient::rx_pending_ {false}
protected

Definition at line 278 of file vnc_client.h.

◆ rx_pos_

uint16_t esphome::vnc::VncClient::rx_pos_ {0}
protected

Definition at line 225 of file vnc_client.h.

◆ rx_total_

uint32_t esphome::vnc::VncClient::rx_total_ {0}
protected

Definition at line 218 of file vnc_client.h.

◆ sec_count_

uint8_t esphome::vnc::VncClient::sec_count_ {0}
protected

Definition at line 265 of file vnc_client.h.

◆ sec_type_

uint8_t esphome::vnc::VncClient::sec_type_ {0}
protected

Definition at line 263 of file vnc_client.h.

◆ session_start_ms_

uint32_t esphome::vnc::VncClient::session_start_ms_ {0}
protected

Definition at line 210 of file vnc_client.h.

◆ setup_ms_

uint32_t esphome::vnc::VncClient::setup_ms_ {0}
protected

Definition at line 208 of file vnc_client.h.

◆ skip_left_

uint32_t esphome::vnc::VncClient::skip_left_ {0}
protected

Definition at line 223 of file vnc_client.h.

◆ state_

VncState esphome::vnc::VncClient::state_ {VncState::VNC_STATE_IDLE}
protected

Definition at line 273 of file vnc_client.h.

◆ step_

VncStep esphome::vnc::VncClient::step_ {VncStep::VNC_STEP_VERSION}
protected

Definition at line 274 of file vnc_client.h.

◆ subrects_coloured_

bool esphome::vnc::VncClient::subrects_coloured_ {false}
protected

Definition at line 289 of file vnc_client.h.

◆ subrects_left_

uint8_t esphome::vnc::VncClient::subrects_left_ {0}
protected

Definition at line 259 of file vnc_client.h.

◆ text_len_

uint8_t esphome::vnc::VncClient::text_len_ {0}
protected

Definition at line 266 of file vnc_client.h.

◆ tile_

uint8_t esphome::vnc::VncClient::tile_[TILE_BUFFER_SIZE]
protected

Definition at line 308 of file vnc_client.h.

◆ TILE_BUFFER_SIZE

size_t esphome::vnc::VncClient::TILE_BUFFER_SIZE = 16 * 16 * 2
staticconstexprprotected

Definition at line 134 of file vnc_client.h.

◆ tile_fill_

uint16_t esphome::vnc::VncClient::tile_fill_ {0}
protected

Definition at line 239 of file vnc_client.h.

◆ tile_h_

uint8_t esphome::vnc::VncClient::tile_h_ {0}
protected

Definition at line 258 of file vnc_client.h.

◆ tile_hashes_

uint32_t* esphome::vnc::VncClient::tile_hashes_ {nullptr}
protected

Definition at line 201 of file vnc_client.h.

◆ tile_hidden_

bool esphome::vnc::VncClient::tile_hidden_ {false}
protected

Definition at line 290 of file vnc_client.h.

◆ tile_w_

uint8_t esphome::vnc::VncClient::tile_w_ {0}
protected

Definition at line 257 of file vnc_client.h.

◆ touching_

bool esphome::vnc::VncClient::touching_ {false}
protected

Definition at line 299 of file vnc_client.h.

◆ update_delay_ms_

uint32_t esphome::vnc::VncClient::update_delay_ms_ {200}
protected

Definition at line 203 of file vnc_client.h.

◆ update_start_bytes_

uint32_t esphome::vnc::VncClient::update_start_bytes_ {0}
protected

Definition at line 219 of file vnc_client.h.

◆ update_start_ms_

uint32_t esphome::vnc::VncClient::update_start_ms_ {0}
protected

Definition at line 211 of file vnc_client.h.

◆ vis_h_

uint16_t esphome::vnc::VncClient::vis_h_ {0}
protected

Definition at line 230 of file vnc_client.h.

◆ vis_w_

uint16_t esphome::vnc::VncClient::vis_w_ {0}
protected

Definition at line 229 of file vnc_client.h.


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