Patrick Venture | eeeb867 | 2019-02-08 11:47:42 -0800 | [diff] [blame] | 1 | #pragma once |
| 2 | |
| 3 | #include "conf.hpp" |
| 4 | |
| 5 | #include <map> |
| 6 | #include <nlohmann/json.hpp> |
| 7 | #include <string> |
| 8 | |
| 9 | using 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 Feist | f81f288 | 2019-02-26 11:26:36 -0800 | [diff] [blame^] | 19 | std::map<std::string, struct conf::SensorConfig> |
Patrick Venture | eeeb867 | 2019-02-08 11:47:42 -0800 | [diff] [blame] | 20 | buildSensorsFromJson(const json& data); |