TianoCore EDK2 master
|
#include <Uefi.h>
#include <RedfishCommon.h>
#include <Library/BaseLib.h>
#include <Library/DebugLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/RedfishDebugLib.h>
#include <Library/RedfishHttpLib.h>
#include <Library/UefiLib.h>
Go to the source code of this file.
Macros | |
#define | REDFISH_JSON_STRING_LENGTH 200 |
#define | REDFISH_JSON_OUTPUT_FORMAT (EDKII_JSON_COMPACT | EDKII_JSON_INDENT(2)) |
#define | REDFISH_PRINT_BUFFER_BYTES_PER_ROW 16 |
Functions | |
BOOLEAN | DebugRedfishComponentEnabled (IN UINT64 RedfishDebugCategory) |
EFI_STATUS | DumpRedfishValue (IN UINTN ErrorLevel, IN EDKII_REDFISH_VALUE *RedfishValue) |
EFI_STATUS | DumpJsonValue (IN UINTN ErrorLevel, IN EDKII_JSON_VALUE JsonValue) |
EFI_STATUS | DumpRedfishPayload (IN UINTN ErrorLevel, IN REDFISH_PAYLOAD Payload) |
EFI_STATUS | DumpHttpStatusCode (IN UINTN ErrorLevel, IN EFI_HTTP_STATUS_CODE HttpStatusCode) |
EFI_STATUS | DumpRedfishResponse (IN CONST CHAR8 *Message, IN UINTN ErrorLevel, IN REDFISH_RESPONSE *Response) |
EFI_STATUS | DumpIpv4Address (IN UINTN ErrorLevel, IN EFI_IPv4_ADDRESS *Ipv4Address) |
EFI_STATUS | DumpBuffer (IN UINTN ErrorLevel, IN UINT8 *Buffer, IN UINTN BufferSize) |
Redfish debug library to debug Redfish application.
Copyright (c) 2023-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved. Copyright (C) 2024 Advanced Micro Devices, Inc. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file RedfishDebugLib.c.
#define REDFISH_JSON_OUTPUT_FORMAT (EDKII_JSON_COMPACT | EDKII_JSON_INDENT(2)) |
Definition at line 21 of file RedfishDebugLib.c.
#define REDFISH_JSON_STRING_LENGTH 200 |
Definition at line 20 of file RedfishDebugLib.c.
#define REDFISH_PRINT_BUFFER_BYTES_PER_ROW 16 |
Definition at line 22 of file RedfishDebugLib.c.
BOOLEAN DebugRedfishComponentEnabled | ( | IN UINT64 | RedfishDebugCategory | ) |
Determine whether the Redfish debug category is enabled in gEfiRedfishPkgTokenSpaceGuid.PcdRedfishDebugCategory.
[in] | RedfishDebugCategory | Redfish debug category. |
TRUE | This debug category is enabled. |
FALSE | This debug category is disabled.. |
Definition at line 34 of file RedfishDebugLib.c.
Debug output raw data buffer.
[in] | ErrorLevel | DEBUG macro error level |
[in] | Buffer | Debug output data buffer. |
[in] | BufferSize | The size of Buffer in byte. |
EFI_SUCCESS | Debug dump finished. |
EFI_INVALID_PARAMETER | Buffer is NULL. |
Definition at line 349 of file RedfishDebugLib.c.
EFI_STATUS DumpHttpStatusCode | ( | IN UINTN | ErrorLevel, |
IN EFI_HTTP_STATUS_CODE | HttpStatusCode | ||
) |
This function dump the HTTP status code.
[in] | ErrorLevel | DEBUG macro error level |
[in] | HttpStatusCode | HTTP status code |
EFI_SUCCESS | HTTP status code is printed |
Definition at line 207 of file RedfishDebugLib.c.
EFI_STATUS DumpIpv4Address | ( | IN UINTN | ErrorLevel, |
IN EFI_IPv4_ADDRESS * | Ipv4Address | ||
) |
This function dump the IPv4 address in given error level.
[in] | ErrorLevel | DEBUG macro error level |
[in] | Ipv4Address | IPv4 address to dump |
EFI_SUCCESS | IPv4 address string is printed. |
Others | Errors occur. |
Definition at line 323 of file RedfishDebugLib.c.
EFI_STATUS DumpJsonValue | ( | IN UINTN | ErrorLevel, |
IN EDKII_JSON_VALUE | JsonValue | ||
) |
This function dump the Json string in given error level.
[in] | ErrorLevel | DEBUG macro error level |
[in] | JsonValue | Json value to dump. |
EFI_SUCCESS | Json string is printed. |
Others | Errors occur. |
Definition at line 117 of file RedfishDebugLib.c.
EFI_STATUS DumpRedfishPayload | ( | IN UINTN | ErrorLevel, |
IN REDFISH_PAYLOAD | Payload | ||
) |
This function dump the status code, header and body in given Redfish payload.
[in] | ErrorLevel | DEBUG macro error level |
[in] | Payload | Redfish payload to dump |
EFI_SUCCESS | Redfish payload is printed. |
Others | Errors occur. |
Definition at line 176 of file RedfishDebugLib.c.
EFI_STATUS DumpRedfishResponse | ( | IN CONST CHAR8 * | Message, |
IN UINTN | ErrorLevel, | ||
IN REDFISH_RESPONSE * | Response | ||
) |
This function dump the status code, header and body in given Redfish response.
[in] | Message | Message string |
[in] | ErrorLevel | DEBUG macro error level |
[in] | Response | Redfish response to dump |
EFI_SUCCESS | Redfish response is printed. |
Others | Errors occur. |
Definition at line 268 of file RedfishDebugLib.c.
EFI_STATUS DumpRedfishValue | ( | IN UINTN | ErrorLevel, |
IN EDKII_REDFISH_VALUE * | RedfishValue | ||
) |
Debug print the value of RedfishValue.
[in] | ErrorLevel | DEBUG macro error level. |
[in] | RedfishValue | The statement value to print. |
EFI_SUCCESS | RedfishValue is printed. |
EFI_INVALID_PARAMETER | RedfishValue is NULL. |
Definition at line 54 of file RedfishDebugLib.c.