1 #pragma once 2 3 #include "conf.hpp" 4 5 #include <nlohmann/json.hpp> 6 7 #include <map> 8 #include <string> 9 10 using json = nlohmann::json; 11 12 namespace pid_control 13 { 14 15 /** 16 * Given a json object generated from a configuration file, build the sensor 17 * configuration representation. This expecteds the json configuration to be 18 * valid. 19 * 20 * @param[in] data - the json data 21 * @return a map of sensors. 22 */ 23 std::map<std::string, conf::SensorConfig> 24 buildSensorsFromJson(const json& data); 25 26 } // namespace pid_control 27