summaryrefslogtreecommitdiffstats
path: root/pid/buildjson.hpp
blob: d4e86a799dd420887c4f6149b89bcfb845205706 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#pragma once

#include "conf.hpp"

#include <map>
#include <nlohmann/json.hpp>
#include <tuple>

using json = nlohmann::json;

/**
 * Given the json "zones" data, create the map of PIDs and the map of zones.
 *
 * @param[in] data - the json data
 * @return the pidConfig, and the zoneConfig
 */
std::pair<std::map<int64_t, conf::PIDConf>,
          std::map<int64_t, struct conf::ZoneConfig>>
    buildPIDsFromJson(const json& data);
OpenPOWER on IntegriCloud