Patrick Venture | d149172 | 2019-02-08 14:37:45 -0800 | [diff] [blame] | 1 | #pragma once |
| 2 | |
| 3 | #include "conf.hpp" |
| 4 | |
Patrick Venture | d149172 | 2019-02-08 14:37:45 -0800 | [diff] [blame] | 5 | #include <nlohmann/json.hpp> |
Patrick Venture | a83a3ec | 2020-08-04 09:52:05 -0700 | [diff] [blame] | 6 | |
| 7 | #include <map> |
Patrick Venture | d149172 | 2019-02-08 14:37:45 -0800 | [diff] [blame] | 8 | #include <tuple> |
| 9 | |
Patrick Venture | a076487 | 2020-08-08 07:48:43 -0700 | [diff] [blame] | 10 | namespace pid_control |
| 11 | { |
| 12 | |
Patrick Venture | d149172 | 2019-02-08 14:37:45 -0800 | [diff] [blame] | 13 | using json = nlohmann::json; |
| 14 | |
| 15 | /** |
| 16 | * Given the json "zones" data, create the map of PIDs and the map of zones. |
| 17 | * |
| 18 | * @param[in] data - the json data |
| 19 | * @return the pidConfig, and the zoneConfig |
| 20 | */ |
James Feist | f81f288 | 2019-02-26 11:26:36 -0800 | [diff] [blame] | 21 | std::pair<std::map<int64_t, conf::PIDConf>, |
| 22 | std::map<int64_t, struct conf::ZoneConfig>> |
Patrick Venture | d149172 | 2019-02-08 14:37:45 -0800 | [diff] [blame] | 23 | buildPIDsFromJson(const json& data); |
Patrick Venture | a076487 | 2020-08-08 07:48:43 -0700 | [diff] [blame] | 24 | |
| 25 | } // namespace pid_control |