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.
std::string render(std::string_view input, const json &data)
static void extractSubscription(const nlohmann::json &topicLevelJson, const std::string &topic, std::list< iot::mqtt::Topic > &topicList)
std::list< iot::mqtt::Topic > extractSubscriptions() const
MappedPublishes getMappings(const iot::mqtt::packets::Publish &publish)
nlohmann::json findMatchingTopicLevel(const nlohmann::json &topicLevel, const std::string &topic)
nlohmann::json mappingJson
bool setMapping(nlohmann::json mappingJson)
static const nlohmann::json validate(const nlohmann::json &json)
std::pair< std::vector< iot::mqtt::packets::Publish >, std::vector< ScheduledPublish > > MappedPublishes
void getTemplateMappings(const nlohmann::json &templateMapping, nlohmann::json &json, const iot::mqtt::packets::Publish &publish, MappedPublishes &mappedPublishes)
static const nlohmann::json_schema::json_validator validator
std::list< void * > pluginHandles
static const nlohmann::json validate(const nlohmann::json &json, nlohmann::json_schema::basic_error_handler &err)
static void publishMappedMessage(const nlohmann::json &staticMapping, const iot::mqtt::packets::Publish &publish, MappedPublishes &mappedPublishes)
static const std::string mappingJsonSchemaString
const nlohmann::json & getMapping() const
inja::Environment * injaEnvironment
static void getStaticMappings(const nlohmann::json &staticMapping, const iot::mqtt::packets::Publish &publish, MappedPublishes &mappedPublishes)
static const std::string & getSchema()
const nlohmann::json & getConnection() const
static void publishMappedMessage(const std::string &topic, const std::string &message, uint8_t qoS, bool retain, double delay, MappedPublishes &mappedPublishes)
void publishMappedTemplate(const nlohmann::json &templateMapping, nlohmann::json &json, MappedPublishes &mappedPublishes)
json validate(const json &, error_handler &, const json_uri &initial_uri=json_uri("#")) const
json validate(const json &) const
std::vector< const nlohmann::json * > Arguments
void default_string_format_check(const std::string &format, const std::string &value)
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)