-
Notifications
You must be signed in to change notification settings - Fork 25
/
types.hpp
38 lines (30 loc) · 1.08 KB
/
types.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#pragma once
#include <sdbusplus/message.hpp>
#include <map>
#include <string>
#include <variant>
namespace ipmi
{
namespace vpd
{
using Path = std::string;
using Property = std::string;
/// The Value type represents all types that are possible for a FRU info.
/// Most fields in a FRU info are boolean or string. There is also a
/// 3-byte timestamp that, being converted to unix time, fits well into
/// uint64_t.
///
/// However for multirecord area records, there may be other data types,
/// not all of which are directly listed in IPMI FRU specification.
///
/// Hence, this type lists all types possible for sbdusplus except for
/// unixfd, object_path, and signature.
using Value = std::variant<bool, uint8_t, uint16_t, int16_t, uint32_t, int32_t,
uint64_t, int64_t, double, std::string>;
using PropertyMap = std::map<Property, Value>;
using Interface = std::string;
using InterfaceMap = std::map<Interface, PropertyMap>;
using Object = sdbusplus::message::object_path;
using ObjectMap = std::map<Object, InterfaceMap>;
} // namespace vpd
} // namespace ipmi