pldmtool: Add commands
Implement sending out and processing the response of the following commands : GetPDR, SetStateEffecterStates, SetDateTime
Tested:
$ pldmtool platform GetPDR -d 0
Encode request successfully
Request Message:
08 01 80 02 51 00 00 00 00 00 00 00 00 01 80 00 00 00
On first recv(),response == request : RC = 0
Total length: 46
Response Message:
08 01 00 02 51 00 02 00 00 00 00 00 00 00 01 1d 00 01 00 00 00 01 0b 00 00 13 00 00 00 01 00 21 00 00 00 00 00 00 00 00 00 01 c4 00 01 06
Parsed Response Msg:
recordHandle: 1
PDRHeaderVersion: 1
PDRType: 11
recordChangeNumber: 0
dataLength: 19
PLDMTerminusHandle: 0
effecterID: 1
entityType: 33
entityInstanceNumber: 0
containerID: 0
effecterSemanticID: 0
effecterInit: 0
effecterDescriptionPDR: false
compositeEffecterCount: 1
stateSetID: 196
possibleStatesSize: 1
possibleStates: 6
$ pldmtool platform SetStateEffecterStates -d 1 1 1
Encode request successfully
Request Message:
08 01 80 02 39 01 00 01 01 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00
On first recv(),response == request : RC = 0
Total length: 6
Response Message:
08 01 00 02 39 00
SetStateEffecterStates: SUCCESS
$ pldmtool bios SetDateTime -d 20191010080000
Encode request successfully
Request Message:
08 01 80 03 0d 00 00 08 10 10 19 20
On first recv(),response == request : RC = 0
Total length: 6
Response Message:
08 01 00 03 0d 00
SetDateTime: SUCCESS
Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: Ie13c7b05937ee3f150802d33c6e3434360c0b606
diff --git a/tool/pldm_bios_cmd.hpp b/tool/pldm_bios_cmd.hpp
index 4448f7e..cb80b0f 100644
--- a/tool/pldm_bios_cmd.hpp
+++ b/tool/pldm_bios_cmd.hpp
@@ -1,5 +1,4 @@
#pragma once
-
#include <CLI/CLI.hpp>
namespace pldmtool
@@ -9,6 +8,7 @@
{
void registerCommand(CLI::App& app);
-}
+
+} // namespace bios
} // namespace pldmtool