NVIDIA DriveOS Linux NSR SDK API Reference

7.0.3.0 Release
nvos_s3_tegra_log.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2019-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3  * SPDX-License-Identifier: LicenseRef-NvidiaProprietary
4  *
5  * NVIDIA CORPORATION and its licensors retain all intellectual property
6  * and proprietary rights in and to this software, related documentation
7  * and any modifications thereto. Any use, reproduction, disclosure or
8  * distribution of this software and related documentation without an express
9  * license agreement from NVIDIA CORPORATION is strictly prohibited
10  */
11 #ifndef INCLUDED_NVOS_S3_LOG_H
12 #define INCLUDED_NVOS_S3_LOG_H
13 
14 #include <stdint.h>
15 #if defined(__QNX__)
16 #include "qnx/nvos_log_codes.h"
17 #include "qnx/nvos_tegra_log_defs.h"
18 #elif defined(__linux__) || defined (_MSC_VER)
19 #include "linux/nvos_log_codes.h"
20 #include "linux/nvos_tegra_log_defs.h"
21 #elif NVOS_IS_HOS
22 #include "../../core-hos/include/hos/nvos_log_codes.h"
23 #include "../../core-hos/include/hos/nvos_tegra_log_defs.h"
24 #endif
25 
26 #include "nvos_tegra_log_codes.h"
27 
28 #if defined(__cplusplus)
29 extern "C"
30 {
31 #endif
32 
33 /* Define macro to replace boolean True */
34 #ifndef NvBoolTrue
35 #define NvBoolTrue ((NvBoolVar)0xBABAFACEU)
36 #endif
37 
38 /* Define macro to replace boolean False */
39 #ifndef NvBoolFalse
40 #define NvBoolFalse ((NvBoolVar)0x45450531U)
41 #endif
42 
43 /* Default slog2 buffer size = 28KB (= 7 pages) */
44 #define NVOS_LOG_BUF_SZ_DEFAULT (28U)
45 
46 /* Min slog2 buffer size in KB */
47 #define NVOS_LOG_BUF_SZ_MIN (4U)
48 
49 /* Max slog2 buffe size in KB */
50 #define NVOS_LOG_BUF_SZ_MAX (256U)
51 
52 
78  uint16_t module_id,
79  uint8_t severity,
80  const char *str);
81 
106  uint16_t module_id,
107  uint8_t severity,
108  const char *str1,
109  const char *str2);
110 
135  uint16_t module_id,
136  uint8_t severity,
137  const char *str,
138  int32_t val);
139 
164  uint16_t module_id,
165  uint8_t severity,
166  const char *str,
167  uint32_t val);
168 
193  uint16_t module_id,
194  uint8_t severity,
195  const char *str,
196  int64_t val);
197 
222  uint16_t module_id,
223  uint8_t severity,
224  const char *str,
225  uint64_t val);
226 
252  uint16_t module_id,
253  uint8_t severity,
254  const char *str,
255  int32_t value1,
256  int32_t value2);
257 
283  uint16_t module_id,
284  uint8_t severity,
285  const char *str,
286  int64_t value1,
287  int64_t value2);
288 
314  uint16_t module_id,
315  uint8_t severity,
316  const char *str,
317  uint32_t value1,
318  uint32_t value2);
319 
345  uint16_t module_id,
346  uint8_t severity,
347  const char *str,
348  uint64_t value1,
349  uint64_t value2);
350 
376  uint16_t module_id,
377  uint8_t severity,
378  const char *str,
379  uint32_t val);
380 
406  uint16_t module_id,
407  uint8_t severity,
408  const char *str,
409  uint64_t val);
410 
437  uint16_t module_id,
438  uint8_t severity,
439  const char *str,
440  uint64_t val1,
441  uint64_t val2);
442 
467  uint16_t module_id,
468  uint8_t severity,
469  const char *str,
470  float val);
471 
497  uint16_t module_id,
498  uint8_t severity,
499  const char *str,
500  float val1,
501  float val2);
502 
527  uint16_t module_id,
528  uint8_t severity,
529  const char *str,
530  double val);
531 
557  uint16_t module_id,
558  uint8_t severity,
559  const char *str,
560  double val1,
561  double val2);
562 
582 uint32_t NvOsIsLoggingReady(void);
583 
637 uint32_t NvOsInitializeLogging(const int32_t verbosity, const int32_t buf_size);
638 
639 #if defined(__cplusplus)
640 }
641 #endif
642 #endif /* INCLUDED_NVOS_S3_LOG_H */
643 
NvOsDebugPrintStrWith2SLong
void NvOsDebugPrintStrWith2SLong(uint16_t module_id, uint8_t severity, const char *str, int64_t value1, int64_t value2)
This function logs a string with two int64_t values in a log buffer.
NvOsDebugPrintStrWith2HexULong
void NvOsDebugPrintStrWith2HexULong(uint16_t module_id, uint8_t severity, const char *str, uint64_t val1, uint64_t val2)
This function logs a string and two uint64_t values in hexadecimal to a log buffer.
NvOsDebugPrintStrUInt
void NvOsDebugPrintStrUInt(uint16_t module_id, uint8_t severity, const char *str, uint32_t val)
This function logs a string and an uint32_t value in a log buffer.
NvOsDebugPrintStrSLong
void NvOsDebugPrintStrSLong(uint16_t module_id, uint8_t severity, const char *str, int64_t val)
This function logs a string and int64_t value in a log buffer.
NvOsDebugPrintStrULong
void NvOsDebugPrintStrULong(uint16_t module_id, uint8_t severity, const char *str, uint64_t val)
This function logs a string and uint64_t value in a log buffer.
NvOsIsLoggingReady
uint32_t NvOsIsLoggingReady(void)
Checks if logging via NvOS is available.
NvOsDebugPrintStrWith2ULong
void NvOsDebugPrintStrWith2ULong(uint16_t module_id, uint8_t severity, const char *str, uint64_t value1, uint64_t value2)
This function logs a string with two uint64_t values in a log buffer.
NvOsDebugPrintStrWith2Int
void NvOsDebugPrintStrWith2Int(uint16_t module_id, uint8_t severity, const char *str, int32_t value1, int32_t value2)
This function logs a string with two int32_t values in a log buffer.
NvOsInitializeLogging
uint32_t NvOsInitializeLogging(const int32_t verbosity, const int32_t buf_size)
Initialize logging for a client.
NvOsDebugPrintStrHexUInt
void NvOsDebugPrintStrHexUInt(uint16_t module_id, uint8_t severity, const char *str, uint32_t val)
This function logs a string and unsigned int value in hexadecimal to a log buffer.
NvOsDebugPrintStr
void NvOsDebugPrintStr(uint16_t module_id, uint8_t severity, const char *str)
This function logs a string in a log buffer.
NvOsDebugPrintStrDouble
void NvOsDebugPrintStrDouble(uint16_t module_id, uint8_t severity, const char *str, double val)
This function logs a string and a double value to a log buffer.
nvos_tegra_log_codes.h
NvOsDebugPrintStrHexULong
void NvOsDebugPrintStrHexULong(uint16_t module_id, uint8_t severity, const char *str, uint64_t val)
This function logs a string and uint64_t value in hexadecimal to a log buffer.
NvOsDebugPrintStrWith2Double
void NvOsDebugPrintStrWith2Double(uint16_t module_id, uint8_t severity, const char *str, double val1, double val2)
This function logs a string and two double values to a log buffer.
NvOsDebugPrintStrWith2Float
void NvOsDebugPrintStrWith2Float(uint16_t module_id, uint8_t severity, const char *str, float val1, float val2)
This function logs a string and two float values to a log buffer.
NvOsDebugPrintStrInt
void NvOsDebugPrintStrInt(uint16_t module_id, uint8_t severity, const char *str, int32_t val)
This function logs a string and int32_t value in a log buffer.
NvOsDebugPrintStrFloat
void NvOsDebugPrintStrFloat(uint16_t module_id, uint8_t severity, const char *str, float val)
This function logs a string and float value to a log buffer.
NvOsDebugPrintStrStr
void NvOsDebugPrintStrStr(uint16_t module_id, uint8_t severity, const char *str1, const char *str2)
This function logs two different strings in a log buffer.
NvOsDebugPrintStrWith2UInt
void NvOsDebugPrintStrWith2UInt(uint16_t module_id, uint8_t severity, const char *str, uint32_t value1, uint32_t value2)
This function logs a string with two uint32_t values in a log buffer.