blob: 0a38b936eada3728b2cd5ae94b2540d52f84d7d3 [file] [log] [blame]
Patrick Ventureeeeb8672019-02-08 11:47:42 -08001#pragma once
2
3#include "conf.hpp"
4
5#include <map>
6#include <nlohmann/json.hpp>
7#include <string>
8
9using json = nlohmann::json;
10
11/**
12 * Given a json object generated from a configuration file, build the sensor
13 * configuration representation. This expecteds the json configuration to be
14 * valid.
15 *
16 * @param[in] data - the json data
17 * @return a map of sensors.
18 */
James Feistf81f2882019-02-26 11:26:36 -080019std::map<std::string, struct conf::SensorConfig>
Patrick Ventureeeeb8672019-02-08 11:47:42 -080020 buildSensorsFromJson(const json& data);