Deepak Kodihalli | 557dfb0 | 2019-05-12 13:11:17 +0530 | [diff] [blame] | 1 | #pragma once |
| 2 | |
Deepak Kodihalli | d130e1a | 2020-06-17 05:55:32 -0500 | [diff] [blame] | 3 | #include "common/utils.hpp" |
TOM JOSEPH | d4d97a5 | 2020-03-23 14:36:34 +0530 | [diff] [blame] | 4 | #include "event_parser.hpp" |
Tom Joseph | 33e9c7e | 2020-06-11 22:09:52 +0530 | [diff] [blame] | 5 | #include "fru.hpp" |
George Liu | cae1866 | 2020-05-15 09:32:57 +0800 | [diff] [blame] | 6 | #include "host-bmc/dbus_to_event_handler.hpp" |
Deepak Kodihalli | ac19bd6 | 2020-06-16 08:25:23 -0500 | [diff] [blame] | 7 | #include "host-bmc/host_pdr_handler.hpp" |
Sampa Misra | a2fa070 | 2019-05-31 01:28:55 -0500 | [diff] [blame] | 8 | #include "libpldmresponder/pdr.hpp" |
George Liu | e53193f | 2020-02-24 09:23:26 +0800 | [diff] [blame] | 9 | #include "libpldmresponder/pdr_utils.hpp" |
Kamalkumar Patel | 3c50c82 | 2024-01-30 07:14:40 -0600 | [diff] [blame] | 10 | #include "libpldmresponder/platform_config.hpp" |
Sampa Misra | aea5dde | 2020-08-31 08:33:47 -0500 | [diff] [blame] | 11 | #include "oem_handler.hpp" |
Deepak Kodihalli | 1521f6d | 2020-06-16 08:51:02 -0500 | [diff] [blame] | 12 | #include "pldmd/handler.hpp" |
Sampa Misra | a2fa070 | 2019-05-31 01:28:55 -0500 | [diff] [blame] | 13 | |
George Liu | c453e16 | 2022-12-21 17:16:23 +0800 | [diff] [blame] | 14 | #include <libpldm/pdr.h> |
| 15 | #include <libpldm/platform.h> |
| 16 | #include <libpldm/states.h> |
Deepak Kodihalli | 557dfb0 | 2019-05-12 13:11:17 +0530 | [diff] [blame] | 17 | |
Riya Dixit | 49cfb13 | 2023-03-02 04:26:53 -0600 | [diff] [blame] | 18 | #include <phosphor-logging/lg2.hpp> |
| 19 | |
Pavithra Barithaya | b3b84b4 | 2024-08-23 11:43:57 +0530 | [diff] [blame] | 20 | #include <cstdint> |
Sampa Misra | a2fa070 | 2019-05-31 01:28:55 -0500 | [diff] [blame] | 21 | #include <map> |
Deepak Kodihalli | 557dfb0 | 2019-05-12 13:11:17 +0530 | [diff] [blame] | 22 | |
Riya Dixit | 49cfb13 | 2023-03-02 04:26:53 -0600 | [diff] [blame] | 23 | PHOSPHOR_LOG2_USING; |
| 24 | |
Deepak Kodihalli | 557dfb0 | 2019-05-12 13:11:17 +0530 | [diff] [blame] | 25 | namespace pldm |
| 26 | { |
Deepak Kodihalli | 557dfb0 | 2019-05-12 13:11:17 +0530 | [diff] [blame] | 27 | namespace responder |
| 28 | { |
Sampa Misra | a2fa070 | 2019-05-31 01:28:55 -0500 | [diff] [blame] | 29 | namespace platform |
| 30 | { |
Patrick Williams | 16c2a0a | 2024-08-16 15:20:59 -0400 | [diff] [blame] | 31 | using generatePDR = std::function<void( |
| 32 | const pldm::utils::DBusHandler& dBusIntf, const pldm::utils::Json& json, |
| 33 | pdr_utils::RepoInterface& repo)>; |
George Liu | a287072 | 2020-02-11 11:09:30 +0800 | [diff] [blame] | 34 | |
George Liu | 1ec85d4 | 2020-02-12 16:05:32 +0800 | [diff] [blame] | 35 | using EffecterId = uint16_t; |
George Liu | a287072 | 2020-02-11 11:09:30 +0800 | [diff] [blame] | 36 | using DbusObjMaps = |
| 37 | std::map<EffecterId, |
| 38 | std::tuple<pdr_utils::DbusMappings, pdr_utils::DbusValMaps>>; |
Tom Joseph | 56e45c5 | 2020-03-16 10:01:45 +0530 | [diff] [blame] | 39 | using DbusPath = std::string; |
| 40 | using EffecterObjs = std::vector<DbusPath>; |
| 41 | using EventType = uint8_t; |
| 42 | using EventHandler = std::function<int( |
| 43 | const pldm_msg* request, size_t payloadLength, uint8_t formatVersion, |
| 44 | uint8_t tid, size_t eventDataOffset)>; |
| 45 | using EventHandlers = std::vector<EventHandler>; |
| 46 | using EventMap = std::map<EventType, EventHandlers>; |
George Liu | c4ea6a9 | 2020-07-14 15:48:44 +0800 | [diff] [blame] | 47 | using AssociatedEntityMap = std::map<DbusPath, pldm_entity>; |
Deepak Kodihalli | c682fe2 | 2020-03-04 00:42:54 -0600 | [diff] [blame] | 48 | |
Deepak Kodihalli | bc669f1 | 2019-11-28 08:52:07 -0600 | [diff] [blame] | 49 | class Handler : public CmdHandler |
Sampa Misra | a2fa070 | 2019-05-31 01:28:55 -0500 | [diff] [blame] | 50 | { |
Deepak Kodihalli | bc669f1 | 2019-11-28 08:52:07 -0600 | [diff] [blame] | 51 | public: |
Sagar Srinivas | 90314a3 | 2023-10-17 10:38:03 -0500 | [diff] [blame] | 52 | Handler(const pldm::utils::DBusHandler* dBusIntf, uint8_t eid, |
Kamalkumar Patel | 3c50c82 | 2024-01-30 07:14:40 -0600 | [diff] [blame] | 53 | pldm::InstanceIdDb* instanceIdDb, const fs::path& pdrJsonDir, |
Sagar Srinivas | 90314a3 | 2023-10-17 10:38:03 -0500 | [diff] [blame] | 54 | pldm_pdr* repo, HostPDRHandler* hostPDRHandler, |
Brad Bishop | 5079ac4 | 2021-08-19 18:35:06 -0400 | [diff] [blame] | 55 | pldm::state_sensor::DbusToPLDMEvent* dbusToPLDMEventHandler, |
| 56 | fru::Handler* fruHandler, |
Kamalkumar Patel | 3c50c82 | 2024-01-30 07:14:40 -0600 | [diff] [blame] | 57 | pldm::responder::platform_config::Handler* platformConfigHandler, |
Sagar Srinivas | 90314a3 | 2023-10-17 10:38:03 -0500 | [diff] [blame] | 58 | pldm::requester::Handler<pldm::requester::Request>* handler, |
Sampa Misra | 5fb37d5 | 2021-03-06 07:26:00 -0600 | [diff] [blame] | 59 | sdeventplus::Event& event, bool buildPDRLazily = false, |
Tom Joseph | 56e45c5 | 2020-03-16 10:01:45 +0530 | [diff] [blame] | 60 | const std::optional<EventMap>& addOnHandlersMap = std::nullopt) : |
Patrick Williams | 16c2a0a | 2024-08-16 15:20:59 -0400 | [diff] [blame] | 61 | eid(eid), instanceIdDb(instanceIdDb), pdrRepo(repo), |
Pavithra Barithaya | 3aec997 | 2020-12-14 01:55:44 -0600 | [diff] [blame] | 62 | hostPDRHandler(hostPDRHandler), |
George Liu | cae1866 | 2020-05-15 09:32:57 +0800 | [diff] [blame] | 63 | dbusToPLDMEventHandler(dbusToPLDMEventHandler), fruHandler(fruHandler), |
George Liu | a881c17 | 2021-06-21 18:28:11 +0800 | [diff] [blame] | 64 | dBusIntf(dBusIntf), platformConfigHandler(platformConfigHandler), |
| 65 | handler(handler), event(event), pdrJsonDir(pdrJsonDir), |
| 66 | pdrCreated(false), pdrJsonsDir({pdrJsonDir}) |
Sampa Misra | a2fa070 | 2019-05-31 01:28:55 -0500 | [diff] [blame] | 67 | { |
Deepak Kodihalli | b5c227e | 2020-07-13 06:58:34 -0500 | [diff] [blame] | 68 | if (!buildPDRLazily) |
| 69 | { |
Sampa Misra | 12afe11 | 2020-05-25 11:40:44 -0500 | [diff] [blame] | 70 | generateTerminusLocatorPDR(pdrRepo); |
Deepak Kodihalli | b5c227e | 2020-07-13 06:58:34 -0500 | [diff] [blame] | 71 | generate(*dBusIntf, pdrJsonsDir, pdrRepo); |
| 72 | pdrCreated = true; |
| 73 | } |
Deepak Kodihalli | c682fe2 | 2020-03-04 00:42:54 -0600 | [diff] [blame] | 74 | |
Delphine CC Chiu | d2e4899 | 2023-12-05 16:29:51 +0800 | [diff] [blame] | 75 | handlers.emplace( |
| 76 | PLDM_GET_PDR, |
| 77 | [this](pldm_tid_t, const pldm_msg* request, size_t payloadLength) { |
Patrick Williams | 16c2a0a | 2024-08-16 15:20:59 -0400 | [diff] [blame] | 78 | return this->getPDR(request, payloadLength); |
| 79 | }); |
Delphine CC Chiu | d2e4899 | 2023-12-05 16:29:51 +0800 | [diff] [blame] | 80 | handlers.emplace( |
| 81 | PLDM_SET_NUMERIC_EFFECTER_VALUE, |
| 82 | [this](pldm_tid_t, const pldm_msg* request, size_t payloadLength) { |
Patrick Williams | 16c2a0a | 2024-08-16 15:20:59 -0400 | [diff] [blame] | 83 | return this->setNumericEffecterValue(request, payloadLength); |
| 84 | }); |
Delphine CC Chiu | d2e4899 | 2023-12-05 16:29:51 +0800 | [diff] [blame] | 85 | handlers.emplace( |
| 86 | PLDM_GET_NUMERIC_EFFECTER_VALUE, |
| 87 | [this](pldm_tid_t, const pldm_msg* request, size_t payloadLength) { |
Patrick Williams | 16c2a0a | 2024-08-16 15:20:59 -0400 | [diff] [blame] | 88 | return this->getNumericEffecterValue(request, payloadLength); |
| 89 | }); |
Delphine CC Chiu | d2e4899 | 2023-12-05 16:29:51 +0800 | [diff] [blame] | 90 | handlers.emplace( |
| 91 | PLDM_SET_STATE_EFFECTER_STATES, |
| 92 | [this](pldm_tid_t, const pldm_msg* request, size_t payloadLength) { |
Patrick Williams | 16c2a0a | 2024-08-16 15:20:59 -0400 | [diff] [blame] | 93 | return this->setStateEffecterStates(request, payloadLength); |
| 94 | }); |
Delphine CC Chiu | d2e4899 | 2023-12-05 16:29:51 +0800 | [diff] [blame] | 95 | handlers.emplace( |
| 96 | PLDM_PLATFORM_EVENT_MESSAGE, |
| 97 | [this](pldm_tid_t, const pldm_msg* request, size_t payloadLength) { |
Patrick Williams | 16c2a0a | 2024-08-16 15:20:59 -0400 | [diff] [blame] | 98 | return this->platformEventMessage(request, payloadLength); |
| 99 | }); |
Delphine CC Chiu | d2e4899 | 2023-12-05 16:29:51 +0800 | [diff] [blame] | 100 | handlers.emplace( |
| 101 | PLDM_GET_STATE_SENSOR_READINGS, |
| 102 | [this](pldm_tid_t, const pldm_msg* request, size_t payloadLength) { |
Patrick Williams | 16c2a0a | 2024-08-16 15:20:59 -0400 | [diff] [blame] | 103 | return this->getStateSensorReadings(request, payloadLength); |
| 104 | }); |
Tom Joseph | 56e45c5 | 2020-03-16 10:01:45 +0530 | [diff] [blame] | 105 | |
| 106 | // Default handler for PLDM Events |
| 107 | eventHandlers[PLDM_SENSOR_EVENT].emplace_back( |
| 108 | [this](const pldm_msg* request, size_t payloadLength, |
| 109 | uint8_t formatVersion, uint8_t tid, size_t eventDataOffset) { |
Patrick Williams | 16c2a0a | 2024-08-16 15:20:59 -0400 | [diff] [blame] | 110 | return this->sensorEvent(request, payloadLength, formatVersion, |
| 111 | tid, eventDataOffset); |
| 112 | }); |
Deepak Kodihalli | 8cb6f66 | 2020-04-10 02:55:43 -0500 | [diff] [blame] | 113 | eventHandlers[PLDM_PDR_REPOSITORY_CHG_EVENT].emplace_back( |
| 114 | [this](const pldm_msg* request, size_t payloadLength, |
| 115 | uint8_t formatVersion, uint8_t tid, size_t eventDataOffset) { |
Patrick Williams | 16c2a0a | 2024-08-16 15:20:59 -0400 | [diff] [blame] | 116 | return this->pldmPDRRepositoryChgEvent( |
| 117 | request, payloadLength, formatVersion, tid, |
| 118 | eventDataOffset); |
| 119 | }); |
Tom Joseph | 56e45c5 | 2020-03-16 10:01:45 +0530 | [diff] [blame] | 120 | |
| 121 | // Additional OEM event handlers for PLDM events, append it to the |
| 122 | // standard handlers |
| 123 | if (addOnHandlersMap) |
| 124 | { |
| 125 | auto addOnHandlers = addOnHandlersMap.value(); |
| 126 | for (EventMap::iterator iter = addOnHandlers.begin(); |
| 127 | iter != addOnHandlers.end(); ++iter) |
| 128 | { |
| 129 | auto search = eventHandlers.find(iter->first); |
| 130 | if (search != eventHandlers.end()) |
| 131 | { |
| 132 | search->second.insert(std::end(search->second), |
| 133 | std::begin(iter->second), |
| 134 | std::end(iter->second)); |
| 135 | } |
| 136 | else |
| 137 | { |
| 138 | eventHandlers.emplace(iter->first, iter->second); |
| 139 | } |
| 140 | } |
| 141 | } |
Sampa Misra | a2fa070 | 2019-05-31 01:28:55 -0500 | [diff] [blame] | 142 | } |
| 143 | |
George Liu | 1ec85d4 | 2020-02-12 16:05:32 +0800 | [diff] [blame] | 144 | pdr_utils::Repo& getRepo() |
Deepak Kodihalli | c682fe2 | 2020-03-04 00:42:54 -0600 | [diff] [blame] | 145 | { |
George Liu | 1ec85d4 | 2020-02-12 16:05:32 +0800 | [diff] [blame] | 146 | return this->pdrRepo; |
Deepak Kodihalli | c682fe2 | 2020-03-04 00:42:54 -0600 | [diff] [blame] | 147 | } |
| 148 | |
George Liu | 1ec85d4 | 2020-02-12 16:05:32 +0800 | [diff] [blame] | 149 | /** @brief Add D-Bus mapping and value mapping(stateId to D-Bus) for the |
George Liu | adbe172 | 2020-05-09 19:20:19 +0800 | [diff] [blame] | 150 | * Id. If the same id is added, the previous dbusObjs will |
George Liu | 1ec85d4 | 2020-02-12 16:05:32 +0800 | [diff] [blame] | 151 | * be "over-written". |
| 152 | * |
George Liu | adbe172 | 2020-05-09 19:20:19 +0800 | [diff] [blame] | 153 | * @param[in] Id - effecter/sensor id |
George Liu | 1ec85d4 | 2020-02-12 16:05:32 +0800 | [diff] [blame] | 154 | * @param[in] dbusObj - list of D-Bus object structure and list of D-Bus |
| 155 | * property value to attribute value |
George Liu | adbe172 | 2020-05-09 19:20:19 +0800 | [diff] [blame] | 156 | * @param[in] typeId - the type id of enum |
George Liu | 1ec85d4 | 2020-02-12 16:05:32 +0800 | [diff] [blame] | 157 | */ |
George Liu | a287072 | 2020-02-11 11:09:30 +0800 | [diff] [blame] | 158 | void addDbusObjMaps( |
George Liu | adbe172 | 2020-05-09 19:20:19 +0800 | [diff] [blame] | 159 | uint16_t id, |
| 160 | std::tuple<pdr_utils::DbusMappings, pdr_utils::DbusValMaps> dbusObj, |
Brad Bishop | 5079ac4 | 2021-08-19 18:35:06 -0400 | [diff] [blame] | 161 | pldm::responder::pdr_utils::TypeId typeId = |
| 162 | pldm::responder::pdr_utils::TypeId::PLDM_EFFECTER_ID); |
George Liu | 1ec85d4 | 2020-02-12 16:05:32 +0800 | [diff] [blame] | 163 | |
George Liu | adbe172 | 2020-05-09 19:20:19 +0800 | [diff] [blame] | 164 | /** @brief Retrieve an id -> D-Bus objects mapping |
George Liu | 1ec85d4 | 2020-02-12 16:05:32 +0800 | [diff] [blame] | 165 | * |
George Liu | adbe172 | 2020-05-09 19:20:19 +0800 | [diff] [blame] | 166 | * @param[in] Id - id |
| 167 | * @param[in] typeId - the type id of enum |
George Liu | 1ec85d4 | 2020-02-12 16:05:32 +0800 | [diff] [blame] | 168 | * |
George Liu | a287072 | 2020-02-11 11:09:30 +0800 | [diff] [blame] | 169 | * @return std::tuple<pdr_utils::DbusMappings, pdr_utils::DbusValMaps> - |
| 170 | * list of D-Bus object structure and list of D-Bus property value |
| 171 | * to attribute value |
George Liu | 1ec85d4 | 2020-02-12 16:05:32 +0800 | [diff] [blame] | 172 | */ |
George Liu | a287072 | 2020-02-11 11:09:30 +0800 | [diff] [blame] | 173 | const std::tuple<pdr_utils::DbusMappings, pdr_utils::DbusValMaps>& |
Brad Bishop | 5079ac4 | 2021-08-19 18:35:06 -0400 | [diff] [blame] | 174 | getDbusObjMaps( |
| 175 | uint16_t id, |
| 176 | pldm::responder::pdr_utils::TypeId typeId = |
| 177 | pldm::responder::pdr_utils::TypeId::PLDM_EFFECTER_ID) const; |
Deepak Kodihalli | c682fe2 | 2020-03-04 00:42:54 -0600 | [diff] [blame] | 178 | |
| 179 | uint16_t getNextEffecterId() |
| 180 | { |
| 181 | return ++nextEffecterId; |
| 182 | } |
| 183 | |
George Liu | adbe172 | 2020-05-09 19:20:19 +0800 | [diff] [blame] | 184 | uint16_t getNextSensorId() |
| 185 | { |
| 186 | return ++nextSensorId; |
| 187 | } |
| 188 | |
Deepak Kodihalli | c682fe2 | 2020-03-04 00:42:54 -0600 | [diff] [blame] | 189 | /** @brief Parse PDR JSONs and build PDR repository |
| 190 | * |
George Liu | 36e8135 | 2020-07-01 14:40:30 +0800 | [diff] [blame] | 191 | * @param[in] dBusIntf - The interface object |
Deepak Kodihalli | c682fe2 | 2020-03-04 00:42:54 -0600 | [diff] [blame] | 192 | * @param[in] dir - directory housing platform specific PDR JSON files |
| 193 | * @param[in] repo - instance of concrete implementation of Repo |
| 194 | */ |
George Liu | 36e8135 | 2020-07-01 14:40:30 +0800 | [diff] [blame] | 195 | void generate(const pldm::utils::DBusHandler& dBusIntf, |
Kamalkumar Patel | 3c50c82 | 2024-01-30 07:14:40 -0600 | [diff] [blame] | 196 | const std::vector<fs::path>& dir, |
Brad Bishop | 5079ac4 | 2021-08-19 18:35:06 -0400 | [diff] [blame] | 197 | pldm::responder::pdr_utils::Repo& repo); |
Deepak Kodihalli | c682fe2 | 2020-03-04 00:42:54 -0600 | [diff] [blame] | 198 | |
| 199 | /** @brief Parse PDR JSONs and build state effecter PDR repository |
| 200 | * |
| 201 | * @param[in] json - platform specific PDR JSON files |
| 202 | * @param[in] repo - instance of state effecter implementation of Repo |
| 203 | */ |
Brad Bishop | 5079ac4 | 2021-08-19 18:35:06 -0400 | [diff] [blame] | 204 | void generateStateEffecterRepo(const pldm::utils::Json& json, |
| 205 | pldm::responder::pdr_utils::Repo& repo); |
Deepak Kodihalli | c682fe2 | 2020-03-04 00:42:54 -0600 | [diff] [blame] | 206 | |
Tom Joseph | 56e45c5 | 2020-03-16 10:01:45 +0530 | [diff] [blame] | 207 | /** @brief map of PLDM event type to EventHandlers |
| 208 | * |
| 209 | */ |
| 210 | EventMap eventHandlers; |
| 211 | |
George Liu | a881c17 | 2021-06-21 18:28:11 +0800 | [diff] [blame] | 212 | /* @brief Method to set the oem platform handler in platform handler class |
| 213 | * |
| 214 | * @param[in] handler - oem platform handler |
| 215 | */ |
| 216 | inline void |
| 217 | setOemPlatformHandler(pldm::responder::oem_platform::Handler* handler) |
| 218 | { |
| 219 | oemPlatformHandler = handler; |
| 220 | } |
| 221 | |
Chau Ly | a743e38 | 2024-10-26 11:12:22 +0000 | [diff] [blame^] | 222 | /* @brief Method to register event handlers |
| 223 | * |
| 224 | * @param[in] handler - oem event handlers |
| 225 | */ |
| 226 | inline void registerEventHandlers(EventType eventId, EventHandlers handlers) |
| 227 | { |
| 228 | // Try to emplace the eventId with an empty vector if it doesn't exist |
| 229 | auto [iter, |
| 230 | inserted] = eventHandlers.try_emplace(eventId, EventHandlers{}); |
| 231 | |
| 232 | for (const auto& handler : handlers) |
| 233 | { |
| 234 | iter->second.emplace_back(handler); |
| 235 | } |
| 236 | } |
| 237 | |
Deepak Kodihalli | bc669f1 | 2019-11-28 08:52:07 -0600 | [diff] [blame] | 238 | /** @brief Handler for GetPDR |
| 239 | * |
| 240 | * @param[in] request - Request message payload |
| 241 | * @param[in] payloadLength - Request payload length |
| 242 | * @param[out] Response - Response message written here |
| 243 | */ |
| 244 | Response getPDR(const pldm_msg* request, size_t payloadLength); |
Sampa Misra | a2fa070 | 2019-05-31 01:28:55 -0500 | [diff] [blame] | 245 | |
George Liu | eccb0c5 | 2020-01-14 11:09:56 +0800 | [diff] [blame] | 246 | /** @brief Handler for setNumericEffecterValue |
| 247 | * |
| 248 | * @param[in] request - Request message |
| 249 | * @param[in] payloadLength - Request payload length |
| 250 | * @return Response - PLDM Response message |
| 251 | */ |
| 252 | Response setNumericEffecterValue(const pldm_msg* request, |
| 253 | size_t payloadLength); |
| 254 | |
Archana Kakani | 6ece21fb | 2023-10-10 08:21:52 -0500 | [diff] [blame] | 255 | /** @brief Handler for getNumericEffecterValue |
| 256 | * |
| 257 | * @param[in] request - Request message |
| 258 | * @param[in] payloadLength - Request payload length |
| 259 | * @return Response - PLDM Response message |
| 260 | */ |
| 261 | Response getNumericEffecterValue(const pldm_msg* request, |
| 262 | size_t payloadLength); |
| 263 | |
George Liu | 362c18d | 2020-05-14 09:46:36 +0800 | [diff] [blame] | 264 | /** @brief Handler for getStateSensorReadings |
| 265 | * |
| 266 | * @param[in] request - Request message |
| 267 | * @param[in] payloadLength - Request payload length |
| 268 | * @return Response - PLDM Response message |
| 269 | */ |
| 270 | Response getStateSensorReadings(const pldm_msg* request, |
| 271 | size_t payloadLength); |
| 272 | |
Deepak Kodihalli | bc669f1 | 2019-11-28 08:52:07 -0600 | [diff] [blame] | 273 | /** @brief Handler for setStateEffecterStates |
| 274 | * |
| 275 | * @param[in] request - Request message |
| 276 | * @param[in] payloadLength - Request payload length |
| 277 | * @return Response - PLDM Response message |
| 278 | */ |
| 279 | Response setStateEffecterStates(const pldm_msg* request, |
| 280 | size_t payloadLength); |
| 281 | |
Tom Joseph | 56e45c5 | 2020-03-16 10:01:45 +0530 | [diff] [blame] | 282 | /** @brief Handler for PlatformEventMessage |
| 283 | * |
| 284 | * @param[in] request - Request message |
| 285 | * @param[in] payloadLength - Request payload length |
| 286 | * @return Response - PLDM Response message |
| 287 | */ |
| 288 | Response platformEventMessage(const pldm_msg* request, |
| 289 | size_t payloadLength); |
| 290 | |
| 291 | /** @brief Handler for event class Sensor event |
| 292 | * |
| 293 | * @param[in] request - Request message |
| 294 | * @param[in] payloadLength - Request payload length |
| 295 | * @param[in] formatVersion - Version of the event format |
| 296 | * @param[in] tid - Terminus ID of the event's originator |
| 297 | * @param[in] eventDataOffset - Offset of the event data in the request |
| 298 | * message |
| 299 | * @return PLDM completion code |
| 300 | */ |
| 301 | int sensorEvent(const pldm_msg* request, size_t payloadLength, |
| 302 | uint8_t formatVersion, uint8_t tid, size_t eventDataOffset); |
| 303 | |
Deepak Kodihalli | 8cb6f66 | 2020-04-10 02:55:43 -0500 | [diff] [blame] | 304 | /** @brief Handler for pldmPDRRepositoryChgEvent |
| 305 | * |
| 306 | * @param[in] request - Request message |
| 307 | * @param[in] payloadLength - Request payload length |
| 308 | * @param[in] formatVersion - Version of the event format |
| 309 | * @param[in] tid - Terminus ID of the event's originator |
| 310 | * @param[in] eventDataOffset - Offset of the event data in the request |
| 311 | * message |
| 312 | * @return PLDM completion code |
| 313 | */ |
| 314 | int pldmPDRRepositoryChgEvent(const pldm_msg* request, size_t payloadLength, |
| 315 | uint8_t formatVersion, uint8_t tid, |
| 316 | size_t eventDataOffset); |
| 317 | |
| 318 | /** @brief Handler for extracting the PDR handles from changeEntries |
| 319 | * |
| 320 | * @param[in] changeEntryData - ChangeEntry data from changeRecord |
| 321 | * @param[in] changeEntryDataSize - total size of changeEntryData |
| 322 | * @param[in] numberOfChangeEntries - total number of changeEntries to |
| 323 | * extract |
| 324 | * @param[out] pdrRecordHandles - std::vector where the extracted PDR |
| 325 | * handles are placed |
| 326 | * @return PLDM completion code |
| 327 | */ |
| 328 | int getPDRRecordHandles(const ChangeEntry* changeEntryData, |
| 329 | size_t changeEntryDataSize, |
| 330 | size_t numberOfChangeEntries, |
| 331 | PDRRecordHandles& pdrRecordHandles); |
| 332 | |
Deepak Kodihalli | bc669f1 | 2019-11-28 08:52:07 -0600 | [diff] [blame] | 333 | /** @brief Function to set the effecter requested by pldm requester |
| 334 | * @param[in] dBusIntf - The interface object |
| 335 | * @param[in] effecterId - Effecter ID sent by the requester to act on |
| 336 | * @param[in] stateField - The state field data for each of the states, |
| 337 | * equal to composite effecter count in number |
| 338 | * @return - Success or failure in setting the states. Returns failure in |
Manojkiran Eda | 2576aec | 2024-06-17 12:05:17 +0530 | [diff] [blame] | 339 | * terms of PLDM completion codes if at least one state fails to be set |
Deepak Kodihalli | bc669f1 | 2019-11-28 08:52:07 -0600 | [diff] [blame] | 340 | */ |
| 341 | template <class DBusInterface> |
| 342 | int setStateEffecterStatesHandler( |
Deepak Kodihalli | c682fe2 | 2020-03-04 00:42:54 -0600 | [diff] [blame] | 343 | const DBusInterface& dBusIntf, uint16_t effecterId, |
Deepak Kodihalli | bc669f1 | 2019-11-28 08:52:07 -0600 | [diff] [blame] | 344 | const std::vector<set_effecter_state_field>& stateField) |
Sampa Misra | a2fa070 | 2019-05-31 01:28:55 -0500 | [diff] [blame] | 345 | { |
George Liu | e53193f | 2020-02-24 09:23:26 +0800 | [diff] [blame] | 346 | using namespace pldm::responder::pdr; |
George Liu | 1e44c73 | 2020-02-28 20:20:06 +0800 | [diff] [blame] | 347 | using namespace pldm::utils; |
Deepak Kodihalli | bc669f1 | 2019-11-28 08:52:07 -0600 | [diff] [blame] | 348 | using StateSetNum = uint8_t; |
Deepak Kodihalli | bc669f1 | 2019-11-28 08:52:07 -0600 | [diff] [blame] | 349 | |
| 350 | state_effecter_possible_states* states = nullptr; |
| 351 | pldm_state_effecter_pdr* pdr = nullptr; |
| 352 | uint8_t compEffecterCnt = stateField.size(); |
George Liu | 1ec85d4 | 2020-02-12 16:05:32 +0800 | [diff] [blame] | 353 | |
| 354 | std::unique_ptr<pldm_pdr, decltype(&pldm_pdr_destroy)> |
| 355 | stateEffecterPdrRepo(pldm_pdr_init(), pldm_pdr_destroy); |
Andrew Jeffery | acb2029 | 2023-06-30 11:47:44 +0930 | [diff] [blame] | 356 | if (!stateEffecterPdrRepo) |
| 357 | { |
| 358 | throw std::runtime_error( |
| 359 | "Failed to instantiate state effecter PDR repository"); |
| 360 | } |
Brad Bishop | 5079ac4 | 2021-08-19 18:35:06 -0400 | [diff] [blame] | 361 | pldm::responder::pdr_utils::Repo stateEffecterPDRs( |
| 362 | stateEffecterPdrRepo.get()); |
George Liu | 1ec85d4 | 2020-02-12 16:05:32 +0800 | [diff] [blame] | 363 | getRepoByType(pdrRepo, stateEffecterPDRs, PLDM_STATE_EFFECTER_PDR); |
| 364 | if (stateEffecterPDRs.empty()) |
| 365 | { |
Riya Dixit | 49cfb13 | 2023-03-02 04:26:53 -0600 | [diff] [blame] | 366 | error("Failed to get record by PDR type"); |
George Liu | 1ec85d4 | 2020-02-12 16:05:32 +0800 | [diff] [blame] | 367 | return PLDM_PLATFORM_INVALID_EFFECTER_ID; |
| 368 | } |
| 369 | |
Brad Bishop | 5079ac4 | 2021-08-19 18:35:06 -0400 | [diff] [blame] | 370 | pldm::responder::pdr_utils::PdrEntry pdrEntry{}; |
George Liu | 1ec85d4 | 2020-02-12 16:05:32 +0800 | [diff] [blame] | 371 | auto pdrRecord = stateEffecterPDRs.getFirstRecord(pdrEntry); |
George Liu | e53193f | 2020-02-24 09:23:26 +0800 | [diff] [blame] | 372 | while (pdrRecord) |
| 373 | { |
| 374 | pdr = reinterpret_cast<pldm_state_effecter_pdr*>(pdrEntry.data); |
| 375 | if (pdr->effecter_id != effecterId) |
Sampa Misra | a2fa070 | 2019-05-31 01:28:55 -0500 | [diff] [blame] | 376 | { |
George Liu | e53193f | 2020-02-24 09:23:26 +0800 | [diff] [blame] | 377 | pdr = nullptr; |
Patrick Williams | 16c2a0a | 2024-08-16 15:20:59 -0400 | [diff] [blame] | 378 | pdrRecord = |
| 379 | stateEffecterPDRs.getNextRecord(pdrRecord, pdrEntry); |
George Liu | e53193f | 2020-02-24 09:23:26 +0800 | [diff] [blame] | 380 | continue; |
Deepak Kodihalli | bc669f1 | 2019-11-28 08:52:07 -0600 | [diff] [blame] | 381 | } |
George Liu | e53193f | 2020-02-24 09:23:26 +0800 | [diff] [blame] | 382 | |
| 383 | states = reinterpret_cast<state_effecter_possible_states*>( |
| 384 | pdr->possible_states); |
| 385 | if (compEffecterCnt > pdr->composite_effecter_count) |
Deepak Kodihalli | bc669f1 | 2019-11-28 08:52:07 -0600 | [diff] [blame] | 386 | { |
Riya Dixit | 49cfb13 | 2023-03-02 04:26:53 -0600 | [diff] [blame] | 387 | error( |
Riya Dixit | 8964444 | 2024-03-31 05:39:59 -0500 | [diff] [blame] | 388 | "The requester sent wrong composite effecter count '{COMPOSITE_EFFECTER_COUNT}' for the effecter ID '{EFFECTERID}'.", |
Riya Dixit | 1e5c81e | 2024-05-03 07:54:00 -0500 | [diff] [blame] | 389 | "COMPOSITE_EFFECTER_COUNT", compEffecterCnt, "EFFECTERID", |
| 390 | effecterId); |
George Liu | e53193f | 2020-02-24 09:23:26 +0800 | [diff] [blame] | 391 | return PLDM_ERROR_INVALID_DATA; |
Sampa Misra | a2fa070 | 2019-05-31 01:28:55 -0500 | [diff] [blame] | 392 | } |
George Liu | e53193f | 2020-02-24 09:23:26 +0800 | [diff] [blame] | 393 | break; |
| 394 | } |
| 395 | |
| 396 | if (!pdr) |
| 397 | { |
| 398 | return PLDM_PLATFORM_INVALID_EFFECTER_ID; |
Sampa Misra | a2fa070 | 2019-05-31 01:28:55 -0500 | [diff] [blame] | 399 | } |
Sampa Misra | a2fa070 | 2019-05-31 01:28:55 -0500 | [diff] [blame] | 400 | |
Deepak Kodihalli | bc669f1 | 2019-11-28 08:52:07 -0600 | [diff] [blame] | 401 | int rc = PLDM_SUCCESS; |
George Liu | 1ec85d4 | 2020-02-12 16:05:32 +0800 | [diff] [blame] | 402 | try |
Deepak Kodihalli | bc669f1 | 2019-11-28 08:52:07 -0600 | [diff] [blame] | 403 | { |
Patrick Williams | 16c2a0a | 2024-08-16 15:20:59 -0400 | [diff] [blame] | 404 | const auto& [dbusMappings, dbusValMaps] = |
| 405 | effecterDbusObjMaps.at(effecterId); |
George Liu | 1ec85d4 | 2020-02-12 16:05:32 +0800 | [diff] [blame] | 406 | for (uint8_t currState = 0; currState < compEffecterCnt; |
| 407 | ++currState) |
Deepak Kodihalli | bc669f1 | 2019-11-28 08:52:07 -0600 | [diff] [blame] | 408 | { |
George Liu | 1ec85d4 | 2020-02-12 16:05:32 +0800 | [diff] [blame] | 409 | std::vector<StateSetNum> allowed{}; |
| 410 | // computation is based on table 79 from DSP0248 v1.1.1 |
Patrick Williams | 16c2a0a | 2024-08-16 15:20:59 -0400 | [diff] [blame] | 411 | uint8_t bitfieldIndex = |
| 412 | stateField[currState].effecter_state / 8; |
Patrick Williams | 6da4f91 | 2023-05-10 07:50:53 -0500 | [diff] [blame] | 413 | uint8_t bit = stateField[currState].effecter_state - |
| 414 | (8 * bitfieldIndex); |
George Liu | 1ec85d4 | 2020-02-12 16:05:32 +0800 | [diff] [blame] | 415 | if (states->possible_states_size < bitfieldIndex || |
| 416 | !(states->states[bitfieldIndex].byte & (1 << bit))) |
Deepak Kodihalli | bc669f1 | 2019-11-28 08:52:07 -0600 | [diff] [blame] | 417 | { |
Riya Dixit | 49cfb13 | 2023-03-02 04:26:53 -0600 | [diff] [blame] | 418 | error( |
Riya Dixit | 8964444 | 2024-03-31 05:39:59 -0500 | [diff] [blame] | 419 | "Invalid state set value for effecter ID '{EFFECTERID}', effecter state '{EFFECTER_STATE}', composite effecter ID '{COMPOSITE_EFFECTER_ID}' and path '{PATH}'.", |
Riya Dixit | 1e5c81e | 2024-05-03 07:54:00 -0500 | [diff] [blame] | 420 | "EFFECTERID", effecterId, "EFFECTER_STATE", |
| 421 | stateField[currState].effecter_state, |
| 422 | "COMPOSITE_EFFECTER_COUNT", currState, "PATH", |
| 423 | dbusMappings[currState].objectPath); |
George Liu | 1ec85d4 | 2020-02-12 16:05:32 +0800 | [diff] [blame] | 424 | rc = PLDM_PLATFORM_SET_EFFECTER_UNSUPPORTED_SENSORSTATE; |
Deepak Kodihalli | bc669f1 | 2019-11-28 08:52:07 -0600 | [diff] [blame] | 425 | break; |
| 426 | } |
George Liu | 1ec85d4 | 2020-02-12 16:05:32 +0800 | [diff] [blame] | 427 | const DBusMapping& dbusMapping = dbusMappings[currState]; |
Brad Bishop | 5079ac4 | 2021-08-19 18:35:06 -0400 | [diff] [blame] | 428 | const pldm::responder::pdr_utils::StatestoDbusVal& |
| 429 | dbusValToMap = dbusValMaps[currState]; |
George Liu | 1ec85d4 | 2020-02-12 16:05:32 +0800 | [diff] [blame] | 430 | |
| 431 | if (stateField[currState].set_request == PLDM_REQUEST_SET) |
| 432 | { |
| 433 | try |
| 434 | { |
| 435 | dBusIntf.setDbusProperty( |
| 436 | dbusMapping, |
| 437 | dbusValToMap.at( |
| 438 | stateField[currState].effecter_state)); |
| 439 | } |
| 440 | catch (const std::exception& e) |
| 441 | { |
Riya Dixit | 49cfb13 | 2023-03-02 04:26:53 -0600 | [diff] [blame] | 442 | error( |
Riya Dixit | 8964444 | 2024-03-31 05:39:59 -0500 | [diff] [blame] | 443 | "Failed to set property '{PROPERTY}' of interface '{INTERFACE}' at path '{PATH}', error - {ERROR}", |
| 444 | "PROPERTY", dbusMapping.propertyName, "DBUS_INTF", |
Riya Dixit | 49cfb13 | 2023-03-02 04:26:53 -0600 | [diff] [blame] | 445 | dbusMapping.interface, "DBUS_OBJ_PATH", |
Riya Dixit | 1e5c81e | 2024-05-03 07:54:00 -0500 | [diff] [blame] | 446 | dbusMapping.objectPath, "ERROR", e); |
George Liu | 1ec85d4 | 2020-02-12 16:05:32 +0800 | [diff] [blame] | 447 | return PLDM_ERROR; |
| 448 | } |
| 449 | } |
| 450 | uint8_t* nextState = |
| 451 | reinterpret_cast<uint8_t*>(states) + |
| 452 | sizeof(state_effecter_possible_states) - |
| 453 | sizeof(states->states) + |
| 454 | (states->possible_states_size * sizeof(states->states)); |
| 455 | states = reinterpret_cast<state_effecter_possible_states*>( |
| 456 | nextState); |
Deepak Kodihalli | bc669f1 | 2019-11-28 08:52:07 -0600 | [diff] [blame] | 457 | } |
Deepak Kodihalli | bc669f1 | 2019-11-28 08:52:07 -0600 | [diff] [blame] | 458 | } |
George Liu | 1ec85d4 | 2020-02-12 16:05:32 +0800 | [diff] [blame] | 459 | catch (const std::out_of_range& e) |
| 460 | { |
Riya Dixit | 49cfb13 | 2023-03-02 04:26:53 -0600 | [diff] [blame] | 461 | error( |
Riya Dixit | 8964444 | 2024-03-31 05:39:59 -0500 | [diff] [blame] | 462 | "The effecter ID '{EFFECTERID}' does not exist, error - {ERROR}.", |
Riya Dixit | 1e5c81e | 2024-05-03 07:54:00 -0500 | [diff] [blame] | 463 | "EFFECTERID", effecterId, "ERROR", e); |
George Liu | 1ec85d4 | 2020-02-12 16:05:32 +0800 | [diff] [blame] | 464 | } |
| 465 | |
Deepak Kodihalli | bc669f1 | 2019-11-28 08:52:07 -0600 | [diff] [blame] | 466 | return rc; |
| 467 | } |
Deepak Kodihalli | c682fe2 | 2020-03-04 00:42:54 -0600 | [diff] [blame] | 468 | |
Sampa Misra | 12afe11 | 2020-05-25 11:40:44 -0500 | [diff] [blame] | 469 | /** @brief Build BMC Terminus Locator PDR |
| 470 | * |
| 471 | * @param[in] repo - instance of concrete implementation of Repo |
| 472 | */ |
Brad Bishop | 5079ac4 | 2021-08-19 18:35:06 -0400 | [diff] [blame] | 473 | void generateTerminusLocatorPDR(pldm::responder::pdr_utils::Repo& repo); |
Sampa Misra | 12afe11 | 2020-05-25 11:40:44 -0500 | [diff] [blame] | 474 | |
George Liu | c4ea6a9 | 2020-07-14 15:48:44 +0800 | [diff] [blame] | 475 | /** @brief Get std::map associated with the entity |
| 476 | * key: object path |
| 477 | * value: pldm_entity |
| 478 | * |
| 479 | * @return std::map<ObjectPath, pldm_entity> |
| 480 | */ |
| 481 | inline const AssociatedEntityMap& getAssociateEntityMap() const |
| 482 | { |
| 483 | if (fruHandler == nullptr) |
| 484 | { |
| 485 | throw InternalFailure(); |
| 486 | } |
| 487 | return fruHandler->getAssociateEntityMap(); |
| 488 | } |
| 489 | |
Manojkiran Eda | ae933cc | 2024-02-21 17:19:21 +0530 | [diff] [blame] | 490 | /** @brief update the sensor cache map |
| 491 | * @param[in] sensorId - sensor id that needs an update |
| 492 | * @param[in] sensorRearm - rearm value within the sensor |
| 493 | * @param[in] value - value that needs to be cached |
| 494 | */ |
| 495 | |
| 496 | inline void updateSensorCache(pldm::pdr::SensorID sensorId, |
| 497 | size_t sensorRearm, uint8_t value) |
| 498 | { |
| 499 | if (dbusToPLDMEventHandler) |
| 500 | { |
| 501 | dbusToPLDMEventHandler->updateSensorCacheMaps(sensorId, sensorRearm, |
| 502 | value); |
| 503 | } |
| 504 | } |
| 505 | |
Sampa Misra | 5fb37d5 | 2021-03-06 07:26:00 -0600 | [diff] [blame] | 506 | /** @brief process the actions that needs to be performed after a GetPDR |
| 507 | * call is received |
| 508 | * @param[in] source - sdeventplus event source |
| 509 | */ |
| 510 | void _processPostGetPDRActions(sdeventplus::source::EventBase& source); |
| 511 | |
Sagar Srinivas | 90314a3 | 2023-10-17 10:38:03 -0500 | [diff] [blame] | 512 | /** @brief Method for setEventreceiver */ |
| 513 | void setEventReceiver(); |
| 514 | |
Deepak Kodihalli | c682fe2 | 2020-03-04 00:42:54 -0600 | [diff] [blame] | 515 | private: |
Sagar Srinivas | 90314a3 | 2023-10-17 10:38:03 -0500 | [diff] [blame] | 516 | uint8_t eid; |
| 517 | InstanceIdDb* instanceIdDb; |
Deepak Kodihalli | c682fe2 | 2020-03-04 00:42:54 -0600 | [diff] [blame] | 518 | pdr_utils::Repo pdrRepo; |
| 519 | uint16_t nextEffecterId{}; |
George Liu | adbe172 | 2020-05-09 19:20:19 +0800 | [diff] [blame] | 520 | uint16_t nextSensorId{}; |
| 521 | DbusObjMaps effecterDbusObjMaps{}; |
| 522 | DbusObjMaps sensorDbusObjMaps{}; |
Pavithra Barithaya | 51efaf8 | 2020-04-02 02:42:27 -0500 | [diff] [blame] | 523 | HostPDRHandler* hostPDRHandler; |
Brad Bishop | 5079ac4 | 2021-08-19 18:35:06 -0400 | [diff] [blame] | 524 | pldm::state_sensor::DbusToPLDMEvent* dbusToPLDMEventHandler; |
Tom Joseph | 33e9c7e | 2020-06-11 22:09:52 +0530 | [diff] [blame] | 525 | fru::Handler* fruHandler; |
Deepak Kodihalli | b5c227e | 2020-07-13 06:58:34 -0500 | [diff] [blame] | 526 | const pldm::utils::DBusHandler* dBusIntf; |
George Liu | a881c17 | 2021-06-21 18:28:11 +0800 | [diff] [blame] | 527 | pldm::responder::oem_platform::Handler* oemPlatformHandler = nullptr; |
Kamalkumar Patel | 3c50c82 | 2024-01-30 07:14:40 -0600 | [diff] [blame] | 528 | pldm::responder::platform_config::Handler* platformConfigHandler; |
Sagar Srinivas | 90314a3 | 2023-10-17 10:38:03 -0500 | [diff] [blame] | 529 | pldm::requester::Handler<pldm::requester::Request>* handler; |
Sampa Misra | 5fb37d5 | 2021-03-06 07:26:00 -0600 | [diff] [blame] | 530 | sdeventplus::Event& event; |
Kamalkumar Patel | 3c50c82 | 2024-01-30 07:14:40 -0600 | [diff] [blame] | 531 | fs::path pdrJsonDir; |
Deepak Kodihalli | b5c227e | 2020-07-13 06:58:34 -0500 | [diff] [blame] | 532 | bool pdrCreated; |
Kamalkumar Patel | 3c50c82 | 2024-01-30 07:14:40 -0600 | [diff] [blame] | 533 | std::vector<fs::path> pdrJsonsDir; |
Sampa Misra | 5fb37d5 | 2021-03-06 07:26:00 -0600 | [diff] [blame] | 534 | std::unique_ptr<sdeventplus::source::Defer> deferredGetPDREvent; |
Deepak Kodihalli | bc669f1 | 2019-11-28 08:52:07 -0600 | [diff] [blame] | 535 | }; |
| 536 | |
Sampa Misra | aea5dde | 2020-08-31 08:33:47 -0500 | [diff] [blame] | 537 | /** @brief Function to check if a sensor falls in OEM range |
| 538 | * A sensor is considered to be oem if either of entity |
| 539 | * type or state set or both falls in oem range |
| 540 | * |
| 541 | * @param[in] handler - the interface object |
| 542 | * @param[in] sensorId - sensor id |
| 543 | * @param[in] sensorRearmCount - sensor rearm count |
| 544 | * @param[out] compSensorCnt - composite sensor count |
| 545 | * @param[out] entityType - entity type |
| 546 | * @param[out] entityInstance - entity instance number |
| 547 | * @param[out] stateSetId - state set id |
Manojkiran Eda | a31ceb9 | 2021-07-22 09:19:02 +0530 | [diff] [blame] | 548 | * @param[out] containerId - container id |
Sampa Misra | aea5dde | 2020-08-31 08:33:47 -0500 | [diff] [blame] | 549 | * |
| 550 | * @return true if the sensor is OEM. All out parameters are invalid |
| 551 | * for a non OEM sensor |
| 552 | */ |
| 553 | bool isOemStateSensor(Handler& handler, uint16_t sensorId, |
| 554 | uint8_t sensorRearmCount, uint8_t& compSensorCnt, |
| 555 | uint16_t& entityType, uint16_t& entityInstance, |
Manojkiran Eda | a31ceb9 | 2021-07-22 09:19:02 +0530 | [diff] [blame] | 556 | uint16_t& stateSetId, uint16_t& containerId); |
Sampa Misra | aea5dde | 2020-08-31 08:33:47 -0500 | [diff] [blame] | 557 | |
| 558 | /** @brief Function to check if an effecter falls in OEM range |
| 559 | * An effecter is considered to be oem if either of entity |
| 560 | * type or state set or both falls in oem range |
| 561 | * |
| 562 | * @param[in] handler - the interface object |
| 563 | * @param[in] effecterId - effecter id |
| 564 | * @param[in] compEffecterCnt - composite effecter count |
| 565 | * @param[out] entityType - entity type |
| 566 | * @param[out] entityInstance - entity instance number |
| 567 | * @param[out] stateSetId - state set id |
| 568 | * |
| 569 | * @return true if the effecter is OEM. All out parameters are invalid |
| 570 | * for a non OEM effecter |
| 571 | */ |
| 572 | bool isOemStateEffecter(Handler& handler, uint16_t effecterId, |
| 573 | uint8_t compEffecterCnt, uint16_t& entityType, |
| 574 | uint16_t& entityInstance, uint16_t& stateSetId); |
| 575 | |
Deepak Kodihalli | bc669f1 | 2019-11-28 08:52:07 -0600 | [diff] [blame] | 576 | } // namespace platform |
Deepak Kodihalli | 557dfb0 | 2019-05-12 13:11:17 +0530 | [diff] [blame] | 577 | } // namespace responder |
| 578 | } // namespace pldm |