platform-mc: Support GetPLDMVersion

`GetPLDMCommands` in DSP0240 v1.1.0 requires the PLDM supported type
version. In the current implementation, when detecting new MCTP
endpoint, `pldmd` always send `0xff 0xff 0xff 0xff` version to
`GetPLDMCommand` in discovery steps with the assumption that the
terminus will response for the request with any version of PLDM type.

Some termini don't accept `0xff 0xff 0xff 0xff` as input
version to `GetPLDMCommands` command because value `0xff` only has
meaning `A value of 0xFF in the "update" field indicates that the field
to be ignored.` in the `Section 12.6.1 Version field encoding` in `MCTP
Base spec` DSP0236 v1.3.1 but not in `PLDM base spec` DSP0240 v1.1.0
where `GetPLDMCommand` is detailed.

Support sending `GetPLDMVersion` from the supported PLDM types of one
terminus in the `discovery step` to get the PLDM version. And use that
version as input for `GetPLDMCommands` of that PLDM types to get
the supported PLDM commands.

Signed-off-by: Thu Nguyen <thu@os.amperecomputing.com>
Change-Id: Ia33c6722603801431e411eaf0647b74d8a1639d8
diff --git a/platform-mc/terminus_manager.hpp b/platform-mc/terminus_manager.hpp
index 2103fc5..8b7cd15 100644
--- a/platform-mc/terminus_manager.hpp
+++ b/platform-mc/terminus_manager.hpp
@@ -201,16 +201,29 @@
      */
     exec::task<int> getPLDMTypes(pldm_tid_t tid, uint64_t& supportedTypes);
 
+    /** @brief Send getPLDMVersion command to destination TID and then return
+     *         the version of the PLDM supported type.
+     *
+     *  @param[in] tid - Destination TID
+     *  @param[in] type - PLDM Type
+     *  @param[out] version - PLDM Type version
+     *  @return coroutine return_value - PLDM completion code
+     */
+    exec::task<int> getPLDMVersion(pldm_tid_t tid, uint8_t type,
+                                   ver32_t* version);
+
     /** @brief Send getPLDMCommands command to destination TID and then return
      *         the value of supportedCommands in reference parameter.
      *
      *  @param[in] tid - Destination TID
      *  @param[in] type - PLDM Type
+     *  @param[in] version - PLDM Type version
      *  @param[in] supportedCmds - Supported commands returned from terminus
      *                             for specific type
      *  @return coroutine return_value - PLDM completion code
      */
     exec::task<int> getPLDMCommands(pldm_tid_t tid, uint8_t type,
+                                    ver32_t version,
                                     bitfield8_t* supportedCmds);
 
     /** @brief Reference to a Handler object that manages the request/response