blob: 56267fa67a83747eaf2362fc949f6469a77747ec [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 */
Patrick Venture1df9e872020-10-08 15:35:01 -070021std::pair<std::map<int64_t, conf::PIDConf>, std::map<int64_t, conf::ZoneConfig>>
Patrick Ventured1491722019-02-08 14:37:45 -080022 buildPIDsFromJson(const json& data);
Patrick Venturea0764872020-08-08 07:48:43 -070023
24} // namespace pid_control