summaryrefslogtreecommitdiffstats
path: root/entity_map_json.hpp
blob: 0e9be0150056245fed50ed977f2507e8e2685709 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#pragma once

#include <ipmid/types.hpp>
#include <nlohmann/json.hpp>

namespace ipmi
{
namespace sensor
{

/**
 * @brief Given json data validate the data matches the expected format for the
 * entity map configuration and parse the data into a map of the entities.
 *
 * If any entry is invalid, the entire contents passed in is disregarded as
 * possibly corrupt.
 *
 * @param[in] data - the json data
 * @return the map
 */
EntityInfoMap buildJsonEntityMap(const nlohmann::json& data);

} // namespace sensor
} // namespace ipmi
OpenPOWER on IntegriCloud