blob: 0e9be0150056245fed50ed977f2507e8e2685709 [file] [log] [blame]
Patrick Venture02e32372019-08-16 10:50:18 -07001#pragma once
2
3#include <ipmid/types.hpp>
4#include <nlohmann/json.hpp>
5
6namespace ipmi
7{
8namespace sensor
9{
10
11/**
12 * @brief Given json data validate the data matches the expected format for the
13 * entity map configuration and parse the data into a map of the entities.
14 *
15 * If any entry is invalid, the entire contents passed in is disregarded as
16 * possibly corrupt.
17 *
18 * @param[in] data - the json data
19 * @return the map
20 */
21EntityInfoMap buildJsonEntityMap(const nlohmann::json& data);
22
23} // namespace sensor
24} // namespace ipmi