pldmtool: Add GetStateEffecterStates command
Add GetStateEffecterStates command in pldmtool.
Used to get state effecter current and pending states
by supplying an effecter ID.
Tested:
```
root@bmc:~# pldmtool platform GetStateEffecterStates -h
get the state effecter states
Usage: pldmtool platform GetStateEffecterStates [OPTIONS]
Options:
-h,--help Print this help message and exit
-m,--mctp_eid UINT MCTP endpoint ID
-v,--verbose
-n,--retry-count UINT Number of retry when PLDM request message is failed
-i,--effecter_id UINT REQUIRED
Effecter ID that is used to identify and access the effecter
root@bmc:~# pldmtool platform GetStateEffecterStates -m 9 -i 348
{
"compositeEffecterCount": 1,
"effecterOpState[0])": "Effecter Enabled No Update Pending",
"pendingState[0]": 1,
"presentState[0]": 1
}
```
Change-Id: Ib72d2181dec955367310d6218628bb26952346b2
Signed-off-by: Tal Yacobi <talycb8@gmail.com>
diff --git a/pldmtool/pldm_base_cmd.cpp b/pldmtool/pldm_base_cmd.cpp
index 87152cd..3d94481 100644
--- a/pldmtool/pldm_base_cmd.cpp
+++ b/pldmtool/pldm_base_cmd.cpp
@@ -49,6 +49,7 @@
const std::map<const char*, pldm_platform_commands> pldmPlatformCmds{
{"SetNumericEffecterValue", PLDM_SET_NUMERIC_EFFECTER_VALUE},
{"SetStateEffecterStates", PLDM_SET_STATE_EFFECTER_STATES},
+ {"GetStateEffecterStates", PLDM_GET_STATE_EFFECTER_STATES},
{"GetPDR", PLDM_GET_PDR},
{"GetNumericEffecterValue", PLDM_GET_NUMERIC_EFFECTER_VALUE},
{"SetEventReceiver", PLDM_SET_EVENT_RECEIVER},