blob: 6d6fd95c4b2a60b47a650c35961aa04de71b5034 [file] [log] [blame]
Deepak Kodihalli557dfb02019-05-12 13:11:17 +05301#pragma once
2
Sampa Misraa2fa0702019-05-31 01:28:55 -05003#include "config.h"
4
George Liu6492f522020-06-16 10:34:05 +08005#include "libpldm/platform.h"
6#include "libpldm/states.h"
7
Deepak Kodihallid130e1a2020-06-17 05:55:32 -05008#include "common/utils.hpp"
TOM JOSEPHd4d97a52020-03-23 14:36:34 +05309#include "event_parser.hpp"
Tom Joseph33e9c7e2020-06-11 22:09:52 +053010#include "fru.hpp"
Deepak Kodihalliac19bd62020-06-16 08:25:23 -050011#include "host-bmc/host_pdr_handler.hpp"
Sampa Misraa2fa0702019-05-31 01:28:55 -050012#include "libpldmresponder/pdr.hpp"
George Liue53193f2020-02-24 09:23:26 +080013#include "libpldmresponder/pdr_utils.hpp"
Deepak Kodihalli1521f6d2020-06-16 08:51:02 -050014#include "pldmd/handler.hpp"
Sampa Misraa2fa0702019-05-31 01:28:55 -050015
Deepak Kodihalli557dfb02019-05-12 13:11:17 +053016#include <stdint.h>
17
Sampa Misraa2fa0702019-05-31 01:28:55 -050018#include <map>
Deepak Kodihalli557dfb02019-05-12 13:11:17 +053019
Deepak Kodihalli557dfb02019-05-12 13:11:17 +053020namespace pldm
21{
Deepak Kodihalli557dfb02019-05-12 13:11:17 +053022namespace responder
23{
Sampa Misraa2fa0702019-05-31 01:28:55 -050024namespace platform
25{
26
George Liu1ec85d42020-02-12 16:05:32 +080027using namespace pldm::utils;
28using namespace pldm::responder::pdr_utils;
29
George Liua2870722020-02-11 11:09:30 +080030using generatePDR =
George Liu36e81352020-07-01 14:40:30 +080031 std::function<void(const pldm::utils::DBusHandler& dBusIntf,
32 const Json& json, pdr_utils::RepoInterface& repo)>;
George Liua2870722020-02-11 11:09:30 +080033
George Liu1ec85d42020-02-12 16:05:32 +080034using EffecterId = uint16_t;
George Liua2870722020-02-11 11:09:30 +080035using DbusObjMaps =
36 std::map<EffecterId,
37 std::tuple<pdr_utils::DbusMappings, pdr_utils::DbusValMaps>>;
Tom Joseph56e45c52020-03-16 10:01:45 +053038using DbusPath = std::string;
39using EffecterObjs = std::vector<DbusPath>;
40using EventType = uint8_t;
41using EventHandler = std::function<int(
42 const pldm_msg* request, size_t payloadLength, uint8_t formatVersion,
43 uint8_t tid, size_t eventDataOffset)>;
44using EventHandlers = std::vector<EventHandler>;
45using EventMap = std::map<EventType, EventHandlers>;
Deepak Kodihallic682fe22020-03-04 00:42:54 -060046
Zahed Hossain75330f32020-03-24 02:15:03 -050047// EventEntry = <uint8_t> - EventState <uint8_t> - SensorOffset <uint16_t> -
48// SensorID
49using EventEntry = uint32_t;
50struct DBusInfo
51{
52 pldm::utils::DBusMapping dBusValues;
53 pldm::utils::PropertyValue dBusPropertyValue;
54};
55
Deepak Kodihallibc669f12019-11-28 08:52:07 -060056class Handler : public CmdHandler
Sampa Misraa2fa0702019-05-31 01:28:55 -050057{
Deepak Kodihallibc669f12019-11-28 08:52:07 -060058 public:
Deepak Kodihallib5c227e2020-07-13 06:58:34 -050059 Handler(const pldm::utils::DBusHandler* dBusIntf,
George Liu36e81352020-07-01 14:40:30 +080060 const std::string& pdrJsonsDir, const std::string& eventsJsonsDir,
TOM JOSEPHd4d97a52020-03-23 14:36:34 +053061 pldm_pdr* repo, HostPDRHandler* hostPDRHandler,
Deepak Kodihallib5c227e2020-07-13 06:58:34 -050062 fru::Handler* fruHandler, bool buildPDRLazily = false,
Tom Joseph56e45c52020-03-16 10:01:45 +053063 const std::optional<EventMap>& addOnHandlersMap = std::nullopt) :
Pavithra Barithaya51efaf82020-04-02 02:42:27 -050064 pdrRepo(repo),
Tom Joseph33e9c7e2020-06-11 22:09:52 +053065 hostPDRHandler(hostPDRHandler), stateSensorHandler(eventsJsonsDir),
Deepak Kodihallib5c227e2020-07-13 06:58:34 -050066 fruHandler(fruHandler), dBusIntf(dBusIntf), pdrJsonsDir(pdrJsonsDir),
67 pdrCreated(false)
Sampa Misraa2fa0702019-05-31 01:28:55 -050068 {
Deepak Kodihallib5c227e2020-07-13 06:58:34 -050069 if (!buildPDRLazily)
70 {
Sampa Misra12afe112020-05-25 11:40:44 -050071 generateTerminusLocatorPDR(pdrRepo);
Deepak Kodihallib5c227e2020-07-13 06:58:34 -050072 generate(*dBusIntf, pdrJsonsDir, pdrRepo);
73 pdrCreated = true;
74 }
Deepak Kodihallic682fe22020-03-04 00:42:54 -060075
Deepak Kodihallibc669f12019-11-28 08:52:07 -060076 handlers.emplace(PLDM_GET_PDR,
77 [this](const pldm_msg* request, size_t payloadLength) {
78 return this->getPDR(request, payloadLength);
79 });
George Liueccb0c52020-01-14 11:09:56 +080080 handlers.emplace(PLDM_SET_NUMERIC_EFFECTER_VALUE,
81 [this](const pldm_msg* request, size_t payloadLength) {
82 return this->setNumericEffecterValue(
83 request, payloadLength);
84 });
Deepak Kodihallibc669f12019-11-28 08:52:07 -060085 handlers.emplace(PLDM_SET_STATE_EFFECTER_STATES,
86 [this](const pldm_msg* request, size_t payloadLength) {
87 return this->setStateEffecterStates(request,
88 payloadLength);
89 });
Tom Joseph56e45c52020-03-16 10:01:45 +053090 handlers.emplace(PLDM_PLATFORM_EVENT_MESSAGE,
91 [this](const pldm_msg* request, size_t payloadLength) {
92 return this->platformEventMessage(request,
93 payloadLength);
94 });
George Liu362c18d2020-05-14 09:46:36 +080095 handlers.emplace(PLDM_GET_STATE_SENSOR_READINGS,
96 [this](const pldm_msg* request, size_t payloadLength) {
97 return this->getStateSensorReadings(request,
98 payloadLength);
99 });
Tom Joseph56e45c52020-03-16 10:01:45 +0530100
101 // Default handler for PLDM Events
102 eventHandlers[PLDM_SENSOR_EVENT].emplace_back(
103 [this](const pldm_msg* request, size_t payloadLength,
104 uint8_t formatVersion, uint8_t tid, size_t eventDataOffset) {
105 return this->sensorEvent(request, payloadLength, formatVersion,
106 tid, eventDataOffset);
107 });
Deepak Kodihalli8cb6f662020-04-10 02:55:43 -0500108 eventHandlers[PLDM_PDR_REPOSITORY_CHG_EVENT].emplace_back(
109 [this](const pldm_msg* request, size_t payloadLength,
110 uint8_t formatVersion, uint8_t tid, size_t eventDataOffset) {
111 return this->pldmPDRRepositoryChgEvent(request, payloadLength,
112 formatVersion, tid,
113 eventDataOffset);
114 });
Tom Joseph56e45c52020-03-16 10:01:45 +0530115
116 // Additional OEM event handlers for PLDM events, append it to the
117 // standard handlers
118 if (addOnHandlersMap)
119 {
120 auto addOnHandlers = addOnHandlersMap.value();
121 for (EventMap::iterator iter = addOnHandlers.begin();
122 iter != addOnHandlers.end(); ++iter)
123 {
124 auto search = eventHandlers.find(iter->first);
125 if (search != eventHandlers.end())
126 {
127 search->second.insert(std::end(search->second),
128 std::begin(iter->second),
129 std::end(iter->second));
130 }
131 else
132 {
133 eventHandlers.emplace(iter->first, iter->second);
134 }
135 }
136 }
Sampa Misraa2fa0702019-05-31 01:28:55 -0500137 }
138
George Liu1ec85d42020-02-12 16:05:32 +0800139 pdr_utils::Repo& getRepo()
Deepak Kodihallic682fe22020-03-04 00:42:54 -0600140 {
George Liu1ec85d42020-02-12 16:05:32 +0800141 return this->pdrRepo;
Deepak Kodihallic682fe22020-03-04 00:42:54 -0600142 }
143
George Liu1ec85d42020-02-12 16:05:32 +0800144 /** @brief Add D-Bus mapping and value mapping(stateId to D-Bus) for the
George Liuadbe1722020-05-09 19:20:19 +0800145 * Id. If the same id is added, the previous dbusObjs will
George Liu1ec85d42020-02-12 16:05:32 +0800146 * be "over-written".
147 *
George Liuadbe1722020-05-09 19:20:19 +0800148 * @param[in] Id - effecter/sensor id
George Liu1ec85d42020-02-12 16:05:32 +0800149 * @param[in] dbusObj - list of D-Bus object structure and list of D-Bus
150 * property value to attribute value
George Liuadbe1722020-05-09 19:20:19 +0800151 * @param[in] typeId - the type id of enum
George Liu1ec85d42020-02-12 16:05:32 +0800152 */
George Liua2870722020-02-11 11:09:30 +0800153 void addDbusObjMaps(
George Liuadbe1722020-05-09 19:20:19 +0800154 uint16_t id,
155 std::tuple<pdr_utils::DbusMappings, pdr_utils::DbusValMaps> dbusObj,
156 TypeId typeId = TypeId::PLDM_EFFECTER_ID);
George Liu1ec85d42020-02-12 16:05:32 +0800157
George Liuadbe1722020-05-09 19:20:19 +0800158 /** @brief Retrieve an id -> D-Bus objects mapping
George Liu1ec85d42020-02-12 16:05:32 +0800159 *
George Liuadbe1722020-05-09 19:20:19 +0800160 * @param[in] Id - id
161 * @param[in] typeId - the type id of enum
George Liu1ec85d42020-02-12 16:05:32 +0800162 *
George Liua2870722020-02-11 11:09:30 +0800163 * @return std::tuple<pdr_utils::DbusMappings, pdr_utils::DbusValMaps> -
164 * list of D-Bus object structure and list of D-Bus property value
165 * to attribute value
George Liu1ec85d42020-02-12 16:05:32 +0800166 */
George Liua2870722020-02-11 11:09:30 +0800167 const std::tuple<pdr_utils::DbusMappings, pdr_utils::DbusValMaps>&
George Liuadbe1722020-05-09 19:20:19 +0800168 getDbusObjMaps(uint16_t id,
169 TypeId typeId = TypeId::PLDM_EFFECTER_ID) const;
Deepak Kodihallic682fe22020-03-04 00:42:54 -0600170
171 uint16_t getNextEffecterId()
172 {
173 return ++nextEffecterId;
174 }
175
George Liuadbe1722020-05-09 19:20:19 +0800176 uint16_t getNextSensorId()
177 {
178 return ++nextSensorId;
179 }
180
Deepak Kodihallic682fe22020-03-04 00:42:54 -0600181 /** @brief Parse PDR JSONs and build PDR repository
182 *
George Liu36e81352020-07-01 14:40:30 +0800183 * @param[in] dBusIntf - The interface object
Deepak Kodihallic682fe22020-03-04 00:42:54 -0600184 * @param[in] dir - directory housing platform specific PDR JSON files
185 * @param[in] repo - instance of concrete implementation of Repo
186 */
George Liu36e81352020-07-01 14:40:30 +0800187 void generate(const pldm::utils::DBusHandler& dBusIntf,
188 const std::string& dir, Repo& repo);
Deepak Kodihallic682fe22020-03-04 00:42:54 -0600189
190 /** @brief Parse PDR JSONs and build state effecter PDR repository
191 *
192 * @param[in] json - platform specific PDR JSON files
193 * @param[in] repo - instance of state effecter implementation of Repo
194 */
195 void generateStateEffecterRepo(const Json& json, Repo& repo);
196
Tom Joseph56e45c52020-03-16 10:01:45 +0530197 /** @brief map of PLDM event type to EventHandlers
198 *
199 */
200 EventMap eventHandlers;
201
Deepak Kodihallibc669f12019-11-28 08:52:07 -0600202 /** @brief Handler for GetPDR
203 *
204 * @param[in] request - Request message payload
205 * @param[in] payloadLength - Request payload length
206 * @param[out] Response - Response message written here
207 */
208 Response getPDR(const pldm_msg* request, size_t payloadLength);
Sampa Misraa2fa0702019-05-31 01:28:55 -0500209
George Liueccb0c52020-01-14 11:09:56 +0800210 /** @brief Handler for setNumericEffecterValue
211 *
212 * @param[in] request - Request message
213 * @param[in] payloadLength - Request payload length
214 * @return Response - PLDM Response message
215 */
216 Response setNumericEffecterValue(const pldm_msg* request,
217 size_t payloadLength);
218
George Liu362c18d2020-05-14 09:46:36 +0800219 /** @brief Handler for getStateSensorReadings
220 *
221 * @param[in] request - Request message
222 * @param[in] payloadLength - Request payload length
223 * @return Response - PLDM Response message
224 */
225 Response getStateSensorReadings(const pldm_msg* request,
226 size_t payloadLength);
227
Deepak Kodihallibc669f12019-11-28 08:52:07 -0600228 /** @brief Handler for setStateEffecterStates
229 *
230 * @param[in] request - Request message
231 * @param[in] payloadLength - Request payload length
232 * @return Response - PLDM Response message
233 */
234 Response setStateEffecterStates(const pldm_msg* request,
235 size_t payloadLength);
236
Tom Joseph56e45c52020-03-16 10:01:45 +0530237 /** @brief Handler for PlatformEventMessage
238 *
239 * @param[in] request - Request message
240 * @param[in] payloadLength - Request payload length
241 * @return Response - PLDM Response message
242 */
243 Response platformEventMessage(const pldm_msg* request,
244 size_t payloadLength);
245
246 /** @brief Handler for event class Sensor event
247 *
248 * @param[in] request - Request message
249 * @param[in] payloadLength - Request payload length
250 * @param[in] formatVersion - Version of the event format
251 * @param[in] tid - Terminus ID of the event's originator
252 * @param[in] eventDataOffset - Offset of the event data in the request
253 * message
254 * @return PLDM completion code
255 */
256 int sensorEvent(const pldm_msg* request, size_t payloadLength,
257 uint8_t formatVersion, uint8_t tid, size_t eventDataOffset);
258
Deepak Kodihalli8cb6f662020-04-10 02:55:43 -0500259 /** @brief Handler for pldmPDRRepositoryChgEvent
260 *
261 * @param[in] request - Request message
262 * @param[in] payloadLength - Request payload length
263 * @param[in] formatVersion - Version of the event format
264 * @param[in] tid - Terminus ID of the event's originator
265 * @param[in] eventDataOffset - Offset of the event data in the request
266 * message
267 * @return PLDM completion code
268 */
269 int pldmPDRRepositoryChgEvent(const pldm_msg* request, size_t payloadLength,
270 uint8_t formatVersion, uint8_t tid,
271 size_t eventDataOffset);
272
273 /** @brief Handler for extracting the PDR handles from changeEntries
274 *
275 * @param[in] changeEntryData - ChangeEntry data from changeRecord
276 * @param[in] changeEntryDataSize - total size of changeEntryData
277 * @param[in] numberOfChangeEntries - total number of changeEntries to
278 * extract
279 * @param[out] pdrRecordHandles - std::vector where the extracted PDR
280 * handles are placed
281 * @return PLDM completion code
282 */
283 int getPDRRecordHandles(const ChangeEntry* changeEntryData,
284 size_t changeEntryDataSize,
285 size_t numberOfChangeEntries,
286 PDRRecordHandles& pdrRecordHandles);
287
Zahed Hossain75330f32020-03-24 02:15:03 -0500288 /** @brief Handler for setting Sensor event data
289 *
290 * @param[in] sensorId - sensorID value of the sensor
291 * @param[in] sensorOffset - Identifies which state sensor within a
292 * composite state sensor the event is being returned for
293 * @param[in] eventState - The event state value from the state change that
294 * triggered the event message
295 * @return PLDM completion code
296 */
297 int setSensorEventData(uint16_t sensorId, uint8_t sensorOffset,
298 uint8_t eventState);
299
Deepak Kodihallibc669f12019-11-28 08:52:07 -0600300 /** @brief Function to set the effecter requested by pldm requester
301 * @param[in] dBusIntf - The interface object
302 * @param[in] effecterId - Effecter ID sent by the requester to act on
303 * @param[in] stateField - The state field data for each of the states,
304 * equal to composite effecter count in number
305 * @return - Success or failure in setting the states. Returns failure in
306 * terms of PLDM completion codes if atleast one state fails to be set
307 */
308 template <class DBusInterface>
309 int setStateEffecterStatesHandler(
Deepak Kodihallic682fe22020-03-04 00:42:54 -0600310 const DBusInterface& dBusIntf, uint16_t effecterId,
Deepak Kodihallibc669f12019-11-28 08:52:07 -0600311 const std::vector<set_effecter_state_field>& stateField)
Sampa Misraa2fa0702019-05-31 01:28:55 -0500312 {
George Liue53193f2020-02-24 09:23:26 +0800313 using namespace pldm::responder::pdr;
George Liu1e44c732020-02-28 20:20:06 +0800314 using namespace pldm::utils;
Deepak Kodihallibc669f12019-11-28 08:52:07 -0600315 using StateSetNum = uint8_t;
Deepak Kodihallibc669f12019-11-28 08:52:07 -0600316
317 state_effecter_possible_states* states = nullptr;
318 pldm_state_effecter_pdr* pdr = nullptr;
319 uint8_t compEffecterCnt = stateField.size();
George Liu1ec85d42020-02-12 16:05:32 +0800320
321 std::unique_ptr<pldm_pdr, decltype(&pldm_pdr_destroy)>
322 stateEffecterPdrRepo(pldm_pdr_init(), pldm_pdr_destroy);
323 Repo stateEffecterPDRs(stateEffecterPdrRepo.get());
324 getRepoByType(pdrRepo, stateEffecterPDRs, PLDM_STATE_EFFECTER_PDR);
325 if (stateEffecterPDRs.empty())
326 {
327 std::cerr << "Failed to get record by PDR type\n";
328 return PLDM_PLATFORM_INVALID_EFFECTER_ID;
329 }
330
George Liue53193f2020-02-24 09:23:26 +0800331 PdrEntry pdrEntry{};
George Liu1ec85d42020-02-12 16:05:32 +0800332 auto pdrRecord = stateEffecterPDRs.getFirstRecord(pdrEntry);
George Liue53193f2020-02-24 09:23:26 +0800333 while (pdrRecord)
334 {
335 pdr = reinterpret_cast<pldm_state_effecter_pdr*>(pdrEntry.data);
336 if (pdr->effecter_id != effecterId)
Sampa Misraa2fa0702019-05-31 01:28:55 -0500337 {
George Liue53193f2020-02-24 09:23:26 +0800338 pdr = nullptr;
George Liu1ec85d42020-02-12 16:05:32 +0800339 pdrRecord =
340 stateEffecterPDRs.getNextRecord(pdrRecord, pdrEntry);
George Liue53193f2020-02-24 09:23:26 +0800341 continue;
Deepak Kodihallibc669f12019-11-28 08:52:07 -0600342 }
George Liue53193f2020-02-24 09:23:26 +0800343
344 states = reinterpret_cast<state_effecter_possible_states*>(
345 pdr->possible_states);
346 if (compEffecterCnt > pdr->composite_effecter_count)
Deepak Kodihallibc669f12019-11-28 08:52:07 -0600347 {
George Liue53193f2020-02-24 09:23:26 +0800348 std::cerr << "The requester sent wrong composite effecter"
349 << " count for the effecter, EFFECTER_ID="
350 << effecterId << "COMP_EFF_CNT=" << compEffecterCnt
351 << "\n";
352 return PLDM_ERROR_INVALID_DATA;
Sampa Misraa2fa0702019-05-31 01:28:55 -0500353 }
George Liue53193f2020-02-24 09:23:26 +0800354 break;
355 }
356
357 if (!pdr)
358 {
359 return PLDM_PLATFORM_INVALID_EFFECTER_ID;
Sampa Misraa2fa0702019-05-31 01:28:55 -0500360 }
Sampa Misraa2fa0702019-05-31 01:28:55 -0500361
Deepak Kodihallibc669f12019-11-28 08:52:07 -0600362 int rc = PLDM_SUCCESS;
George Liu1ec85d42020-02-12 16:05:32 +0800363 try
Deepak Kodihallibc669f12019-11-28 08:52:07 -0600364 {
George Liu1ec85d42020-02-12 16:05:32 +0800365 const auto& [dbusMappings, dbusValMaps] =
George Liuadbe1722020-05-09 19:20:19 +0800366 effecterDbusObjMaps.at(effecterId);
George Liu1ec85d42020-02-12 16:05:32 +0800367 for (uint8_t currState = 0; currState < compEffecterCnt;
368 ++currState)
Deepak Kodihallibc669f12019-11-28 08:52:07 -0600369 {
George Liu1ec85d42020-02-12 16:05:32 +0800370 std::vector<StateSetNum> allowed{};
371 // computation is based on table 79 from DSP0248 v1.1.1
372 uint8_t bitfieldIndex =
373 stateField[currState].effecter_state / 8;
374 uint8_t bit =
375 stateField[currState].effecter_state - (8 * bitfieldIndex);
376 if (states->possible_states_size < bitfieldIndex ||
377 !(states->states[bitfieldIndex].byte & (1 << bit)))
Deepak Kodihallibc669f12019-11-28 08:52:07 -0600378 {
George Liu1ec85d42020-02-12 16:05:32 +0800379 std::cerr
380 << "Invalid state set value, EFFECTER_ID=" << effecterId
381 << " VALUE=" << stateField[currState].effecter_state
382 << " COMPOSITE_EFFECTER_ID=" << currState
383 << " DBUS_PATH=" << dbusMappings[currState].objectPath
384 << "\n";
385 rc = PLDM_PLATFORM_SET_EFFECTER_UNSUPPORTED_SENSORSTATE;
Deepak Kodihallibc669f12019-11-28 08:52:07 -0600386 break;
387 }
George Liu1ec85d42020-02-12 16:05:32 +0800388 const DBusMapping& dbusMapping = dbusMappings[currState];
389 const StatestoDbusVal& dbusValToMap = dbusValMaps[currState];
390
391 if (stateField[currState].set_request == PLDM_REQUEST_SET)
392 {
393 try
394 {
395 dBusIntf.setDbusProperty(
396 dbusMapping,
397 dbusValToMap.at(
398 stateField[currState].effecter_state));
399 }
400 catch (const std::exception& e)
401 {
402 std::cerr
403 << "Error setting property, ERROR=" << e.what()
404 << " PROPERTY=" << dbusMapping.propertyName
405 << " INTERFACE="
406 << dbusMapping.interface << " PATH="
407 << dbusMapping.objectPath << "\n";
408 return PLDM_ERROR;
409 }
410 }
411 uint8_t* nextState =
412 reinterpret_cast<uint8_t*>(states) +
413 sizeof(state_effecter_possible_states) -
414 sizeof(states->states) +
415 (states->possible_states_size * sizeof(states->states));
416 states = reinterpret_cast<state_effecter_possible_states*>(
417 nextState);
Deepak Kodihallibc669f12019-11-28 08:52:07 -0600418 }
Deepak Kodihallibc669f12019-11-28 08:52:07 -0600419 }
George Liu1ec85d42020-02-12 16:05:32 +0800420 catch (const std::out_of_range& e)
421 {
422 std::cerr << "the effecterId does not exist. effecter id: "
423 << effecterId << e.what() << '\n';
424 }
425
Deepak Kodihallibc669f12019-11-28 08:52:07 -0600426 return rc;
427 }
Deepak Kodihallic682fe22020-03-04 00:42:54 -0600428
Sampa Misra12afe112020-05-25 11:40:44 -0500429 /** @brief Build BMC Terminus Locator PDR
430 *
431 * @param[in] repo - instance of concrete implementation of Repo
432 */
433 void generateTerminusLocatorPDR(Repo& repo);
434
Deepak Kodihallic682fe22020-03-04 00:42:54 -0600435 private:
436 pdr_utils::Repo pdrRepo;
437 uint16_t nextEffecterId{};
George Liuadbe1722020-05-09 19:20:19 +0800438 uint16_t nextSensorId{};
439 DbusObjMaps effecterDbusObjMaps{};
440 DbusObjMaps sensorDbusObjMaps{};
Pavithra Barithaya51efaf82020-04-02 02:42:27 -0500441 HostPDRHandler* hostPDRHandler;
TOM JOSEPHd4d97a52020-03-23 14:36:34 +0530442 events::StateSensorHandler stateSensorHandler;
Tom Joseph33e9c7e2020-06-11 22:09:52 +0530443 fru::Handler* fruHandler;
Deepak Kodihallib5c227e2020-07-13 06:58:34 -0500444 const pldm::utils::DBusHandler* dBusIntf;
445 std::string pdrJsonsDir;
446 bool pdrCreated;
Deepak Kodihallibc669f12019-11-28 08:52:07 -0600447};
448
449} // namespace platform
Deepak Kodihalli557dfb02019-05-12 13:11:17 +0530450} // namespace responder
451} // namespace pldm