ESPHome  2022.12.8
Public Member Functions | Protected Attributes
esphome::mqtt::MQTTBackendArduino Class Referencefinal

#include <mqtt_backend_arduino.h>

Inheritance diagram for esphome::mqtt::MQTTBackendArduino:
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 11 of file mqtt_backend_arduino.h.

Member Function Documentation

◆ add_server_fingerprint()

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

Definition at line 28 of file mqtt_backend_arduino.h.

◆ connect()

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

Implements esphome::mqtt::MQTTBackend.

Definition at line 58 of file mqtt_backend_arduino.h.

◆ connected()

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

Implements esphome::mqtt::MQTTBackend.

Definition at line 57 of file mqtt_backend_arduino.h.

◆ disconnect()

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

Implements esphome::mqtt::MQTTBackend.

Definition at line 59 of file mqtt_backend_arduino.h.

◆ publish()

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

Implements esphome::mqtt::MQTTBackend.

Definition at line 62 of file mqtt_backend_arduino.h.

◆ set_clean_session()

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

Implements esphome::mqtt::MQTTBackend.

Definition at line 15 of file mqtt_backend_arduino.h.

◆ set_client_id()

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

Implements esphome::mqtt::MQTTBackend.

Definition at line 14 of file mqtt_backend_arduino.h.

◆ set_credentials()

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

Implements esphome::mqtt::MQTTBackend.

Definition at line 16 of file mqtt_backend_arduino.h.

◆ set_keep_alive()

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

Implements esphome::mqtt::MQTTBackend.

Definition at line 13 of file mqtt_backend_arduino.h.

◆ set_on_connect()

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

Implements esphome::mqtt::MQTTBackend.

Definition at line 31 of file mqtt_backend_arduino.h.

◆ set_on_disconnect()

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

Implements esphome::mqtt::MQTTBackend.

Definition at line 34 of file mqtt_backend_arduino.h.

◆ set_on_message()

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

Implements esphome::mqtt::MQTTBackend.

Definition at line 47 of file mqtt_backend_arduino.h.

◆ set_on_publish()

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

Implements esphome::mqtt::MQTTBackend.

Definition at line 53 of file mqtt_backend_arduino.h.

◆ set_on_subscribe()

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

Implements esphome::mqtt::MQTTBackend.

Definition at line 41 of file mqtt_backend_arduino.h.

◆ set_on_unsubscribe()

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

Implements esphome::mqtt::MQTTBackend.

Definition at line 44 of file mqtt_backend_arduino.h.

◆ set_secure()

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

Definition at line 27 of file mqtt_backend_arduino.h.

◆ set_server() [1/2]

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

Implements esphome::mqtt::MQTTBackend.

Definition at line 22 of file mqtt_backend_arduino.h.

◆ set_server() [2/2]

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

Implements esphome::mqtt::MQTTBackend.

Definition at line 25 of file mqtt_backend_arduino.h.

◆ set_will()

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

Implements esphome::mqtt::MQTTBackend.

Definition at line 19 of file mqtt_backend_arduino.h.

◆ subscribe()

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

Implements esphome::mqtt::MQTTBackend.

Definition at line 60 of file mqtt_backend_arduino.h.

◆ unsubscribe()

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

Implements esphome::mqtt::MQTTBackend.

Definition at line 61 of file mqtt_backend_arduino.h.

Field Documentation

◆ mqtt_client_

AsyncMqttClient esphome::mqtt::MQTTBackendArduino::mqtt_client_
protected

Definition at line 68 of file mqtt_backend_arduino.h.


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