ESPHome  2024.11.1
Public Member Functions | Protected Attributes
esphome::mqtt::MQTTBackendLibreTiny Class Referencefinal

#include <mqtt_backend_libretiny.h>

Inheritance diagram for esphome::mqtt::MQTTBackendLibreTiny:
esphome::mqtt::MQTTBackend

Public Member Functions

void set_keep_alive (uint16_t keep_alive) final
 
void set_client_id (const char *client_id) final
 
void set_clean_session (bool clean_session) final
 
void set_credentials (const char *username, const char *password) final
 
void set_will (const char *topic, uint8_t qos, bool retain, const char *payload) final
 
void set_server (network::IPAddress ip, uint16_t port) final
 
void set_server (const char *host, uint16_t port) final
 
void set_secure (bool secure)
 
void add_server_fingerprint (const uint8_t *fingerprint)
 
void set_on_connect (std::function< on_connect_callback_t > &&callback) final
 
void set_on_disconnect (std::function< on_disconnect_callback_t > &&callback) final
 
void set_on_subscribe (std::function< on_subscribe_callback_t > &&callback) final
 
void set_on_unsubscribe (std::function< on_unsubscribe_callback_t > &&callback) final
 
void set_on_message (std::function< on_message_callback_t > &&callback) final
 
void set_on_publish (std::function< on_publish_user_callback_t > &&callback) final
 
bool connected () const final
 
void connect () final
 
void disconnect () final
 
bool subscribe (const char *topic, uint8_t qos) final
 
bool unsubscribe (const char *topic) final
 
bool publish (const char *topic, const char *payload, size_t length, uint8_t qos, bool retain) final
 
- Public Member Functions inherited from esphome::mqtt::MQTTBackend
virtual bool publish (const MQTTMessage &message)
 
virtual void loop ()
 

Protected Attributes

AsyncMqttClient mqtt_client_
 

Additional Inherited Members

- Public Types inherited from esphome::mqtt::MQTTBackend
using on_connect_callback_t = void(bool session_present)
 
using on_disconnect_callback_t = void(MQTTClientDisconnectReason reason)
 
using on_subscribe_callback_t = void(uint16_t packet_id, uint8_t qos)
 
using on_unsubscribe_callback_t = void(uint16_t packet_id)
 
using on_message_callback_t = void(const char *topic, const char *payload, size_t len, size_t index, size_t total)
 
using on_publish_user_callback_t = void(uint16_t packet_id)
 

Detailed Description

Definition at line 12 of file mqtt_backend_libretiny.h.

Member Function Documentation

◆ add_server_fingerprint()

void esphome::mqtt::MQTTBackendLibreTiny::add_server_fingerprint ( const uint8_t *  fingerprint)
inline

Definition at line 27 of file mqtt_backend_libretiny.h.

◆ connect()

void esphome::mqtt::MQTTBackendLibreTiny::connect ( )
inlinefinalvirtual

Implements esphome::mqtt::MQTTBackend.

Definition at line 57 of file mqtt_backend_libretiny.h.

◆ connected()

bool esphome::mqtt::MQTTBackendLibreTiny::connected ( ) const
inlinefinalvirtual

Implements esphome::mqtt::MQTTBackend.

Definition at line 56 of file mqtt_backend_libretiny.h.

◆ disconnect()

void esphome::mqtt::MQTTBackendLibreTiny::disconnect ( )
inlinefinalvirtual

Implements esphome::mqtt::MQTTBackend.

Definition at line 58 of file mqtt_backend_libretiny.h.

◆ publish()

bool esphome::mqtt::MQTTBackendLibreTiny::publish ( const char *  topic,
const char *  payload,
size_t  length,
uint8_t  qos,
bool  retain 
)
inlinefinalvirtual

Implements esphome::mqtt::MQTTBackend.

Definition at line 61 of file mqtt_backend_libretiny.h.

◆ set_clean_session()

void esphome::mqtt::MQTTBackendLibreTiny::set_clean_session ( bool  clean_session)
inlinefinalvirtual

Implements esphome::mqtt::MQTTBackend.

Definition at line 16 of file mqtt_backend_libretiny.h.

◆ set_client_id()

void esphome::mqtt::MQTTBackendLibreTiny::set_client_id ( const char *  client_id)
inlinefinalvirtual

Implements esphome::mqtt::MQTTBackend.

Definition at line 15 of file mqtt_backend_libretiny.h.

◆ set_credentials()

void esphome::mqtt::MQTTBackendLibreTiny::set_credentials ( const char *  username,
const char *  password 
)
inlinefinalvirtual

Implements esphome::mqtt::MQTTBackend.

Definition at line 17 of file mqtt_backend_libretiny.h.

◆ set_keep_alive()

void esphome::mqtt::MQTTBackendLibreTiny::set_keep_alive ( uint16_t  keep_alive)
inlinefinalvirtual

Implements esphome::mqtt::MQTTBackend.

Definition at line 14 of file mqtt_backend_libretiny.h.

◆ set_on_connect()

void esphome::mqtt::MQTTBackendLibreTiny::set_on_connect ( std::function< on_connect_callback_t > &&  callback)
inlinefinalvirtual

Implements esphome::mqtt::MQTTBackend.

Definition at line 30 of file mqtt_backend_libretiny.h.

◆ set_on_disconnect()

void esphome::mqtt::MQTTBackendLibreTiny::set_on_disconnect ( std::function< on_disconnect_callback_t > &&  callback)
inlinefinalvirtual

Implements esphome::mqtt::MQTTBackend.

Definition at line 33 of file mqtt_backend_libretiny.h.

◆ set_on_message()

void esphome::mqtt::MQTTBackendLibreTiny::set_on_message ( std::function< on_message_callback_t > &&  callback)
inlinefinalvirtual

Implements esphome::mqtt::MQTTBackend.

Definition at line 46 of file mqtt_backend_libretiny.h.

◆ set_on_publish()

void esphome::mqtt::MQTTBackendLibreTiny::set_on_publish ( std::function< on_publish_user_callback_t > &&  callback)
inlinefinalvirtual

Implements esphome::mqtt::MQTTBackend.

Definition at line 52 of file mqtt_backend_libretiny.h.

◆ set_on_subscribe()

void esphome::mqtt::MQTTBackendLibreTiny::set_on_subscribe ( std::function< on_subscribe_callback_t > &&  callback)
inlinefinalvirtual

Implements esphome::mqtt::MQTTBackend.

Definition at line 40 of file mqtt_backend_libretiny.h.

◆ set_on_unsubscribe()

void esphome::mqtt::MQTTBackendLibreTiny::set_on_unsubscribe ( std::function< on_unsubscribe_callback_t > &&  callback)
inlinefinalvirtual

Implements esphome::mqtt::MQTTBackend.

Definition at line 43 of file mqtt_backend_libretiny.h.

◆ set_secure()

void esphome::mqtt::MQTTBackendLibreTiny::set_secure ( bool  secure)
inline

Definition at line 26 of file mqtt_backend_libretiny.h.

◆ set_server() [1/2]

void esphome::mqtt::MQTTBackendLibreTiny::set_server ( network::IPAddress  ip,
uint16_t  port 
)
inlinefinalvirtual

Implements esphome::mqtt::MQTTBackend.

Definition at line 23 of file mqtt_backend_libretiny.h.

◆ set_server() [2/2]

void esphome::mqtt::MQTTBackendLibreTiny::set_server ( const char *  host,
uint16_t  port 
)
inlinefinalvirtual

Implements esphome::mqtt::MQTTBackend.

Definition at line 24 of file mqtt_backend_libretiny.h.

◆ set_will()

void esphome::mqtt::MQTTBackendLibreTiny::set_will ( const char *  topic,
uint8_t  qos,
bool  retain,
const char *  payload 
)
inlinefinalvirtual

Implements esphome::mqtt::MQTTBackend.

Definition at line 20 of file mqtt_backend_libretiny.h.

◆ subscribe()

bool esphome::mqtt::MQTTBackendLibreTiny::subscribe ( const char *  topic,
uint8_t  qos 
)
inlinefinalvirtual

Implements esphome::mqtt::MQTTBackend.

Definition at line 59 of file mqtt_backend_libretiny.h.

◆ unsubscribe()

bool esphome::mqtt::MQTTBackendLibreTiny::unsubscribe ( const char *  topic)
inlinefinalvirtual

Implements esphome::mqtt::MQTTBackend.

Definition at line 60 of file mqtt_backend_libretiny.h.

Field Documentation

◆ mqtt_client_

AsyncMqttClient esphome::mqtt::MQTTBackendLibreTiny::mqtt_client_
protected

Definition at line 67 of file mqtt_backend_libretiny.h.


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