summaryrefslogtreecommitdiffstats
path: root/sensors/buildjson.hpp
blob: 0a38b936eada3728b2cd5ae94b2540d52f84d7d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#pragma once

#include "conf.hpp"

#include <map>
#include <nlohmann/json.hpp>
#include <string>

using json = nlohmann::json;

/**
 * Given a json object generated from a configuration file, build the sensor
 * configuration representation. This expecteds the json configuration to be
 * valid.
 *
 * @param[in] data - the json data
 * @return a map of sensors.
 */
std::map<std::string, struct conf::SensorConfig>
    buildSensorsFromJson(const json& data);
OpenPOWER on IntegriCloud