Pavithra Barithaya | 51efaf8 | 2020-04-02 02:42:27 -0500 | [diff] [blame] | 1 | #pragma once |
| 2 | |
Andrew Jeffery | 2abbce7 | 2023-10-18 10:17:35 +1030 | [diff] [blame] | 3 | #include "common/instance_id.hpp" |
Deepak Kodihalli | d130e1a | 2020-06-17 05:55:32 -0500 | [diff] [blame] | 4 | #include "common/types.hpp" |
| 5 | #include "common/utils.hpp" |
Pavithra Barithaya | 3aec997 | 2020-12-14 01:55:44 -0600 | [diff] [blame] | 6 | #include "libpldmresponder/event_parser.hpp" |
Sagar Srinivas | 3687e2b | 2023-04-10 05:08:28 -0500 | [diff] [blame] | 7 | #include "libpldmresponder/oem_handler.hpp" |
Tom Joseph | b426860 | 2020-04-17 17:20:45 +0530 | [diff] [blame] | 8 | #include "libpldmresponder/pdr_utils.hpp" |
Tom Joseph | 74f27c7 | 2021-05-16 07:58:53 -0700 | [diff] [blame] | 9 | #include "requester/handler.hpp" |
Kamalkumar Patel | 4e69d25 | 2024-05-10 08:48:03 -0500 | [diff] [blame^] | 10 | #include "utils.hpp" |
Pavithra Barithaya | 51efaf8 | 2020-04-02 02:42:27 -0500 | [diff] [blame] | 11 | |
George Liu | c453e16 | 2022-12-21 17:16:23 +0800 | [diff] [blame] | 12 | #include <libpldm/base.h> |
| 13 | #include <libpldm/platform.h> |
| 14 | |
Pavithra Barithaya | 51efaf8 | 2020-04-02 02:42:27 -0500 | [diff] [blame] | 15 | #include <sdeventplus/event.hpp> |
Deepak Kodihalli | 8cb6f66 | 2020-04-10 02:55:43 -0500 | [diff] [blame] | 16 | #include <sdeventplus/source/event.hpp> |
Pavithra Barithaya | 51efaf8 | 2020-04-02 02:42:27 -0500 | [diff] [blame] | 17 | |
Deepak Kodihalli | 7246e0c | 2020-07-08 06:40:18 -0500 | [diff] [blame] | 18 | #include <deque> |
George Liu | df9a6d3 | 2020-12-22 16:27:16 +0800 | [diff] [blame] | 19 | #include <filesystem> |
George Liu | 6492f52 | 2020-06-16 10:34:05 +0800 | [diff] [blame] | 20 | #include <map> |
| 21 | #include <memory> |
| 22 | #include <vector> |
Pavithra Barithaya | 51efaf8 | 2020-04-02 02:42:27 -0500 | [diff] [blame] | 23 | |
Pavithra Barithaya | 51efaf8 | 2020-04-02 02:42:27 -0500 | [diff] [blame] | 24 | namespace pldm |
| 25 | { |
Deepak Kodihalli | 87514cc | 2020-04-16 09:08:38 -0500 | [diff] [blame] | 26 | using EntityType = uint16_t; |
Deepak Kodihalli | 8cb6f66 | 2020-04-10 02:55:43 -0500 | [diff] [blame] | 27 | // vector which would hold the PDR record handle data returned by |
| 28 | // pldmPDRRepositoryChgEvent event data |
| 29 | using ChangeEntry = uint32_t; |
Deepak Kodihalli | 7246e0c | 2020-07-08 06:40:18 -0500 | [diff] [blame] | 30 | using PDRRecordHandles = std::deque<ChangeEntry>; |
Deepak Kodihalli | 8cb6f66 | 2020-04-10 02:55:43 -0500 | [diff] [blame] | 31 | |
Tom Joseph | b426860 | 2020-04-17 17:20:45 +0530 | [diff] [blame] | 32 | /** @struct SensorEntry |
| 33 | * |
| 34 | * SensorEntry is a unique key which maps a sensorEventType request in the |
| 35 | * PlatformEventMessage command to a host sensor PDR. This struct is a key |
| 36 | * in a std::map, so implemented operator==and operator<. |
| 37 | */ |
| 38 | struct SensorEntry |
| 39 | { |
| 40 | pdr::TerminusID terminusID; |
| 41 | pdr::SensorID sensorID; |
| 42 | |
| 43 | bool operator==(const SensorEntry& e) const |
| 44 | { |
| 45 | return ((terminusID == e.terminusID) && (sensorID == e.sensorID)); |
| 46 | } |
| 47 | |
| 48 | bool operator<(const SensorEntry& e) const |
| 49 | { |
| 50 | return ((terminusID < e.terminusID) || |
| 51 | ((terminusID == e.terminusID) && (sensorID < e.sensorID))); |
| 52 | } |
| 53 | }; |
| 54 | |
| 55 | using HostStateSensorMap = std::map<SensorEntry, pdr::SensorInfo>; |
Sampa Misra | 868c879 | 2020-05-26 03:12:13 -0500 | [diff] [blame] | 56 | using PDRList = std::vector<std::vector<uint8_t>>; |
Tom Joseph | b426860 | 2020-04-17 17:20:45 +0530 | [diff] [blame] | 57 | |
Pavithra Barithaya | 51efaf8 | 2020-04-02 02:42:27 -0500 | [diff] [blame] | 58 | /** @class HostPDRHandler |
| 59 | * @brief This class can fetch and process PDRs from host firmware |
| 60 | * @details Provides an API to fetch PDRs from the host firmware. Upon |
| 61 | * receiving the PDRs, they are stored into the BMC's primary PDR repo. |
| 62 | * Adjustments are made to entity association PDRs received from the host, |
| 63 | * because they need to be assimilated into the BMC's entity association |
| 64 | * tree. A PLDM event containing the record handles of the updated entity |
| 65 | * association PDRs is sent to the host. |
| 66 | */ |
| 67 | class HostPDRHandler |
| 68 | { |
| 69 | public: |
| 70 | HostPDRHandler() = delete; |
| 71 | HostPDRHandler(const HostPDRHandler&) = delete; |
| 72 | HostPDRHandler(HostPDRHandler&&) = delete; |
| 73 | HostPDRHandler& operator=(const HostPDRHandler&) = delete; |
| 74 | HostPDRHandler& operator=(HostPDRHandler&&) = delete; |
| 75 | ~HostPDRHandler() = default; |
| 76 | |
Manojkiran Eda | 60e1fe9 | 2021-10-08 15:58:16 +0530 | [diff] [blame] | 77 | using TerminusInfo = |
| 78 | std::tuple<pdr::TerminusID, pdr::EID, pdr::TerminusValidity>; |
| 79 | using TLPDRMap = std::map<pdr::TerminusHandle, TerminusInfo>; |
Sampa Misra | 868c879 | 2020-05-26 03:12:13 -0500 | [diff] [blame] | 80 | |
Pavithra Barithaya | 51efaf8 | 2020-04-02 02:42:27 -0500 | [diff] [blame] | 81 | /** @brief Constructor |
| 82 | * @param[in] mctp_fd - fd of MCTP communications socket |
| 83 | * @param[in] mctp_eid - MCTP EID of host firmware |
| 84 | * @param[in] event - reference of main event loop of pldmd |
| 85 | * @param[in] repo - pointer to BMC's primary PDR repo |
Pavithra Barithaya | 3aec997 | 2020-12-14 01:55:44 -0600 | [diff] [blame] | 86 | * @param[in] eventsJsonDir - directory path which has the config JSONs |
Tom Joseph | 74f27c7 | 2021-05-16 07:58:53 -0700 | [diff] [blame] | 87 | * @param[in] entityTree - Pointer to BMC and Host entity association tree |
| 88 | * @param[in] bmcEntityTree - pointer to BMC's entity association tree |
Andrew Jeffery | a330b2f | 2023-05-04 14:55:37 +0930 | [diff] [blame] | 89 | * @param[in] instanceIdDb - reference to an InstanceIdDb object |
Tom Joseph | 74f27c7 | 2021-05-16 07:58:53 -0700 | [diff] [blame] | 90 | * @param[in] handler - PLDM request handler |
Pavithra Barithaya | 51efaf8 | 2020-04-02 02:42:27 -0500 | [diff] [blame] | 91 | */ |
Tom Joseph | 74f27c7 | 2021-05-16 07:58:53 -0700 | [diff] [blame] | 92 | explicit HostPDRHandler( |
| 93 | int mctp_fd, uint8_t mctp_eid, sdeventplus::Event& event, |
| 94 | pldm_pdr* repo, const std::string& eventsJsonsDir, |
| 95 | pldm_entity_association_tree* entityTree, |
Brad Bishop | 5079ac4 | 2021-08-19 18:35:06 -0400 | [diff] [blame] | 96 | pldm_entity_association_tree* bmcEntityTree, |
Andrew Jeffery | a330b2f | 2023-05-04 14:55:37 +0930 | [diff] [blame] | 97 | pldm::InstanceIdDb& instanceIdDb, |
Sagar Srinivas | 3687e2b | 2023-04-10 05:08:28 -0500 | [diff] [blame] | 98 | pldm::requester::Handler<pldm::requester::Request>* handler, |
| 99 | pldm::responder::oem_platform::Handler* oemPlatformHandler); |
Pavithra Barithaya | 51efaf8 | 2020-04-02 02:42:27 -0500 | [diff] [blame] | 100 | |
| 101 | /** @brief fetch PDRs from host firmware. See @class. |
| 102 | * @param[in] recordHandles - list of record handles pointing to host's |
| 103 | * PDRs that need to be fetched. |
| 104 | */ |
Pavithra Barithaya | e8beb89 | 2020-04-14 23:24:25 -0500 | [diff] [blame] | 105 | |
Deepak Kodihalli | 7246e0c | 2020-07-08 06:40:18 -0500 | [diff] [blame] | 106 | void fetchPDR(PDRRecordHandles&& recordHandles); |
Pavithra Barithaya | 51efaf8 | 2020-04-02 02:42:27 -0500 | [diff] [blame] | 107 | |
Pavithra Barithaya | e8beb89 | 2020-04-14 23:24:25 -0500 | [diff] [blame] | 108 | /** @brief Send a PLDM event to host firmware containing a list of record |
| 109 | * handles of PDRs that the host firmware has to fetch. |
| 110 | * @param[in] pdrTypes - list of PDR types that need to be looked up in the |
| 111 | * BMC repo |
| 112 | * @param[in] eventDataFormat - format for PDRRepositoryChgEvent in DSP0248 |
| 113 | */ |
| 114 | void sendPDRRepositoryChgEvent(std::vector<uint8_t>&& pdrTypes, |
| 115 | uint8_t eventDataFormat); |
| 116 | |
Tom Joseph | b426860 | 2020-04-17 17:20:45 +0530 | [diff] [blame] | 117 | /** @brief Lookup host sensor info corresponding to requested SensorEntry |
| 118 | * |
| 119 | * @param[in] entry - TerminusID and SensorID |
| 120 | * |
| 121 | * @return SensorInfo corresponding to the input paramter SensorEntry |
| 122 | * throw std::out_of_range exception if not found |
| 123 | */ |
| 124 | const pdr::SensorInfo& lookupSensorInfo(const SensorEntry& entry) const |
| 125 | { |
| 126 | return sensorMap.at(entry); |
| 127 | } |
| 128 | |
Pavithra Barithaya | 3aec997 | 2020-12-14 01:55:44 -0600 | [diff] [blame] | 129 | /** @brief Handles state sensor event |
| 130 | * |
| 131 | * @param[in] entry - state sensor entry |
| 132 | * @param[in] state - event state |
| 133 | * |
| 134 | * @return PLDM completion code |
| 135 | */ |
Brad Bishop | 5079ac4 | 2021-08-19 18:35:06 -0400 | [diff] [blame] | 136 | int handleStateSensorEvent( |
| 137 | const pldm::responder::events::StateSensorEntry& entry, |
| 138 | pdr::EventState state); |
Pavithra Barithaya | 3aec997 | 2020-12-14 01:55:44 -0600 | [diff] [blame] | 139 | |
Sampa Misra | 868c879 | 2020-05-26 03:12:13 -0500 | [diff] [blame] | 140 | /** @brief Parse state sensor PDRs and populate the sensorMap lookup data |
| 141 | * structure |
| 142 | * |
| 143 | * @param[in] stateSensorPDRs - host state sensor PDRs |
Sampa Misra | 868c879 | 2020-05-26 03:12:13 -0500 | [diff] [blame] | 144 | * |
| 145 | */ |
Manojkiran Eda | 60e1fe9 | 2021-10-08 15:58:16 +0530 | [diff] [blame] | 146 | void parseStateSensorPDRs(const PDRList& stateSensorPDRs); |
Sampa Misra | 868c879 | 2020-05-26 03:12:13 -0500 | [diff] [blame] | 147 | |
Sampa Misra | c0c7948 | 2021-06-02 08:01:54 -0500 | [diff] [blame] | 148 | /** @brief this function sends a GetPDR request to Host firmware. |
| 149 | * And processes the PDRs based on type |
| 150 | * |
| 151 | * @param[in] - nextRecordHandle - the next record handle to ask for |
| 152 | */ |
| 153 | void getHostPDR(uint32_t nextRecordHandle = 0); |
| 154 | |
Sampa Misra | f9ba8c1 | 2021-08-06 00:33:47 -0500 | [diff] [blame] | 155 | /** @brief set the Host firmware condition when pldmd starts |
sampmisr | 6decfc1 | 2021-03-02 11:07:36 +0530 | [diff] [blame] | 156 | */ |
Sampa Misra | f9ba8c1 | 2021-08-06 00:33:47 -0500 | [diff] [blame] | 157 | void setHostFirmwareCondition(); |
sampmisr | 6decfc1 | 2021-03-02 11:07:36 +0530 | [diff] [blame] | 158 | |
Pavithra Barithaya | 4f2538a | 2021-03-05 07:32:15 -0600 | [diff] [blame] | 159 | /** @brief set HostSensorStates when pldmd starts or restarts |
| 160 | * and updates the D-Bus property |
| 161 | * @param[in] stateSensorPDRs - host state sensor PDRs |
Pavithra Barithaya | 4f2538a | 2021-03-05 07:32:15 -0600 | [diff] [blame] | 162 | */ |
Manojkiran Eda | 60e1fe9 | 2021-10-08 15:58:16 +0530 | [diff] [blame] | 163 | void setHostSensorState(const PDRList& stateSensorPDRs); |
Pavithra Barithaya | 4f2538a | 2021-03-05 07:32:15 -0600 | [diff] [blame] | 164 | |
Pavithra Barithaya | ae5c97e | 2022-08-29 02:57:59 -0500 | [diff] [blame] | 165 | /** @brief whether we received PLDM_RECORDS_MODIFIED event data operation |
| 166 | * from host |
| 167 | */ |
| 168 | bool isHostPdrModified = false; |
| 169 | |
sampmisr | 6decfc1 | 2021-03-02 11:07:36 +0530 | [diff] [blame] | 170 | /** @brief check whether Host is running when pldmd starts |
| 171 | */ |
| 172 | bool isHostUp(); |
| 173 | |
Manojkiran Eda | 60e1fe9 | 2021-10-08 15:58:16 +0530 | [diff] [blame] | 174 | /** @brief map that captures various terminus information **/ |
| 175 | TLPDRMap tlPDRInfo; |
| 176 | |
sampmisr | 6decfc1 | 2021-03-02 11:07:36 +0530 | [diff] [blame] | 177 | private: |
| 178 | /** @brief deferred function to fetch PDR from Host, scheduled to work on |
| 179 | * the event loop. The PDR exchg with the host is async. |
| 180 | * @param[in] source - sdeventplus event source |
| 181 | */ |
| 182 | void _fetchPDR(sdeventplus::source::EventBase& source); |
| 183 | |
Deepak Kodihalli | 87514cc | 2020-04-16 09:08:38 -0500 | [diff] [blame] | 184 | /** @brief Merge host firmware's entity association PDRs into BMC's |
| 185 | * @details A merge operation involves adding a pldm_entity under the |
| 186 | * appropriate parent, and updating container ids. |
| 187 | * @param[in] pdr - entity association pdr |
Sagar Srinivas | 3687e2b | 2023-04-10 05:08:28 -0500 | [diff] [blame] | 188 | * @param[in] size - size of input PDR record in bytes |
| 189 | * @param[in] record_handle - record handle of the PDR |
Deepak Kodihalli | 87514cc | 2020-04-16 09:08:38 -0500 | [diff] [blame] | 190 | */ |
Sagar Srinivas | 3687e2b | 2023-04-10 05:08:28 -0500 | [diff] [blame] | 191 | void |
| 192 | mergeEntityAssociations(const std::vector<uint8_t>& pdr, |
| 193 | [[maybe_unused]] const uint32_t& size, |
| 194 | [[maybe_unused]] const uint32_t& record_handle); |
Deepak Kodihalli | 87514cc | 2020-04-16 09:08:38 -0500 | [diff] [blame] | 195 | |
Sampa Misra | c0c7948 | 2021-06-02 08:01:54 -0500 | [diff] [blame] | 196 | /** @brief process the Host's PDR and add to BMC's PDR repo |
| 197 | * @param[in] eid - MCTP id of Host |
| 198 | * @param[in] response - response from Host for GetPDR |
| 199 | * @param[in] respMsgLen - response message length |
| 200 | */ |
| 201 | void processHostPDRs(mctp_eid_t eid, const pldm_msg* response, |
| 202 | size_t respMsgLen); |
| 203 | |
| 204 | /** @brief send PDR Repo change after merging Host's PDR to BMC PDR repo |
| 205 | * @param[in] source - sdeventplus event source |
| 206 | */ |
| 207 | void _processPDRRepoChgEvent(sdeventplus::source::EventBase& source); |
| 208 | |
| 209 | /** @brief fetch the next PDR based on the record handle sent by Host |
| 210 | * @param[in] nextRecordHandle - next record handle |
| 211 | * @param[in] source - sdeventplus event source |
| 212 | */ |
| 213 | void _processFetchPDREvent(uint32_t nextRecordHandle, |
| 214 | sdeventplus::source::EventBase& source); |
| 215 | |
George Liu | 682ee18 | 2020-12-25 15:24:33 +0800 | [diff] [blame] | 216 | /** @brief Get FRU record table metadata by remote PLDM terminus |
| 217 | * |
| 218 | * @param[out] uint16_t - total table records |
| 219 | */ |
| 220 | void getFRURecordTableMetadataByRemote(const PDRList& fruRecordSetPDRs); |
| 221 | |
| 222 | /** @brief Set Location Code in the dbus objects |
| 223 | * |
| 224 | * @param[in] fruRecordSetPDRs - the Fru Record set PDR's |
| 225 | * @param[in] fruRecordData - the Fru Record Data |
| 226 | */ |
| 227 | |
| 228 | void setFRUDataOnDBus( |
| 229 | const PDRList& fruRecordSetPDRs, |
| 230 | const std::vector<responder::pdr_utils::FruRecordDataFormat>& |
| 231 | fruRecordData); |
| 232 | |
| 233 | /** @brief Get FRU record table by remote PLDM terminus |
| 234 | * |
| 235 | * @param[in] fruRecordSetPDRs - the Fru Record set PDR's |
| 236 | * @param[in] totalTableRecords - the Number of total table records |
| 237 | * @return |
| 238 | */ |
| 239 | void getFRURecordTableByRemote(const PDRList& fruRecordSetPDRs, |
| 240 | uint16_t totalTableRecords); |
| 241 | |
| 242 | /** @brief Create Dbus objects by remote PLDM entity Fru PDRs |
| 243 | * |
| 244 | * @param[in] fruRecordSetPDRs - fru record set pdr |
| 245 | * |
| 246 | * @ return |
| 247 | */ |
| 248 | void createDbusObjects(const PDRList& fruRecordSetPDRs); |
| 249 | |
| 250 | /** @brief Get FRU Record Set Identifier from FRU Record data Format |
| 251 | * @param[in] fruRecordSetPDRs - fru record set pdr |
| 252 | * @param[in] entity - PLDM entity information |
| 253 | * @return |
| 254 | */ |
| 255 | std::optional<uint16_t> getRSI(const PDRList& fruRecordSetPDRs, |
| 256 | const pldm_entity& entity); |
| 257 | |
Pavithra Barithaya | 51efaf8 | 2020-04-02 02:42:27 -0500 | [diff] [blame] | 258 | /** @brief fd of MCTP communications socket */ |
| 259 | int mctp_fd; |
| 260 | /** @brief MCTP EID of host firmware */ |
| 261 | uint8_t mctp_eid; |
| 262 | /** @brief reference of main event loop of pldmd, primarily used to schedule |
| 263 | * work. |
| 264 | */ |
| 265 | sdeventplus::Event& event; |
| 266 | /** @brief pointer to BMC's primary PDR repo, host PDRs are added here */ |
| 267 | pldm_pdr* repo; |
Pavithra Barithaya | 3aec997 | 2020-12-14 01:55:44 -0600 | [diff] [blame] | 268 | |
Brad Bishop | 5079ac4 | 2021-08-19 18:35:06 -0400 | [diff] [blame] | 269 | pldm::responder::events::StateSensorHandler stateSensorHandler; |
Sampa Misra | c073a20 | 2021-05-08 10:56:05 -0500 | [diff] [blame] | 270 | /** @brief Pointer to BMC's and Host's entity association tree */ |
Deepak Kodihalli | 87514cc | 2020-04-16 09:08:38 -0500 | [diff] [blame] | 271 | pldm_entity_association_tree* entityTree; |
Sampa Misra | c073a20 | 2021-05-08 10:56:05 -0500 | [diff] [blame] | 272 | |
| 273 | /** @brief Pointer to BMC's entity association tree */ |
| 274 | pldm_entity_association_tree* bmcEntityTree; |
| 275 | |
Andrew Jeffery | a330b2f | 2023-05-04 14:55:37 +0930 | [diff] [blame] | 276 | /** @brief reference to Instance ID database object, used to obtain PLDM |
| 277 | * instance IDs |
Pavithra Barithaya | 51efaf8 | 2020-04-02 02:42:27 -0500 | [diff] [blame] | 278 | */ |
Andrew Jeffery | a330b2f | 2023-05-04 14:55:37 +0930 | [diff] [blame] | 279 | pldm::InstanceIdDb& instanceIdDb; |
Tom Joseph | 74f27c7 | 2021-05-16 07:58:53 -0700 | [diff] [blame] | 280 | |
| 281 | /** @brief PLDM request handler */ |
Sampa Misra | c0c7948 | 2021-06-02 08:01:54 -0500 | [diff] [blame] | 282 | pldm::requester::Handler<pldm::requester::Request>* handler; |
Tom Joseph | 74f27c7 | 2021-05-16 07:58:53 -0700 | [diff] [blame] | 283 | |
Deepak Kodihalli | 8cb6f66 | 2020-04-10 02:55:43 -0500 | [diff] [blame] | 284 | /** @brief sdeventplus event source */ |
| 285 | std::unique_ptr<sdeventplus::source::Defer> pdrFetchEvent; |
Sampa Misra | c0c7948 | 2021-06-02 08:01:54 -0500 | [diff] [blame] | 286 | std::unique_ptr<sdeventplus::source::Defer> deferredFetchPDREvent; |
| 287 | std::unique_ptr<sdeventplus::source::Defer> deferredPDRRepoChgEvent; |
| 288 | |
Deepak Kodihalli | 8cb6f66 | 2020-04-10 02:55:43 -0500 | [diff] [blame] | 289 | /** @brief list of PDR record handles pointing to host's PDRs */ |
| 290 | PDRRecordHandles pdrRecordHandles; |
Deepak Kodihalli | 87514cc | 2020-04-16 09:08:38 -0500 | [diff] [blame] | 291 | /** @brief maps an entity type to parent pldm_entity from the BMC's entity |
| 292 | * association tree |
| 293 | */ |
Pavithra Barithaya | ae5c97e | 2022-08-29 02:57:59 -0500 | [diff] [blame] | 294 | |
| 295 | /** @brief list of PDR record handles modified pointing to host PDRs */ |
| 296 | PDRRecordHandles modifiedPDRRecordHandles; |
| 297 | |
Deepak Kodihalli | 6b1d1ca | 2020-04-27 07:24:51 -0500 | [diff] [blame] | 298 | /** @brief D-Bus property changed signal match */ |
Patrick Williams | 84b790c | 2022-07-22 19:26:56 -0500 | [diff] [blame] | 299 | std::unique_ptr<sdbusplus::bus::match_t> hostOffMatch; |
Tom Joseph | b426860 | 2020-04-17 17:20:45 +0530 | [diff] [blame] | 300 | |
| 301 | /** @brief sensorMap is a lookup data structure that is build from the |
| 302 | * hostPDR that speeds up the lookup of <TerminusID, SensorID> in |
| 303 | * PlatformEventMessage command request. |
| 304 | */ |
| 305 | HostStateSensorMap sensorMap; |
sampmisr | 6decfc1 | 2021-03-02 11:07:36 +0530 | [diff] [blame] | 306 | |
| 307 | /** @brief whether response received from Host */ |
| 308 | bool responseReceived; |
George Liu | acf2c8c | 2021-05-10 14:08:52 +0800 | [diff] [blame] | 309 | |
| 310 | /** @brief variable that captures if the first entity association PDR |
| 311 | * from host is merged into the BMC tree |
| 312 | */ |
| 313 | bool mergedHostParents; |
| 314 | |
George Liu | df9a6d3 | 2020-12-22 16:27:16 +0800 | [diff] [blame] | 315 | /** @brief maps an object path to pldm_entity from the BMC's entity |
| 316 | * association tree |
| 317 | */ |
Kamalkumar Patel | 4e69d25 | 2024-05-10 08:48:03 -0500 | [diff] [blame^] | 318 | ObjectPathMaps objPathMap; |
George Liu | df9a6d3 | 2020-12-22 16:27:16 +0800 | [diff] [blame] | 319 | |
| 320 | /** @brief maps an entity name to map, maps to entity name to pldm_entity |
| 321 | */ |
Kamalkumar Patel | 4e69d25 | 2024-05-10 08:48:03 -0500 | [diff] [blame^] | 322 | EntityAssociations entityAssociations; |
George Liu | 682ee18 | 2020-12-25 15:24:33 +0800 | [diff] [blame] | 323 | |
| 324 | /** @brief the vector of FRU Record Data Format |
| 325 | */ |
| 326 | std::vector<responder::pdr_utils::FruRecordDataFormat> fruRecordData; |
| 327 | |
Sagar Srinivas | 3687e2b | 2023-04-10 05:08:28 -0500 | [diff] [blame] | 328 | /** @OEM platform handler */ |
| 329 | pldm::responder::oem_platform::Handler* oemPlatformHandler; |
Pavithra Barithaya | 51efaf8 | 2020-04-02 02:42:27 -0500 | [diff] [blame] | 330 | }; |
| 331 | |
| 332 | } // namespace pldm |