Marri Devender Rao | a62bacc | 2017-06-04 23:40:16 -0500 | [diff] [blame] | 1 | #ifndef OPENBMC_IPMI_FRU_READ_H |
| 2 | #define OPENBMC_IPMI_FRU_READ_H |
| 3 | |
| 4 | #include <systemd/sd-bus.h> |
Patrick Venture | 0b02be9 | 2018-08-31 11:55:55 -0700 | [diff] [blame] | 5 | |
Marri Devender Rao | a62bacc | 2017-06-04 23:40:16 -0500 | [diff] [blame] | 6 | #include <array> |
Marri Devender Rao | a62bacc | 2017-06-04 23:40:16 -0500 | [diff] [blame] | 7 | #include <map> |
Patrick Venture | 0b02be9 | 2018-08-31 11:55:55 -0700 | [diff] [blame] | 8 | #include <string> |
Marri Devender Rao | a62bacc | 2017-06-04 23:40:16 -0500 | [diff] [blame] | 9 | #include <vector> |
| 10 | |
| 11 | struct IPMIFruData |
| 12 | { |
| 13 | std::string section; |
| 14 | std::string property; |
| 15 | std::string delimiter; |
| 16 | }; |
| 17 | |
| 18 | using DbusProperty = std::string; |
| 19 | using DbusPropertyVec = std::vector<std::pair<DbusProperty, IPMIFruData>>; |
| 20 | |
| 21 | using DbusInterface = std::string; |
| 22 | using DbusInterfaceVec = std::vector<std::pair<DbusInterface, DbusPropertyVec>>; |
| 23 | |
| 24 | using FruInstancePath = std::string; |
Ratan Gupta | 0033097 | 2018-01-19 16:23:10 +0530 | [diff] [blame] | 25 | |
| 26 | struct FruInstance |
| 27 | { |
| 28 | uint8_t entityID; |
| 29 | uint8_t entityInstance; |
| 30 | FruInstancePath path; |
| 31 | DbusInterfaceVec interfaces; |
| 32 | }; |
| 33 | |
| 34 | using FruInstanceVec = std::vector<FruInstance>; |
Marri Devender Rao | a62bacc | 2017-06-04 23:40:16 -0500 | [diff] [blame] | 35 | |
| 36 | using FruId = uint32_t; |
| 37 | using FruMap = std::map<FruId, FruInstanceVec>; |
| 38 | |
| 39 | #endif |