xref: /openbmc/pldm/common/types.hpp (revision 772403b9)
1 #pragma once
2 
3 #include <stdint.h>
4 
5 #include <set>
6 #include <string>
7 #include <variant>
8 #include <vector>
9 
10 namespace pldm
11 {
12 
13 namespace dbus
14 {
15 
16 using ObjectPath = std::string;
17 using Service = std::string;
18 using Interface = std::string;
19 using Interfaces = std::vector<std::string>;
20 using Property = std::string;
21 using PropertyType = std::string;
22 using Value = std::variant<bool, uint8_t, int16_t, uint16_t, int32_t, uint32_t,
23                            int64_t, uint64_t, double, std::string>;
24 
25 } // namespace dbus
26 
27 namespace pdr
28 {
29 
30 using EID = uint8_t;
31 using TerminusHandle = uint16_t;
32 using TerminusID = uint8_t;
33 using SensorID = uint16_t;
34 using EntityType = uint16_t;
35 using EntityInstance = uint16_t;
36 using ContainerID = uint16_t;
37 using StateSetId = uint16_t;
38 using CompositeCount = uint8_t;
39 using SensorOffset = uint8_t;
40 using EventState = uint8_t;
41 
42 //!< Subset of the State Set that is supported by a effecter/sensor
43 using PossibleStates = std::set<uint8_t>;
44 //!< Subset of the State Set that is supported by each effecter/sensor in a
45 //!< composite efffecter/sensor
46 using CompositeSensorStates = std::vector<PossibleStates>;
47 using EntityInfo = std::tuple<ContainerID, EntityType, EntityInstance>;
48 using SensorInfo = std::tuple<EntityInfo, CompositeSensorStates>;
49 
50 } // namespace pdr
51 
52 } // namespace pldm
53