Loading [MathJax]/extensions/tex2jax.js
  • <xmp id="om0om">
  • <table id="om0om"><noscript id="om0om"></noscript></table>
  • NVIDIA DRIVE OS Linux SDK API Reference

    6.0.9 Release
    All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
    nvsipl::INvSIPLTrace Class Referenceabstract

    Detailed Description

    Defines the public interfaces to control the logging/tracing of SIPL.

    Definition at line 32 of file NvSIPLTrace.hpp.

    Public Types

    enum  TraceLevel {
      LevelNone = 0,
      LevelError,
      LevelWarning,
      LevelInfo,
      LevelDebug
    }
     Defines the tracing/logging levels. More...
     
    using TraceFuncPtr = void(*)(const char *, int)
     

    Public Member Functions

    virtual void SetHook (TraceFuncPtr pfnTraceHook, bool bCallDefaultRenderer)=0
     Sets a callable trace hook. More...
     
    virtual void SetLevel (TraceLevel eLevel)=0
     Sets the log level. More...
     
    virtual void DisableLineInfo (void)=0
     Disable line info (FUNCTION : LINE: ) prefix. More...
     
    virtual ~INvSIPLTrace ()=default
     Default destructor. More...
     

    Static Public Member Functions

    static INvSIPLTraceGetInstance (void)
     Gets a handle to INvSIPLTrace instance. More...
     

    Member Typedef Documentation

    ◆ TraceFuncPtr

    using nvsipl::INvSIPLTrace::TraceFuncPtr = void(*)(const char*, int)

    Definition at line 46 of file NvSIPLTrace.hpp.

    Member Enumeration Documentation

    ◆ TraceLevel

    Defines the tracing/logging levels.

    Enumerator
    LevelNone 

    Indicates logging is turned off.

    LevelError 

    Indicates logging is turned on for errors.

    LevelWarning 

    Indicates logging is turned on for critical warnings.

    LevelInfo 

    Indicates logging is turned on for information level messages.

    LevelDebug 

    Indicates logging is turned on for every print statement.

    Definition at line 37 of file NvSIPLTrace.hpp.

    Constructor & Destructor Documentation

    ◆ ~INvSIPLTrace()

    virtual nvsipl::INvSIPLTrace::~INvSIPLTrace ( )
    virtualdefault

    Default destructor.

    Member Function Documentation

    ◆ DisableLineInfo()

    virtual void nvsipl::INvSIPLTrace::DisableLineInfo ( void  )
    pure virtual

    Disable line info (FUNCTION : LINE: ) prefix.

    Function to disable line information prefix. Each log/trace is prefixed with function name and the line number. Calling this function will disable the prefix.

    Precondition
    None.


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: No
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: Yes, with the following conditions:
      • Grants: nonroot, allow
      • Abilities: public_channel
      • Application needs to have access to the SGIDs that SIPL depends on as mentioned in the NVIDIA DRIVE OS Safety Developer Guide
    • API group
      • Init: Yes
      • Runtime: No
      • De-Init: No

    ◆ GetInstance()

    static INvSIPLTrace* nvsipl::INvSIPLTrace::GetInstance ( void  )
    static

    Gets a handle to INvSIPLTrace instance.

    Static function to get a handle to singleton INvSIPLTrace implementation object.

    Precondition
    None.
    Returns
    A pointer to INvSIPLTrace.


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: No
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: Yes, with the following conditions:
      • Grants: nonroot, allow
      • Abilities: public_channel
      • Application needs to have access to the SGIDs that SIPL depends on as mentioned in the NVIDIA DRIVE OS Safety Developer Guide
    • API group
      • Init: Yes
      • Runtime: No
      • De-Init: No

    ◆ SetHook()

    virtual void nvsipl::INvSIPLTrace::SetHook ( TraceFuncPtr  pfnTraceHook,
    bool  bCallDefaultRenderer 
    )
    pure virtual

    Sets a callable trace hook.

    Function to set a callable hook to receive the messages from the library.

    Parameters
    [in]pfnTraceHookstd::function object, which could be a functor, function pointer, or a lambda. The function object should take const @ char* message and number of chars as arguments.
    Precondition
    None.
    Parameters
    [in]bCallDefaultRendererBoolean flag indicating if the message should be printed to the default renderer (stderr).


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: No
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: Yes, with the following conditions:
      • Grants: nonroot, allow
      • Abilities: public_channel
      • Application needs to have access to the SGIDs that SIPL depends on as mentioned in the NVIDIA DRIVE OS Safety Developer Guide
    • API group
      • Init: Yes
      • Runtime: No
      • De-Init: No

    ◆ SetLevel()

    virtual void nvsipl::INvSIPLTrace::SetLevel ( TraceLevel  eLevel)
    pure virtual

    Sets the log level.

    Function to set the level of logging. Each trace statement specifies a trace level for that statement, and all traces with a level greater than or equal to the current application trace level will be rendered at runtime. Traces with a level below the application trace level will be ignored. The application trace level can be changed at any time to render additional or fewer trace statements.

    Precondition
    None.
    Parameters
    [in]eLevelTrace level TraceLevel.


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: No
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: Yes, with the following conditions:
      • Grants: nonroot, allow
      • Abilities: public_channel
      • Application needs to have access to the SGIDs that SIPL depends on as mentioned in the NVIDIA DRIVE OS Safety Developer Guide
    • API group
      • Init: Yes
      • Runtime: No
      • De-Init: No

    The documentation for this class was generated from the following file:
    人人超碰97caoporen国产