libpldmresponder:Support GetNumericEffecterValue responder
The GetNumericEffecterValue command is used to return the present
numeric setting of a PLDM Numeric Effecter.
This commit adds responder support for GetNumericEffecterValue Cmd
as mentioned in Section22.3 of DSP0248_1.2.0.
Currently "effecterOperationalState" field in the response msg is
set to "enabled-noUpdatePending". Actual value can be fetched once
the support for EffecterEvent/SetNumericEffecterEnable is added.
Test:
Using pldmtool raw command
Success Case:
pldmtool raw -d 0x80 0x02 0x32 0x23 00
pldmtool: Tx: 08 01 80 02 32 23 00
pldmtool: Rx: 08 01 00 02 32 00 00 01 03 03
Failure Case:
pldmtool raw -d 0x80 0x02 0x32 0x25 0x00
pldmtool: Tx: 08 01 80 02 32 25 00
pldmtool: Rx: 08 01 00 02 32 80
Change-Id: I64a7205d8f69e3925b75b02558a0857b63c70ebf
Signed-off-by: Archana Kakani <archana.kakani@ibm.com>
diff --git a/libpldmresponder/pdr_utils.hpp b/libpldmresponder/pdr_utils.hpp
index b44120a..4a95ebe 100644
--- a/libpldmresponder/pdr_utils.hpp
+++ b/libpldmresponder/pdr_utils.hpp
@@ -242,6 +242,14 @@
std::vector<FruRecordDataFormat> parseFruRecordTable(const uint8_t* fruData,
size_t fruLen);
+/** @brief Return the size of data type based on the effecterDataSize enum value
+ *
+ * @param[in] effecterDataSize - Bitwidth and format of setting effecter value
+ * @return[out] Map the effecterDataSize enum value to datatype and return the
+ * size of dataType
+ */
+size_t getEffecterDataSize(uint8_t effecterDataSize);
+
} // namespace pdr_utils
} // namespace responder
} // namespace pldm