Change "mctp instance id" to "pldm instance id"

It's not a MCTP thing.

Change-Id: I922d28f848c8948d43ea4b8926d2310c8fb50228
Signed-off-by: Rashmica Gupta <rashmica@linux.ibm.com>
Signed-off-by: Lakshmi Yadlapati <lakshmiy@us.ibm.com>
diff --git a/pldm.cpp b/pldm.cpp
index a30c757..dc7a280 100644
--- a/pldm.cpp
+++ b/pldm.cpp
@@ -390,7 +390,7 @@
                                      CompositeEffecterCount effecterCount,
                                      uint8_t stateIdPos, uint8_t stateSetValue)
 {
-    if (!getMctpInstanceId())
+    if (!getPldmInstanceId())
     {
         return std::vector<uint8_t>();
     }
@@ -415,7 +415,7 @@
         }
     }
     auto rc = encode_set_state_effecter_states_req(
-        mctpInstance.value(), effecterId, effecterCount, stateField.data(),
+        pldmInstanceID.value(), effecterId, effecterCount, stateField.data(),
         requestMsg);
     if (rc != PLDM_SUCCESS)
     {
@@ -519,9 +519,9 @@
     }
 }
 
-bool Interface::getMctpInstanceId()
+bool Interface::getPldmInstanceId()
 {
-    if (!mctpInstance)
+    if (!pldmInstanceID)
     {
         // Request new instance ID
         auto& bus = open_power::occ::utils::getBus();
@@ -534,11 +534,11 @@
             auto reply = bus.call(method);
             uint8_t newInstanceId;
             reply.read(newInstanceId);
-            mctpInstance = newInstanceId;
+            pldmInstanceID = newInstanceId;
             if (!throttleTraces)
             {
                 log<level::INFO>(std::format("pldm: got new InstanceId: {}",
-                                             mctpInstance.value())
+                                             pldmInstanceID.value())
                                      .c_str());
             }
         }
@@ -557,9 +557,9 @@
 void Interface::sendPldm(const std::vector<uint8_t>& request,
                          const uint8_t instance, const bool rspExpected)
 {
-    if (!mctpInstance)
+    if (!pldmInstanceID)
     {
-        log<level::ERR>("sendPldm: No MCTP Instance ID found!");
+        log<level::ERR>("sendPldm: No PLDM Instance ID found!");
         return;
     }
 
@@ -588,7 +588,7 @@
             log<level::INFO>(
                 std::format(
                     "sendPldm: calling pldm_send(OCC{}, instance:{}, {} bytes)",
-                    instance, mctpInstance.value(), request.size())
+                    instance, pldmInstanceID.value(), request.size())
                     .c_str());
         }
         pldmResponseReceived = false;
@@ -643,7 +643,7 @@
         else
         {
             // Not waiting for response, instance ID should be freed
-            mctpInstance = std::nullopt;
+            pldmInstanceID = std::nullopt;
         }
         pldmClose();
     }
@@ -716,10 +716,10 @@
 
     auto pldmIface = static_cast<Interface*>(userData);
 
-    if (!pldmIface->mctpInstance)
+    if (!pldmIface->pldmInstanceID)
     {
         log<level::ERR>(
-            "pldmRspCallback: No outstanding MCTP Instance ID found");
+            "pldmRspCallback: No outstanding PLDM Instance ID found");
         return -1;
     }
 
@@ -730,10 +730,10 @@
     {
         log<level::INFO>(
             std::format("pldmRspCallback: calling pldm_recv() instance:{}",
-                        pldmIface->mctpInstance.value())
+                        pldmIface->pldmInstanceID.value())
                 .c_str());
     }
-    auto rc = pldm_recv(mctpEid, fd, pldmIface->mctpInstance.value(),
+    auto rc = pldm_recv(mctpEid, fd, pldmIface->pldmInstanceID.value(),
                         &responseMsg, &responseMsgSize);
     int lastErrno = errno;
     if (rc)
@@ -767,7 +767,7 @@
     }
 
     // instance ID should be freed
-    pldmIface->mctpInstance = std::nullopt;
+    pldmIface->pldmInstanceID = std::nullopt;
 
     // Set pointer to autodelete
     std::unique_ptr<uint8_t, decltype(std::free)*> responseMsgPtr{responseMsg,
@@ -858,10 +858,10 @@
 std::vector<uint8_t> Interface::encodeGetStateSensorRequest(uint8_t instance,
                                                             uint16_t sensorId)
 {
-    if (!getMctpInstanceId())
+    if (!getPldmInstanceId())
     {
         log<level::ERR>(
-            "encodeGetStateSensorRequest: failed to getMctpInstanceId");
+            "encodeGetStateSensorRequest: failed to getPldmInstanceId");
         return std::vector<uint8_t>();
     }
 
@@ -871,7 +871,7 @@
     std::vector<uint8_t> request(msgSize);
 
     auto msg = reinterpret_cast<pldm_msg*>(request.data());
-    auto msgRc = encode_get_state_sensor_readings_req(mctpInstance.value(),
+    auto msgRc = encode_get_state_sensor_readings_req(pldmInstanceID.value(),
                                                       sensorId, sRearm, 0, msg);
     if (msgRc != PLDM_SUCCESS)
     {
diff --git a/pldm.hpp b/pldm.hpp
index 1f878e5..5d093a1 100644
--- a/pldm.hpp
+++ b/pldm.hpp
@@ -149,9 +149,9 @@
     void setTraceThrottle(const bool throttle);
 
   private:
-    /** @brief MCTP instance number used in PLDM requests
+    /** @brief PLDM instance number used in PLDM requests
      */
-    std::optional<uint8_t> mctpInstance;
+    std::optional<uint8_t> pldmInstanceID;
 
     /** @brief Callback handler to be invoked when the state of the OCC
      *         changes
@@ -307,7 +307,7 @@
      *
      * @return true if the id was found and false if not
      */
-    bool getMctpInstanceId();
+    bool getPldmInstanceId();
 
     /** @brief Encode a GetStateSensor command into a PLDM request
      *  @param[in] instance - OCC instance number