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