Common constants, error codes, and enumerations shared across all NvLog components.
Provide client with an interface to control logging as follows:
Data Structures | |
| struct | NvLogCmd_t |
| Structure type for NvLog logging control command. More... | |
Macros | |
| #define | NVLOG_LLC_PID_FOR_GLOBAL (-1) |
| Special PID for global log level control. More... | |
| #define | NVLOG_DEFAULT_VM_LOG_LEVEL (NVOS_LOG_SEVERITY_INFO) |
| #define | EOK (0) |
| #define | NVLOG_USE_DEFAULT_TIMEOUT (0) |
Pass as timeout_ms to NvLog_Control() to use the default IPC command timeout (NVLOG_IPC_TIMEOUT_US = 1 second). More... | |
| #define | NVLOG_DT_NODE "/nvlog_gos" |
| #define | NVLOG_DT_STATUS "status" |
| #define | NVLOG_DT_IVC_CLIENT_EP_NAME "ivc_client_ep_name" |
| #define | NVLOG_SIGTERM (15) |
| #define | NVLOG_SIGABRT (6) |
| #define | NVLOG_SIGINT (2) |
| #define | NVLOG_VM_LOGGING_DISABLE (0xFFU) |
Functions | |
| NvLogError | NvLog_Open (void) |
| Opens and initializes the NvLog library. More... | |
| NvLogError | NvLog_Control (NvLogCmd_t *cmd, int32_t timeout_ms) |
| Controls logging operations. More... | |
| NvLogError | NvLog_Close (void) |
| Closes the NvLog library. More... | |
| #define EOK (0) |
Definition at line 39 of file nvlog_common_defs.h.
| #define NVLOG_DEFAULT_VM_LOG_LEVEL (NVOS_LOG_SEVERITY_INFO) |
Definition at line 34 of file nvlog_cmd_type.h.
| #define NVLOG_DT_IVC_CLIENT_EP_NAME "ivc_client_ep_name" |
DT property name for IVC client endpoint
Definition at line 57 of file nvlog_common_defs.h.
| #define NVLOG_DT_NODE "/nvlog_gos" |
DT node path for NvLog
Definition at line 51 of file nvlog_common_defs.h.
| #define NVLOG_DT_STATUS "status" |
DT property name for status
Definition at line 54 of file nvlog_common_defs.h.
| #define NVLOG_LLC_PID_FOR_GLOBAL (-1) |
Special PID for global log level control.
Definition at line 31 of file nvlog_cmd_type.h.
| #define NVLOG_SIGABRT (6) |
Abort signal
Definition at line 68 of file nvlog_common_defs.h.
| #define NVLOG_SIGINT (2) |
Interrupt signal (Ctrl+C)
Definition at line 71 of file nvlog_common_defs.h.
| #define NVLOG_SIGTERM (15) |
Termination signal
Definition at line 65 of file nvlog_common_defs.h.
| #define NVLOG_USE_DEFAULT_TIMEOUT (0) |
Pass as timeout_ms to NvLog_Control() to use the default IPC command timeout (NVLOG_IPC_TIMEOUT_US = 1 second).
Definition at line 43 of file nvlog_common_defs.h.
| #define NVLOG_VM_LOGGING_DISABLE (0xFFU) |
VM logging is disabled
Definition at line 74 of file nvlog_common_defs.h.
| enum NvLogAction |
Enum for NvLog control actions.
Action commands for logging control
Definition at line 113 of file nvlog_common_defs.h.
| enum NvLogError |
Enum for NvLog error codes.
Common error codes used across GOS and server
Definition at line 85 of file nvlog_common_defs.h.
| enum NvLogLevel |
Enum for NvLog log levels.
These values are directly assigned from NVOS_LOG_SEVERITY_* definitions from nvos_s3_tegra_log.h to ensure 1:1 mapping across all logging layers without translation overhead.
Definition at line 43 of file nvlog_cmd_type.h.
| enum NvLogTarget |
Enum for NvLog targets.
Target entities in the logging system
Definition at line 130 of file nvlog_common_defs.h.
| NvLogError NvLog_Close | ( | void | ) |
Closes the NvLog library.
This function closes the NvSciIpc endpoint, de-initializes NvSciIpc, and cleans up all resources.
| NVLOG_SUCCESS | if successful, otherwise an error code |
| NVLOG_ERROR_NOT_INITIALIZED | NvSciIpc connection is not initialized |
| NVLOG_ERROR_IPC_FAILED | Fail to close the established NvSciIpc connection |
| NVLOG_ERROR_MUTEX_FAILED | Fail to lock or unlock a mutex |
Usage considerations
| NvLogError NvLog_Control | ( | NvLogCmd_t * | cmd, |
| int32_t | timeout_ms | ||
| ) |
Controls logging operations.
This function supports various logging control actions such as enabling or disabling logging, flushing logs, and setting log levels for specific entities.
| [in] | cmd | Control parameters specifying the action and parameters Clients must fill cmd structure according to cmd->action.
|
| [in] | timeout_ms | Timeout in milliseconds for the operation. If NVLOG_USE_DEFAULT_TIMEOUT or negative, the default timeout (=500ms) will be used. |
| NVLOG_SUCCESS | if successful, otherwise an error code |
| NVLOG_ERROR_INVALID_PARAM | The parameter is invalid |
| NVLOG_ERROR_NOT_INITIALIZED | NvSciIpc connection is not initialized |
| NVLOG_ERROR_IPC_TIMEOUT | A command is not sent within the timeout_ms |
| NVLOG_ERROR_CMD_FAILED | A command is not successfully executed |
| NVLOG_ERROR_MUTEX_FAILED | Fail to lock or unlock a mutex |
Usage considerations
| NvLogError NvLog_Open | ( | void | ) |
Opens and initializes the NvLog library.
This function initializes the NvSciIpc, retrieves the NvSciIpc endpoint name from the device tree, opens the NvSciIpc endpoint and establish NvSciIpc connection.
| NVLOG_SUCCESS | if successful, otherwise an error code |
| NVLOG_ERROR_NOT_INITIALIZED | NvSciIpc connection for logging control is not established due to NvSciIpc communication failure or an internal error |
| NVLOG_ERROR_IPC_TIMEOUT | NvSciIpc connection for logging control is not established within a timeout |
| NVLOG_ERROR_ALREADY_INITIALIZED | NvSciIpc connection is already established |
| NVLOG_ERROR_DT_FAILED | Fail to find an NvSciIpc endpoint in the device tree |
| NVLOG_ERROR_MUTEX_FAILED | Fail to lock or unlock a mutex |
Usage considerations