NVIDIA DriveOS Linux SDK API Reference

7.2.5.0 Early Access Release
nvos_s3_tegra_log.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2019-2026 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"
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 
88  uint16_t module_id,
89  uint8_t severity,
90  const char *str);
91 
123  uint16_t module_id,
124  uint8_t severity,
125  const char *str1,
126  const char *str2);
127 
159  uint16_t module_id,
160  uint8_t severity,
161  const char *str,
162  int32_t val);
163 
195  uint16_t module_id,
196  uint8_t severity,
197  const char *str,
198  uint32_t val);
199 
231  uint16_t module_id,
232  uint8_t severity,
233  const char *str,
234  int64_t val);
235 
267  uint16_t module_id,
268  uint8_t severity,
269  const char *str,
270  uint64_t val);
271 
304  uint16_t module_id,
305  uint8_t severity,
306  const char *str,
307  int32_t value1,
308  int32_t value2);
309 
342  uint16_t module_id,
343  uint8_t severity,
344  const char *str,
345  int64_t value1,
346  int64_t value2);
347 
380  uint16_t module_id,
381  uint8_t severity,
382  const char *str,
383  uint32_t value1,
384  uint32_t value2);
385 
418  uint16_t module_id,
419  uint8_t severity,
420  const char *str,
421  uint64_t value1,
422  uint64_t value2);
423 
456  uint16_t module_id,
457  uint8_t severity,
458  const char *str,
459  uint32_t val);
460 
493  uint16_t module_id,
494  uint8_t severity,
495  const char *str,
496  uint64_t val);
497 
531  uint16_t module_id,
532  uint8_t severity,
533  const char *str,
534  uint64_t val1,
535  uint64_t val2);
536 
568  uint16_t module_id,
569  uint8_t severity,
570  const char *str,
571  float val);
572 
605  uint16_t module_id,
606  uint8_t severity,
607  const char *str,
608  float val1,
609  float val2);
610 
642  uint16_t module_id,
643  uint8_t severity,
644  const char *str,
645  double val);
646 
679  uint16_t module_id,
680  uint8_t severity,
681  const char *str,
682  double val1,
683  double val2);
684 
711 uint32_t NvOsIsLoggingReady(void);
712 
773 uint32_t NvOsInitializeLogging(const int32_t verbosity, const int32_t buf_size);
774 
775 #if defined(__cplusplus)
776 }
777 #endif
778 #endif /* INCLUDED_NVOS_S3_LOG_H */
779 
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.
nvos_log_codes.h
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
nvos_tegra_log_defs.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.