Change "mctp instance id" to "pldm instance id"
Instance IDs are the ids given from the instanceID database
to the PLDM request and response messages.
Its not a MCTP thing but rather related to the PLDM messages.
Change-Id: I6eda652ec86cba691b8b2b848ca0c9227e4c05dc
Signed-off-by: Pavithra Barithaya <pavithrabarithaya07@gmail.com>
diff --git a/util/dbus.cpp b/util/dbus.cpp
index b69b23f..ebbdf67 100644
--- a/util/dbus.cpp
+++ b/util/dbus.cpp
@@ -534,8 +534,8 @@
return true;
}
-/** @brief Get MCTP instance associated with endpoint */
-bool getMctpInstance(uint8_t& mctpInstance, uint8_t Eid)
+/** @brief Get PLDM instance associated with endpoint */
+bool getPldmInstanceID(uint8_t& pldmInstanceID, uint8_t Eid)
{
constexpr auto service = "xyz.openbmc_project.PLDM";
constexpr auto path = "/xyz/openbmc_project/pldm";
@@ -552,13 +552,13 @@
// append endpoint ID
method.append(Eid);
- // request MCTP instance ID
+ // request PLDM instance ID
auto reply = bus.call(method);
- reply.read(mctpInstance);
+ reply.read(pldmInstanceID);
}
catch (const sdbusplus::exception_t& e)
{
- trace::err("get MCTP instance exception");
+ trace::err("get PLDM instance exception");
trace::err(e.what());
return false;
}
diff --git a/util/dbus.hpp b/util/dbus.hpp
index 29851ee..3dcca49 100644
--- a/util/dbus.hpp
+++ b/util/dbus.hpp
@@ -198,14 +198,14 @@
uint16_t stateSetId);
/**
- * @brief Get MCTP instance ID associated with endpoint
+ * @brief Get PLDM instance ID associated with endpoint
*
- * @param[out] mctpInstance - instance of MCTP
+ * @param[out] pldmInstanceID - PLDM instance id
* @param[in] Eid - MCTP enpoint ID
*
* @return True on success otherwise False
*/
-bool getMctpInstance(uint8_t& mctpInstance, uint8_t Eid);
+bool getPldmInstanceID(uint8_t& pldmInstanceID, uint8_t Eid);
/**
* @brief Determine if power fault was detected
diff --git a/util/pldm.cpp b/util/pldm.cpp
index bbf2ce7..c161e51 100644
--- a/util/pldm.cpp
+++ b/util/pldm.cpp
@@ -50,9 +50,9 @@
uint16_t effecterId, uint8_t effecterCount, uint8_t stateIdPos,
uint8_t stateSetValue, uint8_t mctpEid)
{
- // get mctp instance associated with the endpoint ID
- uint8_t mctpInstance;
- if (!util::dbus::getMctpInstance(mctpInstance, mctpEid))
+ // get pldm instance associated with the endpoint ID
+ uint8_t pldmInstanceID;
+ if (!util::dbus::getPldmInstanceID(pldmInstanceID, mctpEid))
{
return std::vector<uint8_t>();
}
@@ -81,7 +81,8 @@
// encode the message with state data
auto requestMsg = reinterpret_cast<pldm_msg*>(request.data());
auto rc = encode_set_state_effecter_states_req(
- mctpInstance, effecterId, effecterCount, stateField.data(), requestMsg);
+ pldmInstanceID, effecterId, effecterCount, stateField.data(),
+ requestMsg);
if (rc != PLDM_SUCCESS)
{