|
Doxygen with github
|
A component that manages MQTT-related configuration. More...
#include <ksMqttConfigProvider.h>
Inheritance diagram for ksf::comps::ksMqttConfigProvider:Public Member Functions | |
| virtual std::size_t | getInstanceType () const |
| Retrieves type ID of the object. | |
| virtual bool | isA (const std::size_t id) const |
| Checks whether object is of given type. | |
| void | readParams () override |
| Retrieves MQTT parameters. | |
| void | saveParams () override |
| Saves MQTT parameters into the configuration file. | |
| void | setupMqttConnector (ksMqttConnector &connector) |
| Setup MQTT connector with captured parameters. | |
Public Member Functions inherited from ksf::comps::ksConfigProvider | |
| std::list< ksConfigParameter > & | getParameters () |
| Provides reference to the list of managed parameters. | |
Public Member Functions inherited from ksf::ksComponent | |
| virtual bool | init (ksApplication *app) |
| Initializes component. | |
| virtual bool | loop (ksApplication *app) |
| Handles component loop logic, called from application loop. | |
| virtual bool | postInit (ksApplication *app) |
| Method called after component initialization, used to setup references to other components. | |
Public Member Functions inherited from ksf::ksRtti | |
| virtual | ~ksRtti ()=default |
| Destructor. | |
| template<typename TType > | |
| TType * | as () |
| Tries to cast object to the type provided as a template parameter. | |
| template<typename TType > | |
| const TType * | as () const |
| Tries to cast object to the type provided as a template parameter (const version). | |
Static Public Member Functions | |
| static std::size_t | getClassType () |
Static Public Member Functions inherited from ksf::comps::ksConfigProvider | |
| static std::size_t | getClassType () |
Static Public Member Functions inherited from ksf::ksComponent | |
| static std::size_t | getClassType () |
Additional Inherited Members | |
Protected Member Functions inherited from ksf::comps::ksConfigProvider | |
| void | addNewParam (std::string id, std::string label, std::string defaultValue, int maxLength=50, EConfigParamType::Type type={}) |
| Defines new configuration parameter. | |
| void | addNewParamWithConfigDefault (misc::ksConfig &config, std::string id, std::string label={}, int maxLength=50, EConfigParamType::Type type={}) |
| Defines new configuration parameter (with default value). | |
Protected Attributes inherited from ksf::comps::ksConfigProvider | |
| std::list< ksConfigParameter > | params |
| List of configuration parameters. | |
Protected Attributes inherited from ksf::ksComponent | |
| ksComponentState::TYPE | componentState { ksComponentState::NotInitialized } |
| Holds current state of the component. | |
A component that manages MQTT-related configuration.
This configuration provider handles MQTT properties. Detailed documentation on its behavior can be found on the ksConfigProvider sub-page.
|
inlinevirtual |
Retrieves type ID of the object.
Reimplemented from ksf::comps::ksConfigProvider.
|
inlinevirtual |
Checks whether object is of given type.
| id | Type ID to check against. |
Reimplemented from ksf::comps::ksConfigProvider.
|
overridevirtual |
Retrieves MQTT parameters.
This method reads the configuration file to retrieve MQTT broker information from file. The config contains data like MQTT address, device prefix, optional: credentials and expected SSL fingerprint.
Implements ksf::comps::ksConfigProvider.
References ksf::comps::ksConfigProvider::addNewParamWithConfigDefault().
|
overridevirtual |
Saves MQTT parameters into the configuration file.
This method saves current (in-memory) MQTT properties into the configuration file.
Implements ksf::comps::ksConfigProvider.
References ksf::comps::ksConfigProvider::params.
| void ksf::comps::ksMqttConfigProvider::setupMqttConnector | ( | ksMqttConnector & | connector | ) |
Setup MQTT connector with captured parameters.
| connector | MQTT connector reference |
References ksf::comps::ksMqttConnector::setupConnection().
Referenced by ksf::comps::ksMqttConnector::init().