pldm: Add parsing JSON for Numeric Effecter PDR
According to spec DSP0248_1.2.0: 28.11 and effecter_pdr.json, parse JSON and generate PDR
structure.
In addition:
1. move the parsing generateNumericEffecterHandler method to pdr_numeric_effecter_pdr.hpp.
2. test/libpldmresponder_pdr_state_effecter_test.cpp renamed
test/libpldmresponder_pdr_effecter_test.cpp.
Tested with JSON files:
https://gist.github.com/lxwinspur/2c3fd68cdb35e06480c4a5f7890e3a06#file-effecter_pdr-json.
Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: I4254a14f0fd5e33b312f65c15c9a23437e28d341
diff --git a/libpldmresponder/platform.cpp b/libpldmresponder/platform.cpp
index eb08a8c..8d0cda0 100644
--- a/libpldmresponder/platform.cpp
+++ b/libpldmresponder/platform.cpp
@@ -1,6 +1,7 @@
#include "platform.hpp"
+#include "pdr_numeric_effecter.hpp"
#include "pdr_state_effecter.hpp"
#include "utils.hpp"
@@ -73,6 +74,11 @@
[this](const auto& json, RepoInterface& repo) {
pdr_state_effecter::generateStateEffecterPDR<Handler>(json, *this,
repo);
+ }},
+ {PLDM_NUMERIC_EFFECTER_PDR,
+ [this](const auto& json, RepoInterface& repo) {
+ pdr_numeric_effecter::generateNumericEffecterPDR<Handler>(
+ json, *this, repo);
}}};
Type pdrType{};