diff --git a/ks_mqtt_connector_8h_source.html b/ks_mqtt_connector_8h_source.html index 38d2b6c..484da1b 100644 --- a/ks_mqtt_connector_8h_source.html +++ b/ks_mqtt_connector_8h_source.html @@ -207,32 +207,32 @@
ksf::comps::ksMqttConnector::wifiConnWp
std::weak_ptr< ksWifiConnector > wifiConnWp
Weak pointer to WiFi connector.
Definition ksMqttConnector.h:55
ksf::comps::ksMqttConnector::netClientUq
std::unique_ptr< WiFiClient > netClientUq
Shared pointer to WiFiClient used to connect to MQTT.
Definition ksMqttConnector.h:52
ksf::comps::ksMqttConnector::prefix
std::string prefix
Saved MQTT prefix.
Definition ksMqttConnector.h:68
-
ksf::comps::ksMqttConnector::subscribe
void subscribe(const std::string &topic, bool skipDevicePrefix=false, ksMqttConnector::QosLevel=ksMqttConnector::QosLevel::QOS_AT_LEAST_ONCE)
Subscribes to MQTT topic.
Definition ksMqttConnector.cpp:157
+
ksf::comps::ksMqttConnector::subscribe
void subscribe(const std::string &topic, bool skipDevicePrefix=false, ksMqttConnector::QosLevel=ksMqttConnector::QosLevel::QOS_AT_LEAST_ONCE)
Subscribes to MQTT topic.
Definition ksMqttConnector.cpp:158
ksf::comps::ksMqttConnector::getReconnectCounter
uint32_t getReconnectCounter() const
Retrieves MQTT reconnect counter.
Definition ksMqttConnector.h:157
ksf::comps::ksMqttConnector::init
bool init(ksApplication *app) override
Instantiates the MQTT connector component.
Definition ksMqttConnector.cpp:42
ksf::comps::ksMqttConnector::lastSuccessConnectionTime
uint64_t lastSuccessConnectionTime
Time of connection to MQTT broker in seconds.
Definition ksMqttConnector.h:57
ksf::comps::ksMqttConnector::mqttClientUq
std::unique_ptr< PubSubClient > mqttClientUq
Shared pointer to PubSubClient used to connect to MQTT.
Definition ksMqttConnector.h:53
ksf::comps::ksMqttConnector::~ksMqttConnector
virtual ~ksMqttConnector()
Destructor (for uniqueptr purposes).
ksf::comps::ksMqttConnector::onAnyMessage
std::shared_ptr< ksf::evt::ksEvent< const std::string_view &, const std::string_view & > > onAnyMessage
onAnyMessage event that user can bind to.
Definition ksMqttConnector.h:104
-
ksf::comps::ksMqttConnector::loop
bool loop(ksApplication *app) override
Executes MQTT connection logic.
Definition ksMqttConnector.cpp:245
+
ksf::comps::ksMqttConnector::loop
bool loop(ksApplication *app) override
Executes MQTT connection logic.
Definition ksMqttConnector.cpp:238
ksf::comps::ksMqttConnector::certFingerprint
std::unique_ptr< ksCertFingerprint > certFingerprint
Shared pointer to fingerprint validator.
Definition ksMqttConnector.h:72
ksf::comps::ksMqttConnector::login
std::string login
Saved MQTT login.
Definition ksMqttConnector.h:66
ksf::comps::ksMqttConnector::usePersistentSession
bool usePersistentSession
Use persistent session or not.
Definition ksMqttConnector.h:61
-
ksf::comps::ksMqttConnector::getConnectionTimeSeconds
uint32_t getConnectionTimeSeconds() const
Retrieves connection time in seconds.
Definition ksMqttConnector.cpp:280
+
ksf::comps::ksMqttConnector::getConnectionTimeSeconds
uint32_t getConnectionTimeSeconds() const
Retrieves connection time in seconds.
Definition ksMqttConnector.cpp:273
ksf::comps::ksMqttConnector::sendConnectionStatus
bool sendConnectionStatus
Send connection status to MQTT or not.
Definition ksMqttConnector.h:60
-
ksf::comps::ksMqttConnector::unsubscribe
void unsubscribe(const std::string &topic, bool skipDevicePrefix=false)
Unsubscribes the MQTT topic.
Definition ksMqttConnector.cpp:163
-
ksf::comps::ksMqttConnector::isConnected
bool isConnected() const
Retrieves connection state.
Definition ksMqttConnector.cpp:275
+
ksf::comps::ksMqttConnector::unsubscribe
void unsubscribe(const std::string &topic, bool skipDevicePrefix=false)
Unsubscribes the MQTT topic.
Definition ksMqttConnector.cpp:164
+
ksf::comps::ksMqttConnector::isConnected
bool isConnected() const
Retrieves connection state.
Definition ksMqttConnector.cpp:268
ksf::comps::ksMqttConnector::setupConnection
void setupConnection(const std::string broker, const std::string &port, std::string login, std::string password, std::string prefix, const std::string &fingerprint)
Sets up MQTT connection.
Definition ksMqttConnector.cpp:66
ksf::comps::ksMqttConnector::onDisconnected
std::shared_ptr< ksf::evt::ksEvent<> > onDisconnected
onDisconnected event that user can bind to.
Definition ksMqttConnector.h:107
-
ksf::comps::ksMqttConnector::publish
void publish(const std::string &topic, const std::string &payload, bool retain=false, bool skipDevicePrefix=false)
Publishes a message to the MQTT topic.
Definition ksMqttConnector.cpp:168
+
ksf::comps::ksMqttConnector::publish
void publish(const std::string &topic, const std::string &payload, bool retain=false, bool skipDevicePrefix=false)
Publishes a message to the MQTT topic.
Definition ksMqttConnector.cpp:169
ksf::comps::ksMqttConnector::portNumber
uint16_t portNumber
Saved MQTT port number.
Definition ksMqttConnector.h:70
-
ksf::comps::ksMqttConnector::mqttConnectedInternal
void mqttConnectedInternal()
Connects to the MQTT broker (internal function).
Definition ksMqttConnector.cpp:120
-
ksf::comps::ksMqttConnector::connectToBroker
bool connectToBroker()
Connects to the MQTT broker.
Definition ksMqttConnector.cpp:185
+
ksf::comps::ksMqttConnector::mqttConnectedInternal
void mqttConnectedInternal()
Connects to the MQTT broker (internal function).
Definition ksMqttConnector.cpp:121
+
ksf::comps::ksMqttConnector::connectToBroker
bool connectToBroker()
Connects to the MQTT broker.
Definition ksMqttConnector.cpp:186
ksf::comps::ksMqttConnector::reconnectTimer
ksSimpleTimer reconnectTimer
Timer that counts time between reconnection attempts.
Definition ksMqttConnector.h:64
ksf::comps::ksMqttConnector::postInit
bool postInit(ksApplication *app) override
Method that handles component post-initialization.
Definition ksMqttConnector.cpp:60
ksf::comps::ksMqttConnector::broker
std::string broker
Saved MQTT broker.
Definition ksMqttConnector.h:69
ksf::comps::ksMqttConnector::onConnected
std::shared_ptr< ksf::evt::ksEvent<> > onConnected
onConnected event that user can bind to.
Definition ksMqttConnector.h:106
-
ksf::comps::ksMqttConnector::mqttMessageInternal
void mqttMessageInternal(const char *topic, const uint8_t *payload, uint32_t length)
Called when MQTT message arrives (internal function).
Definition ksMqttConnector.cpp:127
+
ksf::comps::ksMqttConnector::mqttMessageInternal
void mqttMessageInternal(const char *topic, const uint8_t *payload, uint32_t length)
Called when MQTT message arrives (internal function).
Definition ksMqttConnector.cpp:128
ksf::comps::ksMqttConnector::password
std::string password
Saved MQTT password.
Definition ksMqttConnector.h:67
ksf::comps::ksMqttConnector::reconnectCounter
uint32_t reconnectCounter
MQTT reconnection counter.
Definition ksMqttConnector.h:58
ksf::comps::ksMqttConnector::wasConnected
bool wasConnected
True if connected in previous loop.
Definition ksMqttConnector.h:62