TianoCore EDK2 master
Loading...
Searching...
No Matches
RedfishDebugLib.h
Go to the documentation of this file.
1
11#ifndef REDFISH_DEBUG_LIB_H_
12#define REDFISH_DEBUG_LIB_H_
13
14#include <Uefi.h>
15#include <Library/DebugLib.h>
16#include <RedfishServiceData.h>
18#include <Library/JsonLib.h>
19
21
22// Used with MdePKg DEBUG macro.
23#define DEBUG_REDFISH_NETWORK DEBUG_MANAGEABILITY
24#define DEBUG_REDFISH_HOST_INTERFACE DEBUG_MANAGEABILITY
25#define DEBUG_REDFISH_PLATFORM_CONFIG DEBUG_MANAGEABILITY
26
27//
28// Definitions of Redfish debug capability in Redfish component scope, used with DEBUG_REDFISH macro
29// For example, Redfish Platform Config Driver
30// DEBUG_REDFISH(DEBUG_REDFISH_PLATFORM_CONFIG_DXE, ...)
31//
32#define DEBUG_REDFISH_COMPONENT_PLATFORM_CONFIG_DXE 0x00000001
33
34#define DEBUG_REDFISH(DebugCategory, ...) \
35 do { \
36 if (!DebugPrintEnabled()) { \
37 break; \
38 } \
39 if (!DebugRedfishComponentEnabled (DebugCategory)) { \
40 break; \
41 } \
42 DEBUG ((DEBUG_MANAGEABILITY, ##__VA_ARGS__)); \
43 } while (FALSE)
44
54BOOLEAN
56 IN UINT64 DebugCategory
57 );
58
70 IN UINTN ErrorLevel,
71 IN EDKII_REDFISH_VALUE *RedfishValue
72 );
73
87 IN UINTN ErrorLevel,
88 IN EDKII_JSON_VALUE JsonValue
89 );
90
105 IN UINTN ErrorLevel,
106 IN REDFISH_PAYLOAD Payload
107 );
108
124 IN CONST CHAR8 *Message,
125 IN UINTN ErrorLevel,
126 IN REDFISH_RESPONSE *Response
127 );
128
141 IN UINTN ErrorLevel,
142 IN EFI_HTTP_STATUS_CODE HttpStatusCode
143 );
144
158 IN UINTN ErrorLevel,
159 IN EFI_IPv4_ADDRESS *Ipv4Address
160 );
161
175 IN UINTN ErrorLevel,
176 IN UINT8 *Buffer,
177 IN UINTN BufferSize
178 );
179
180#endif
UINT64 UINTN
#define CONST
Definition: Base.h:259
#define IN
Definition: Base.h:279
EFI_HTTP_STATUS_CODE
Definition: Http.h:59
EFI_STATUS DumpRedfishValue(IN UINTN ErrorLevel, IN EDKII_REDFISH_VALUE *RedfishValue)
EFI_STATUS DumpJsonValue(IN UINTN ErrorLevel, IN EDKII_JSON_VALUE JsonValue)
EFI_STATUS DumpHttpStatusCode(IN UINTN ErrorLevel, IN EFI_HTTP_STATUS_CODE HttpStatusCode)
EFI_STATUS DumpBuffer(IN UINTN ErrorLevel, IN UINT8 *Buffer, IN UINTN BufferSize)
EFI_STATUS DumpRedfishPayload(IN UINTN ErrorLevel, IN REDFISH_PAYLOAD Payload)
BOOLEAN DebugRedfishComponentEnabled(IN UINT64 DebugCategory)
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)
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29