1ac19bd68SDeepak Kodihalli #pragma once
2ac19bd68SDeepak Kodihalli 
32abbce76SAndrew Jeffery #include "common/instance_id.hpp"
4d130e1a3SDeepak Kodihalli #include "common/types.hpp"
5d130e1a3SDeepak Kodihalli #include "common/utils.hpp"
63aec997cSPavithra Barithaya #include "libpldmresponder/event_parser.hpp"
73687e2b6SSagar Srinivas #include "libpldmresponder/oem_handler.hpp"
8ac19bd68SDeepak Kodihalli #include "libpldmresponder/pdr_utils.hpp"
974f27c73STom Joseph #include "requester/handler.hpp"
104e69d252SKamalkumar Patel #include "utils.hpp"
11ac19bd68SDeepak Kodihalli 
12c453e164SGeorge Liu #include <libpldm/base.h>
13c453e164SGeorge Liu #include <libpldm/platform.h>
14c453e164SGeorge Liu 
15ac19bd68SDeepak Kodihalli #include <sdeventplus/event.hpp>
16ac19bd68SDeepak Kodihalli #include <sdeventplus/source/event.hpp>
17ac19bd68SDeepak Kodihalli 
187246e0cdSDeepak Kodihalli #include <deque>
19df9a6d34SGeorge Liu #include <filesystem>
20ac19bd68SDeepak Kodihalli #include <map>
21ac19bd68SDeepak Kodihalli #include <memory>
22ac19bd68SDeepak Kodihalli #include <vector>
23ac19bd68SDeepak Kodihalli 
24ac19bd68SDeepak Kodihalli namespace pldm
25ac19bd68SDeepak Kodihalli {
26ac19bd68SDeepak Kodihalli // vector which would hold the PDR record handle data returned by
27ac19bd68SDeepak Kodihalli // pldmPDRRepositoryChgEvent event data
28ac19bd68SDeepak Kodihalli using ChangeEntry = uint32_t;
297246e0cdSDeepak Kodihalli using PDRRecordHandles = std::deque<ChangeEntry>;
30ac19bd68SDeepak Kodihalli 
31ac19bd68SDeepak Kodihalli /** @struct SensorEntry
32ac19bd68SDeepak Kodihalli  *
33ac19bd68SDeepak Kodihalli  *  SensorEntry is a unique key which maps a sensorEventType request in the
34ac19bd68SDeepak Kodihalli  *  PlatformEventMessage command to a host sensor PDR. This struct is a key
35ac19bd68SDeepak Kodihalli  *  in a std::map, so implemented operator==and operator<.
36ac19bd68SDeepak Kodihalli  */
37ac19bd68SDeepak Kodihalli struct SensorEntry
38ac19bd68SDeepak Kodihalli {
39ac19bd68SDeepak Kodihalli     pdr::TerminusID terminusID;
40ac19bd68SDeepak Kodihalli     pdr::SensorID sensorID;
41ac19bd68SDeepak Kodihalli 
operator ==pldm::SensorEntry42ac19bd68SDeepak Kodihalli     bool operator==(const SensorEntry& e) const
43ac19bd68SDeepak Kodihalli     {
44ac19bd68SDeepak Kodihalli         return ((terminusID == e.terminusID) && (sensorID == e.sensorID));
45ac19bd68SDeepak Kodihalli     }
46ac19bd68SDeepak Kodihalli 
operator <pldm::SensorEntry47ac19bd68SDeepak Kodihalli     bool operator<(const SensorEntry& e) const
48ac19bd68SDeepak Kodihalli     {
49ac19bd68SDeepak Kodihalli         return ((terminusID < e.terminusID) ||
50ac19bd68SDeepak Kodihalli                 ((terminusID == e.terminusID) && (sensorID < e.sensorID)));
51ac19bd68SDeepak Kodihalli     }
52ac19bd68SDeepak Kodihalli };
53ac19bd68SDeepak Kodihalli 
54ac19bd68SDeepak Kodihalli using HostStateSensorMap = std::map<SensorEntry, pdr::SensorInfo>;
55868c879aSSampa Misra using PDRList = std::vector<std::vector<uint8_t>>;
56ac19bd68SDeepak Kodihalli 
57ac19bd68SDeepak Kodihalli /** @class HostPDRHandler
58ac19bd68SDeepak Kodihalli  *  @brief This class can fetch and process PDRs from host firmware
59ac19bd68SDeepak Kodihalli  *  @details Provides an API to fetch PDRs from the host firmware. Upon
60ac19bd68SDeepak Kodihalli  *  receiving the PDRs, they are stored into the BMC's primary PDR repo.
61ac19bd68SDeepak Kodihalli  *  Adjustments are made to entity association PDRs received from the host,
62ac19bd68SDeepak Kodihalli  *  because they need to be assimilated into the BMC's entity association
63ac19bd68SDeepak Kodihalli  *  tree. A PLDM event containing the record handles of the updated entity
64ac19bd68SDeepak Kodihalli  *  association PDRs is sent to the host.
65ac19bd68SDeepak Kodihalli  */
66ac19bd68SDeepak Kodihalli class HostPDRHandler
67ac19bd68SDeepak Kodihalli {
68ac19bd68SDeepak Kodihalli   public:
69ac19bd68SDeepak Kodihalli     HostPDRHandler() = delete;
70ac19bd68SDeepak Kodihalli     HostPDRHandler(const HostPDRHandler&) = delete;
71ac19bd68SDeepak Kodihalli     HostPDRHandler(HostPDRHandler&&) = delete;
72ac19bd68SDeepak Kodihalli     HostPDRHandler& operator=(const HostPDRHandler&) = delete;
73ac19bd68SDeepak Kodihalli     HostPDRHandler& operator=(HostPDRHandler&&) = delete;
74ac19bd68SDeepak Kodihalli     ~HostPDRHandler() = default;
75ac19bd68SDeepak Kodihalli 
7660e1fe91SManojkiran Eda     using TerminusInfo =
7760e1fe91SManojkiran Eda         std::tuple<pdr::TerminusID, pdr::EID, pdr::TerminusValidity>;
7860e1fe91SManojkiran Eda     using TLPDRMap = std::map<pdr::TerminusHandle, TerminusInfo>;
79868c879aSSampa Misra 
80ac19bd68SDeepak Kodihalli     /** @brief Constructor
81ac19bd68SDeepak Kodihalli      *  @param[in] mctp_fd - fd of MCTP communications socket
82ac19bd68SDeepak Kodihalli      *  @param[in] mctp_eid - MCTP EID of host firmware
83ac19bd68SDeepak Kodihalli      *  @param[in] event - reference of main event loop of pldmd
84ac19bd68SDeepak Kodihalli      *  @param[in] repo - pointer to BMC's primary PDR repo
853aec997cSPavithra Barithaya      *  @param[in] eventsJsonDir - directory path which has the config JSONs
8674f27c73STom Joseph      *  @param[in] entityTree - Pointer to BMC and Host entity association tree
8774f27c73STom Joseph      *  @param[in] bmcEntityTree - pointer to BMC's entity association tree
88a330b2f0SAndrew Jeffery      *  @param[in] instanceIdDb - reference to an InstanceIdDb object
8974f27c73STom Joseph      *  @param[in] handler - PLDM request handler
90eb43d6c8SKamalkumar Patel      *  @param[in] oemUtilsHandler - pointer oem utils handler
91ac19bd68SDeepak Kodihalli      */
9274f27c73STom Joseph     explicit HostPDRHandler(
9374f27c73STom Joseph         int mctp_fd, uint8_t mctp_eid, sdeventplus::Event& event,
9474f27c73STom Joseph         pldm_pdr* repo, const std::string& eventsJsonsDir,
95ac19bd68SDeepak Kodihalli         pldm_entity_association_tree* entityTree,
965079ac4aSBrad Bishop         pldm_entity_association_tree* bmcEntityTree,
97a330b2f0SAndrew Jeffery         pldm::InstanceIdDb& instanceIdDb,
98a881c170SGeorge Liu         pldm::requester::Handler<pldm::requester::Request>* handler);
99ac19bd68SDeepak Kodihalli 
100ac19bd68SDeepak Kodihalli     /** @brief fetch PDRs from host firmware. See @class.
101ac19bd68SDeepak Kodihalli      *  @param[in] recordHandles - list of record handles pointing to host's
102ac19bd68SDeepak Kodihalli      *             PDRs that need to be fetched.
103ac19bd68SDeepak Kodihalli      */
104ac19bd68SDeepak Kodihalli 
1057246e0cdSDeepak Kodihalli     void fetchPDR(PDRRecordHandles&& recordHandles);
106ac19bd68SDeepak Kodihalli 
107ac19bd68SDeepak Kodihalli     /** @brief Send a PLDM event to host firmware containing a list of record
108ac19bd68SDeepak Kodihalli      *  handles of PDRs that the host firmware has to fetch.
109ac19bd68SDeepak Kodihalli      *  @param[in] pdrTypes - list of PDR types that need to be looked up in the
110ac19bd68SDeepak Kodihalli      *                        BMC repo
111ac19bd68SDeepak Kodihalli      *  @param[in] eventDataFormat - format for PDRRepositoryChgEvent in DSP0248
112ac19bd68SDeepak Kodihalli      */
113ac19bd68SDeepak Kodihalli     void sendPDRRepositoryChgEvent(std::vector<uint8_t>&& pdrTypes,
114ac19bd68SDeepak Kodihalli                                    uint8_t eventDataFormat);
115ac19bd68SDeepak Kodihalli 
116ac19bd68SDeepak Kodihalli     /** @brief Lookup host sensor info corresponding to requested SensorEntry
117ac19bd68SDeepak Kodihalli      *
118ac19bd68SDeepak Kodihalli      *  @param[in] entry - TerminusID and SensorID
119ac19bd68SDeepak Kodihalli      *
1202576aecdSManojkiran Eda      *  @return SensorInfo corresponding to the input parameter SensorEntry
121ac19bd68SDeepak Kodihalli      *          throw std::out_of_range exception if not found
122ac19bd68SDeepak Kodihalli      */
lookupSensorInfo(const SensorEntry & entry) const123ac19bd68SDeepak Kodihalli     const pdr::SensorInfo& lookupSensorInfo(const SensorEntry& entry) const
124ac19bd68SDeepak Kodihalli     {
125ac19bd68SDeepak Kodihalli         return sensorMap.at(entry);
126ac19bd68SDeepak Kodihalli     }
127ac19bd68SDeepak Kodihalli 
1283aec997cSPavithra Barithaya     /** @brief Handles state sensor event
1293aec997cSPavithra Barithaya      *
1303aec997cSPavithra Barithaya      *  @param[in] entry - state sensor entry
1313aec997cSPavithra Barithaya      *  @param[in] state - event state
1323aec997cSPavithra Barithaya      *
1333aec997cSPavithra Barithaya      *  @return PLDM completion code
1343aec997cSPavithra Barithaya      */
1355079ac4aSBrad Bishop     int handleStateSensorEvent(
1365079ac4aSBrad Bishop         const pldm::responder::events::StateSensorEntry& entry,
1373aec997cSPavithra Barithaya         pdr::EventState state);
1383aec997cSPavithra Barithaya 
139868c879aSSampa Misra     /** @brief Parse state sensor PDRs and populate the sensorMap lookup data
140868c879aSSampa Misra      *         structure
141868c879aSSampa Misra      *
142868c879aSSampa Misra      *  @param[in] stateSensorPDRs - host state sensor PDRs
143868c879aSSampa Misra      *
144868c879aSSampa Misra      */
14560e1fe91SManojkiran Eda     void parseStateSensorPDRs(const PDRList& stateSensorPDRs);
146868c879aSSampa Misra 
147c0c79481SSampa Misra     /** @brief this function sends a GetPDR request to Host firmware.
148c0c79481SSampa Misra      *  And processes the PDRs based on type
149c0c79481SSampa Misra      *
150c0c79481SSampa Misra      *  @param[in] - nextRecordHandle - the next record handle to ask for
151c0c79481SSampa Misra      */
152c0c79481SSampa Misra     void getHostPDR(uint32_t nextRecordHandle = 0);
153c0c79481SSampa Misra 
154f9ba8c19SSampa Misra     /** @brief set the Host firmware condition when pldmd starts
1556decfc18Ssampmisr      */
156f9ba8c19SSampa Misra     void setHostFirmwareCondition();
1576decfc18Ssampmisr 
1584f2538a6SPavithra Barithaya     /** @brief set HostSensorStates when pldmd starts or restarts
1594f2538a6SPavithra Barithaya      *  and updates the D-Bus property
1604f2538a6SPavithra Barithaya      *  @param[in] stateSensorPDRs - host state sensor PDRs
1614f2538a6SPavithra Barithaya      */
16260e1fe91SManojkiran Eda     void setHostSensorState(const PDRList& stateSensorPDRs);
1634f2538a6SPavithra Barithaya 
164ae5c97ebSPavithra Barithaya     /** @brief whether we received PLDM_RECORDS_MODIFIED event data operation
165ae5c97ebSPavithra Barithaya      *  from host
166ae5c97ebSPavithra Barithaya      */
167ae5c97ebSPavithra Barithaya     bool isHostPdrModified = false;
168ae5c97ebSPavithra Barithaya 
1696decfc18Ssampmisr     /** @brief check whether Host is running when pldmd starts
1706decfc18Ssampmisr      */
1716decfc18Ssampmisr     bool isHostUp();
1726decfc18Ssampmisr 
173a881c170SGeorge Liu     /* @brief Method to set the oem platform handler in host pdr handler class
174a881c170SGeorge Liu      *
175a881c170SGeorge Liu      * @param[in] handler - oem platform handler
176a881c170SGeorge Liu      */
177a881c170SGeorge Liu     inline void
setOemPlatformHandler(pldm::responder::oem_platform::Handler * handler)178a881c170SGeorge Liu         setOemPlatformHandler(pldm::responder::oem_platform::Handler* handler)
179a881c170SGeorge Liu     {
180a881c170SGeorge Liu         oemPlatformHandler = handler;
181a881c170SGeorge Liu     }
182a881c170SGeorge Liu 
183eb43d6c8SKamalkumar Patel     /* @brief Method to set the oem utils handler in host pdr handler class
184eb43d6c8SKamalkumar Patel      *
185eb43d6c8SKamalkumar Patel      * @param[in] handler - oem utils handler
186eb43d6c8SKamalkumar Patel      */
setOemUtilsHandler(pldm::responder::oem_utils::Handler * handler)187eb43d6c8SKamalkumar Patel     inline void setOemUtilsHandler(pldm::responder::oem_utils::Handler* handler)
188eb43d6c8SKamalkumar Patel     {
189eb43d6c8SKamalkumar Patel         oemUtilsHandler = handler;
190eb43d6c8SKamalkumar Patel     }
191eb43d6c8SKamalkumar Patel 
19260e1fe91SManojkiran Eda     /** @brief map that captures various terminus information **/
19360e1fe91SManojkiran Eda     TLPDRMap tlPDRInfo;
19460e1fe91SManojkiran Eda 
1956decfc18Ssampmisr   private:
1966decfc18Ssampmisr     /** @brief deferred function to fetch PDR from Host, scheduled to work on
1976decfc18Ssampmisr      *  the event loop. The PDR exchg with the host is async.
1986decfc18Ssampmisr      *  @param[in] source - sdeventplus event source
1996decfc18Ssampmisr      */
2006decfc18Ssampmisr     void _fetchPDR(sdeventplus::source::EventBase& source);
2016decfc18Ssampmisr 
202ac19bd68SDeepak Kodihalli     /** @brief Merge host firmware's entity association PDRs into BMC's
203ac19bd68SDeepak Kodihalli      *  @details A merge operation involves adding a pldm_entity under the
204ac19bd68SDeepak Kodihalli      *  appropriate parent, and updating container ids.
205ac19bd68SDeepak Kodihalli      *  @param[in] pdr - entity association pdr
2063687e2b6SSagar Srinivas      *  @param[in] size - size of input PDR record in bytes
2073687e2b6SSagar Srinivas      *  @param[in] record_handle - record handle of the PDR
208ac19bd68SDeepak Kodihalli      */
209*16c2a0a0SPatrick Williams     void mergeEntityAssociations(
210*16c2a0a0SPatrick Williams         const std::vector<uint8_t>& pdr, [[maybe_unused]] const uint32_t& size,
2113687e2b6SSagar Srinivas         [[maybe_unused]] const uint32_t& record_handle);
212ac19bd68SDeepak Kodihalli 
213c0c79481SSampa Misra     /** @brief process the Host's PDR and add to BMC's PDR repo
214c0c79481SSampa Misra      *  @param[in] eid - MCTP id of Host
215c0c79481SSampa Misra      *  @param[in] response - response from Host for GetPDR
216c0c79481SSampa Misra      *  @param[in] respMsgLen - response message length
217c0c79481SSampa Misra      */
218c0c79481SSampa Misra     void processHostPDRs(mctp_eid_t eid, const pldm_msg* response,
219c0c79481SSampa Misra                          size_t respMsgLen);
220c0c79481SSampa Misra 
221c0c79481SSampa Misra     /** @brief send PDR Repo change after merging Host's PDR to BMC PDR repo
222c0c79481SSampa Misra      *  @param[in] source - sdeventplus event source
223c0c79481SSampa Misra      */
224c0c79481SSampa Misra     void _processPDRRepoChgEvent(sdeventplus::source::EventBase& source);
225c0c79481SSampa Misra 
226c0c79481SSampa Misra     /** @brief fetch the next PDR based on the record handle sent by Host
227c0c79481SSampa Misra      *  @param[in] nextRecordHandle - next record handle
228c0c79481SSampa Misra      *  @param[in] source - sdeventplus event source
229c0c79481SSampa Misra      */
230c0c79481SSampa Misra     void _processFetchPDREvent(uint32_t nextRecordHandle,
231c0c79481SSampa Misra                                sdeventplus::source::EventBase& source);
232c0c79481SSampa Misra 
233682ee18cSGeorge Liu     /** @brief Get FRU record table metadata by remote PLDM terminus
234682ee18cSGeorge Liu      *
235682ee18cSGeorge Liu      *  @param[out] uint16_t    - total table records
236682ee18cSGeorge Liu      */
237682ee18cSGeorge Liu     void getFRURecordTableMetadataByRemote(const PDRList& fruRecordSetPDRs);
238682ee18cSGeorge Liu 
239682ee18cSGeorge Liu     /** @brief Set Location Code in the dbus objects
240682ee18cSGeorge Liu      *
241682ee18cSGeorge Liu      *  @param[in] fruRecordSetPDRs - the Fru Record set PDR's
242682ee18cSGeorge Liu      *  @param[in] fruRecordData - the Fru Record Data
243682ee18cSGeorge Liu      */
244682ee18cSGeorge Liu 
245682ee18cSGeorge Liu     void setFRUDataOnDBus(
246682ee18cSGeorge Liu         const PDRList& fruRecordSetPDRs,
247682ee18cSGeorge Liu         const std::vector<responder::pdr_utils::FruRecordDataFormat>&
248682ee18cSGeorge Liu             fruRecordData);
249682ee18cSGeorge Liu 
250682ee18cSGeorge Liu     /** @brief Get FRU record table by remote PLDM terminus
251682ee18cSGeorge Liu      *
252682ee18cSGeorge Liu      *  @param[in] fruRecordSetPDRs  - the Fru Record set PDR's
253682ee18cSGeorge Liu      *  @param[in] totalTableRecords - the Number of total table records
254682ee18cSGeorge Liu      *  @return
255682ee18cSGeorge Liu      */
256682ee18cSGeorge Liu     void getFRURecordTableByRemote(const PDRList& fruRecordSetPDRs,
257682ee18cSGeorge Liu                                    uint16_t totalTableRecords);
258682ee18cSGeorge Liu 
259682ee18cSGeorge Liu     /** @brief Create Dbus objects by remote PLDM entity Fru PDRs
260682ee18cSGeorge Liu      *
261682ee18cSGeorge Liu      *  @param[in] fruRecordSetPDRs - fru record set pdr
262682ee18cSGeorge Liu      *
263682ee18cSGeorge Liu      * @ return
264682ee18cSGeorge Liu      */
265682ee18cSGeorge Liu     void createDbusObjects(const PDRList& fruRecordSetPDRs);
266682ee18cSGeorge Liu 
267682ee18cSGeorge Liu     /** @brief Get FRU Record Set Identifier from FRU Record data Format
268682ee18cSGeorge Liu      *  @param[in] fruRecordSetPDRs - fru record set pdr
269682ee18cSGeorge Liu      *  @param[in] entity           - PLDM entity information
270682ee18cSGeorge Liu      *  @return
271682ee18cSGeorge Liu      */
272682ee18cSGeorge Liu     std::optional<uint16_t> getRSI(const PDRList& fruRecordSetPDRs,
273682ee18cSGeorge Liu                                    const pldm_entity& entity);
274682ee18cSGeorge Liu 
275ac19bd68SDeepak Kodihalli     /** @brief MCTP EID of host firmware */
276ac19bd68SDeepak Kodihalli     uint8_t mctp_eid;
277ac19bd68SDeepak Kodihalli     /** @brief reference of main event loop of pldmd, primarily used to schedule
278ac19bd68SDeepak Kodihalli      *  work.
279ac19bd68SDeepak Kodihalli      */
280ac19bd68SDeepak Kodihalli     sdeventplus::Event& event;
281ac19bd68SDeepak Kodihalli     /** @brief pointer to BMC's primary PDR repo, host PDRs are added here */
282ac19bd68SDeepak Kodihalli     pldm_pdr* repo;
2833aec997cSPavithra Barithaya 
2845079ac4aSBrad Bishop     pldm::responder::events::StateSensorHandler stateSensorHandler;
285c073a20eSSampa Misra     /** @brief Pointer to BMC's and Host's entity association tree */
286ac19bd68SDeepak Kodihalli     pldm_entity_association_tree* entityTree;
287c073a20eSSampa Misra 
288a330b2f0SAndrew Jeffery     /** @brief reference to Instance ID database object, used to obtain PLDM
289a330b2f0SAndrew Jeffery      * instance IDs
290ac19bd68SDeepak Kodihalli      */
291a330b2f0SAndrew Jeffery     pldm::InstanceIdDb& instanceIdDb;
29274f27c73STom Joseph 
29374f27c73STom Joseph     /** @brief PLDM request handler */
294c0c79481SSampa Misra     pldm::requester::Handler<pldm::requester::Request>* handler;
29574f27c73STom Joseph 
296ac19bd68SDeepak Kodihalli     /** @brief sdeventplus event source */
297ac19bd68SDeepak Kodihalli     std::unique_ptr<sdeventplus::source::Defer> pdrFetchEvent;
298c0c79481SSampa Misra     std::unique_ptr<sdeventplus::source::Defer> deferredFetchPDREvent;
299c0c79481SSampa Misra     std::unique_ptr<sdeventplus::source::Defer> deferredPDRRepoChgEvent;
300c0c79481SSampa Misra 
301ac19bd68SDeepak Kodihalli     /** @brief list of PDR record handles pointing to host's PDRs */
302ac19bd68SDeepak Kodihalli     PDRRecordHandles pdrRecordHandles;
303ac19bd68SDeepak Kodihalli     /** @brief maps an entity type to parent pldm_entity from the BMC's entity
304ac19bd68SDeepak Kodihalli      *  association tree
305ac19bd68SDeepak Kodihalli      */
306ae5c97ebSPavithra Barithaya 
307ae5c97ebSPavithra Barithaya     /** @brief list of PDR record handles modified pointing to host PDRs */
308ae5c97ebSPavithra Barithaya     PDRRecordHandles modifiedPDRRecordHandles;
309ae5c97ebSPavithra Barithaya 
310ac19bd68SDeepak Kodihalli     /** @brief D-Bus property changed signal match */
31184b790cbSPatrick Williams     std::unique_ptr<sdbusplus::bus::match_t> hostOffMatch;
312ac19bd68SDeepak Kodihalli 
313ac19bd68SDeepak Kodihalli     /** @brief sensorMap is a lookup data structure that is build from the
314ac19bd68SDeepak Kodihalli      *         hostPDR that speeds up the lookup of <TerminusID, SensorID> in
315ac19bd68SDeepak Kodihalli      *         PlatformEventMessage command request.
316ac19bd68SDeepak Kodihalli      */
317ac19bd68SDeepak Kodihalli     HostStateSensorMap sensorMap;
3186decfc18Ssampmisr 
3196decfc18Ssampmisr     /** @brief whether response received from Host */
3206decfc18Ssampmisr     bool responseReceived;
321acf2c8c3SGeorge Liu 
322acf2c8c3SGeorge Liu     /** @brief variable that captures if the first entity association PDR
323acf2c8c3SGeorge Liu      *         from host is merged into the BMC tree
324acf2c8c3SGeorge Liu      */
325acf2c8c3SGeorge Liu     bool mergedHostParents;
326acf2c8c3SGeorge Liu 
327df9a6d34SGeorge Liu     /** @brief maps an object path to pldm_entity from the BMC's entity
328df9a6d34SGeorge Liu      *         association tree
329df9a6d34SGeorge Liu      */
3307d427f16SKamalkumar Patel     pldm::utils::ObjectPathMaps objPathMap;
331df9a6d34SGeorge Liu 
332df9a6d34SGeorge Liu     /** @brief maps an entity name to map, maps to entity name to pldm_entity
333df9a6d34SGeorge Liu      */
3347d427f16SKamalkumar Patel     pldm::utils::EntityAssociations entityAssociations;
335682ee18cSGeorge Liu 
336682ee18cSGeorge Liu     /** @brief the vector of FRU Record Data Format
337682ee18cSGeorge Liu      */
338682ee18cSGeorge Liu     std::vector<responder::pdr_utils::FruRecordDataFormat> fruRecordData;
339682ee18cSGeorge Liu 
3403687e2b6SSagar Srinivas     /** @OEM platform handler */
341a881c170SGeorge Liu     pldm::responder::oem_platform::Handler* oemPlatformHandler = nullptr;
342516122e0SKamalkumar Patel 
343516122e0SKamalkumar Patel     /** @brief entityID and entity name is only loaded once
344516122e0SKamalkumar Patel      */
3457d427f16SKamalkumar Patel     pldm::utils::EntityMaps entityMaps;
346eb43d6c8SKamalkumar Patel 
347eb43d6c8SKamalkumar Patel     /** @OEM Utils handler */
348eb43d6c8SKamalkumar Patel     pldm::responder::oem_utils::Handler* oemUtilsHandler;
349ac19bd68SDeepak Kodihalli };
350ac19bd68SDeepak Kodihalli 
351ac19bd68SDeepak Kodihalli } // namespace pldm
352