summaryrefslogtreecommitdiffstats
path: root/RedfishPkg/Include
diff options
context:
space:
mode:
authorNickle Wang <nicklew@nvidia.com>2023-07-04 21:12:44 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2023-07-06 14:12:27 +0000
commit96d691166f07b7ed422f9536832edadc0aea35c9 (patch)
treec4f5cabb860ab5e183ba894e423c62639577b2c1 /RedfishPkg/Include
parent60475162a66a73426cd971174bb3cd853a4619cf (diff)
downloadedk2-96d691166f07b7ed422f9536832edadc0aea35c9.tar.gz
edk2-96d691166f07b7ed422f9536832edadc0aea35c9.tar.bz2
edk2-96d691166f07b7ed422f9536832edadc0aea35c9.zip
RedfishPkg/RedfishDebugLib: add new interfaces
Introduce DumpHiiStatementValue() and DumpRedfishValue() to RedfishDebugLib. Application uses these functions to debug print the value of HII_STATEMENT_VALUE and EDKII_REDFISH_VALUE. Signed-off-by: Nickle Wang <nicklew@nvidia.com> Cc: Abner Chang <abner.chang@amd.com> Cc: Igor Kulchytskyy <igork@ami.com> Reviewed-by: Abner Chang <abner.chang@amd.com>
Diffstat (limited to 'RedfishPkg/Include')
-rw-r--r--RedfishPkg/Include/Library/RedfishDebugLib.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/RedfishPkg/Include/Library/RedfishDebugLib.h b/RedfishPkg/Include/Library/RedfishDebugLib.h
index 73f1469ac6..da7e0d0bc9 100644
--- a/RedfishPkg/Include/Library/RedfishDebugLib.h
+++ b/RedfishPkg/Include/Library/RedfishDebugLib.h
@@ -11,13 +11,46 @@
#define REDFISH_DEBUG_LIB_H_
#include <Uefi.h>
+#include <Library/HiiUtilityLib.h>
#include <Library/JsonLib.h>
#include <Library/RedfishLib.h>
+#include <Protocol/EdkIIRedfishPlatformConfig.h>
+
#define DEBUG_REDFISH_NETWORK DEBUG_MANAGEABILITY ///< Debug error level for Redfish networking function
#define DEBUG_REDFISH_HOST_INTERFACE DEBUG_MANAGEABILITY ///< Debug error level for Redfish networking function
/**
+ Debug print the value of StatementValue.
+
+ @param[in] ErrorLevel DEBUG macro error level.
+ @param[in] StatementValue The statement value to print.
+
+ @retval EFI_SUCCESS StatementValue is printed.
+ @retval EFI_INVALID_PARAMETER StatementValue is NULL.
+**/
+EFI_STATUS
+DumpHiiStatementValue (
+ IN UINTN ErrorLevel,
+ IN HII_STATEMENT_VALUE *StatementValue
+ );
+
+/**
+ Debug print the value of RedfishValue.
+
+ @param[in] ErrorLevel DEBUG macro error level.
+ @param[in] RedfishValue The statement value to print.
+
+ @retval EFI_SUCCESS RedfishValue is printed.
+ @retval EFI_INVALID_PARAMETER RedfishValue is NULL.
+**/
+EFI_STATUS
+DumpRedfishValue (
+ IN UINTN ErrorLevel,
+ IN EDKII_REDFISH_VALUE *RedfishValue
+ );
+
+/**
This function dump the Json string in given error level.