ESPHome  2024.9.2
Public Member Functions | Protected Attributes
esphome::mqtt::MQTTBackendESP8266 Class Referencefinal

#include <mqtt_backend_esp8266.h>

Inheritance diagram for esphome::mqtt::MQTTBackendESP8266:
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_esp8266.h.

Member Function Documentation

◆ add_server_fingerprint()

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

Definition at line 27 of file mqtt_backend_esp8266.h.

◆ connect()

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

Implements esphome::mqtt::MQTTBackend.

Definition at line 57 of file mqtt_backend_esp8266.h.

◆ connected()

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

Implements esphome::mqtt::MQTTBackend.

Definition at line 56 of file mqtt_backend_esp8266.h.

◆ disconnect()

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

Implements esphome::mqtt::MQTTBackend.

Definition at line 58 of file mqtt_backend_esp8266.h.

◆ publish()

bool esphome::mqtt::MQTTBackendESP8266::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_esp8266.h.

◆ set_clean_session()

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

Implements esphome::mqtt::MQTTBackend.

Definition at line 16 of file mqtt_backend_esp8266.h.

◆ set_client_id()

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

Implements esphome::mqtt::MQTTBackend.

Definition at line 15 of file mqtt_backend_esp8266.h.

◆ set_credentials()

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

Implements esphome::mqtt::MQTTBackend.

Definition at line 17 of file mqtt_backend_esp8266.h.

◆ set_keep_alive()

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

Implements esphome::mqtt::MQTTBackend.

Definition at line 14 of file mqtt_backend_esp8266.h.

◆ set_on_connect()

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

Implements esphome::mqtt::MQTTBackend.

Definition at line 30 of file mqtt_backend_esp8266.h.

◆ set_on_disconnect()

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

Implements esphome::mqtt::MQTTBackend.

Definition at line 33 of file mqtt_backend_esp8266.h.

◆ set_on_message()

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

Implements esphome::mqtt::MQTTBackend.

Definition at line 46 of file mqtt_backend_esp8266.h.

◆ set_on_publish()

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

Implements esphome::mqtt::MQTTBackend.

Definition at line 52 of file mqtt_backend_esp8266.h.

◆ set_on_subscribe()

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

Implements esphome::mqtt::MQTTBackend.

Definition at line 40 of file mqtt_backend_esp8266.h.

◆ set_on_unsubscribe()

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

Implements esphome::mqtt::MQTTBackend.

Definition at line 43 of file mqtt_backend_esp8266.h.

◆ set_secure()

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

Definition at line 26 of file mqtt_backend_esp8266.h.

◆ set_server() [1/2]

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

Implements esphome::mqtt::MQTTBackend.

Definition at line 23 of file mqtt_backend_esp8266.h.

◆ set_server() [2/2]

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

Implements esphome::mqtt::MQTTBackend.

Definition at line 24 of file mqtt_backend_esp8266.h.

◆ set_will()

void esphome::mqtt::MQTTBackendESP8266::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_esp8266.h.

◆ subscribe()

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

Implements esphome::mqtt::MQTTBackend.

Definition at line 59 of file mqtt_backend_esp8266.h.

◆ unsubscribe()

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

Implements esphome::mqtt::MQTTBackend.

Definition at line 60 of file mqtt_backend_esp8266.h.

Field Documentation

◆ mqtt_client_

AsyncMqttClient esphome::mqtt::MQTTBackendESP8266::mqtt_client_
protected

Definition at line 67 of file mqtt_backend_esp8266.h.


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