blob: 5daab6efa3a0abb36722df66fce20fd20ee850bf [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
Ed Tanousf8b6e552025-06-27 13:27:50 -07007#include <cstdint>
Patrick Venturea83a3ec2020-08-04 09:52:05 -07008#include <map>
Ed Tanousf8b6e552025-06-27 13:27:50 -07009#include <utility>
Patrick Ventured1491722019-02-08 14:37:45 -080010
Patrick Venturea0764872020-08-08 07:48:43 -070011namespace pid_control
12{
13
Patrick Ventured1491722019-02-08 14:37:45 -080014using json = nlohmann::json;
15
16/**
17 * Given the json "zones" data, create the map of PIDs and the map of zones.
18 *
19 * @param[in] data - the json data
20 * @return the pidConfig, and the zoneConfig
21 */
Patrick Venture1df9e872020-10-08 15:35:01 -070022std::pair<std::map<int64_t, conf::PIDConf>, std::map<int64_t, 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