2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
42#ifndef MQTT_LIB_MQTTMAPPERPLUGIN_H
43#define MQTT_LIB_MQTTMAPPERPLUGIN_H
47#ifndef DOXYGEN_SHOULD_SKIP_THIS
51#include <nlohmann/json_fwd.hpp>
75 , function(function) {
84 , function(function) {
std::vector< mqtt::lib::Function > functions
std::vector< mqtt::lib::VoidFunction > voidFunctions
Class for changing the configuration.
void publishMappedTemplate(const nlohmann::json &templateMapping, nlohmann::json &json)
static void extractSubscription(const nlohmann::json &topicLevelJson, const std::string &topic, std::list< iot::mqtt::Topic > &topicList)
MqttMapper & operator=(const MqttMapper &)=delete
void publishMappedMessage(const nlohmann::json &staticMapping, const iot::mqtt::packets::Publish &publish)
void publishMappings(const iot::mqtt::packets::Publish &publish)
void publishMappedMessage(const std::string &topic, const std::string &message, uint8_t qoS, bool retain)
nlohmann::json findMatchingTopicLevel(const nlohmann::json &topicLevel, const std::string &topic)
void publishMappedMessages(const nlohmann::json &staticMapping, const iot::mqtt::packets::Publish &publish)
virtual void publishMapping(const std::string &topic, const std::string &message, uint8_t qoS, bool retain)=0
const nlohmann::json & mappingJson
std::list< void * > pluginHandles
void publishMappedTemplates(const nlohmann::json &templateMapping, nlohmann::json &json, const iot::mqtt::packets::Publish &publish)
inja::Environment * injaEnvironment
MqttMapper(const nlohmann::json &mappingJson)
MqttMapper(const MqttMapper &)=delete
std::list< iot::mqtt::Topic > extractSubscriptions()
static void extractSubscriptions(const nlohmann::json &mappingJson, const std::string &topic, std::list< iot::mqtt::Topic > &topicList)
std::vector< const nlohmann::json * > Arguments
const SourceLocation location
const std::string message
FunctionBase(const std::string &name, int numArgs)
Function(const std::string &name, int numArgs, const std::function< inja::json(inja::Arguments &)> &function)
VoidFunction(const std::string &name, int numArgs, const std::function< void(inja::Arguments &)> &function)