blob: 5489c5a7925b1b8ca58973ffecc74fca6d104e25 [file] [log] [blame]
Patrick Ventured1491722019-02-08 14:37:45 -08001#pragma once
2
3#include "conf.hpp"
4
Patrick Ventured1491722019-02-08 14:37:45 -08005#include <nlohmann/json.hpp>
Patrick Venturea83a3ec2020-08-04 09:52:05 -07006
7#include <map>
Patrick Ventured1491722019-02-08 14:37:45 -08008#include <tuple>
9
Patrick Venturea0764872020-08-08 07:48:43 -070010namespace pid_control
11{
12
Patrick Ventured1491722019-02-08 14:37:45 -080013using 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 Feistf81f2882019-02-26 11:26:36 -080021std::pair<std::map<int64_t, conf::PIDConf>,
22 std::map<int64_t, struct conf::ZoneConfig>>
Patrick Ventured1491722019-02-08 14:37:45 -080023 buildPIDsFromJson(const json& data);
Patrick Venturea0764872020-08-08 07:48:43 -070024
25} // namespace pid_control