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>
This commit is contained in:
Nickle Wang
2023-07-04 21:12:44 +08:00
committed by mergify[bot]
parent 60475162a6
commit 96d691166f
2 changed files with 146 additions and 0 deletions

View File

@@ -11,12 +11,45 @@
#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.