Doxygen with github
|
A component that manages MQTT-related configuration. More...
#include <ksMqttConfigProvider.h>
Public Member Functions | |
virtual const size_t | getInstanceType () const |
Retrieves type ID of the object. | |
virtual bool | isA (const size_t id) const |
Checks whether object is of given type. | |
void | readParams () override |
Retrieves MQTT parameters. | |
void | saveParams () override |
Saves MQTT aprameters 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 const 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 | |
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 const size_t | getClassType () |
Static Public Member Functions inherited from ksf::comps::ksConfigProvider | |
static const size_t | getClassType () |
Static Public Member Functions inherited from ksf::ksComponent | |
static const 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 configutation parameter. | |
void | addNewParamWithConfigDefault (ksConfig &config, std::string id, std::string label={}, int maxLength=50, EConfigParamType::Type type={}) |
Defines new configuation parameter (with default value). | |
Protected Attributes inherited from ksf::comps::ksConfigProvider | |
std::list< ksConfigParameter > | params |
Protected Attributes inherited from ksf::ksComponent | |
ksComponentState::TYPE | componentState { ksComponentState::NotInitialized } |
A component that manages MQTT-related configuration.
This configuration provider handles MQTT properties . Detailed documentation on the provider's behavior can be fond on 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 configuation 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 aprameters into the configuration file.
This method saves current (in-memory) MQTT properties into the configuration file.
Implements ksf::comps::ksConfigProvider.
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().