ANSI C Based OPC UA Client/Server SDK  1.9.0.430
UaBaseTrace

Functions

OpcUa_Void UaBase_Trace_SetLocalTimeTrace (OpcUa_Boolean a_isLocalTimeTrace)
 Configure if local time or UTC timetamps are used for the trace. More...
 
OpcUa_Boolean UaBase_Trace_GetLocalTimeTrace ()
 Get the current setting for LocalTimeTrace. More...
 
OpcUa_Void UaBase_Trace_SetPrintDateInTrace (OpcUa_Boolean a_printDateInTrace)
 Configure if the date should be included in the trace output. More...
 
OpcUa_Boolean UaBase_Trace_GetPrintDateInTrace ()
 Get the current setting for PrintDateInTrace. More...
 
OpcUa_Void UaBase_ConsoleTrace_Enable ()
 Enable tracing to the console (stdout). More...
 
OpcUa_Void UaBase_ConsoleTrace_Disable ()
 Disable tracing to the console (stdout). More...
 
OpcUa_Boolean UaBase_ConsoleTrace_GetEnabled ()
 Get the current setting for tracing to the console. More...
 
OpcUa_StatusCode UaBase_FileTrace_Enable (OpcUa_String *a_pTraceFile, OpcUa_UInt32 a_maxTraceEntries, OpcUa_UInt32 a_numBackupFiles, OpcUa_String *a_pApplicationName, OpcUa_String *a_pApplicationVersion)
 Enable tracing to file. More...
 
OpcUa_StatusCode UaBase_FileTrace_Modify (OpcUa_String *a_pTraceFile, OpcUa_UInt32 a_maxTraceEntries, OpcUa_UInt32 a_numBackupFiles)
 Modify the file trace settings. More...
 
OpcUa_StatusCode UaBase_FileTrace_Disable ()
 Disable tracing to file. More...
 
OpcUa_Boolean UaBase_FileTrace_GetEnabled ()
 Check if the FileTrace is enabled. More...
 
OpcUa_StatusCode UaBase_FileTrace_GetTraceFile (OpcUa_String *a_pTraceFile)
 Get the trace file name. More...
 
OpcUa_UInt32 UaBase_FileTrace_GetMaxTraceEntries ()
 Get the maximum number of trace entries per file. More...
 
OpcUa_UInt32 UaBase_FileTrace_GetNumBackupFiles ()
 Get the maximum number of backup files. More...
 
OpcUa_StatusCode UaBase_FileTrace_SetApplicationName (OpcUa_String *a_pApplicationName)
 Set the name of the application to use for the file trace. More...
 
OpcUa_StatusCode UaBase_FileTrace_SetApplicationVersion (OpcUa_String *a_pApplicationVersion)
 Set the version of the application to use for the file trace. More...
 
OpcUa_Void UaBase_FileTrace_SetFlushDisabled (OpcUa_Boolean a_isFlushDisabled)
 Configure flushing the trace file after each entry. More...
 
OpcUa_Boolean UaBase_FileTrace_GetFlushDisabled ()
 Get the current setting for FlushDisabled. More...
 
OpcUa_Void UaBase_FileTrace_FlushTrace ()
 Flush the currently used trace file manually. More...
 
OpcUa_StatusCode UaBase_Trace_GetTraceConfigFromSettings (UaBase_Settings *a_pSettings)
 Retrieve the trace configuration from settings and apply it. More...
 

Detailed Description

Function Documentation

OpcUa_Void UaBase_ConsoleTrace_Disable ( )

Disable tracing to the console (stdout).

OpcUa_Void UaBase_ConsoleTrace_Enable ( )

Enable tracing to the console (stdout).

OpcUa_Boolean UaBase_ConsoleTrace_GetEnabled ( )

Get the current setting for tracing to the console.

Returns
OpcUa_True if the console trace is enabled.
OpcUa_StatusCode UaBase_FileTrace_Disable ( )

Disable tracing to file.

OpcUa_StatusCode UaBase_FileTrace_Enable ( OpcUa_String a_pTraceFile,
OpcUa_UInt32  a_maxTraceEntries,
OpcUa_UInt32  a_numBackupFiles,
OpcUa_String a_pApplicationName,
OpcUa_String a_pApplicationVersion 
)

Enable tracing to file.

If the file trace is already enabled (can be tested with UaBase_FileTrace_GetEnabled), use UaBase_FileTrace_Modify instead.

Parameters
a_pTraceFileThe name of the file to use.
a_maxTraceEntriesMaximum number of trace entries in one file.
a_numBackupFilesMaximum number of backup files.
a_pApplicationNameOptional: the name of the application, will be printed on top of the trace.
a_pApplicationVersionOptional: the version of the application, will be printed on top of the trace.
OpcUa_Void UaBase_FileTrace_FlushTrace ( )

Flush the currently used trace file manually.

OpcUa_Boolean UaBase_FileTrace_GetEnabled ( )

Check if the FileTrace is enabled.

OpcUa_Boolean UaBase_FileTrace_GetFlushDisabled ( )

Get the current setting for FlushDisabled.

OpcUa_UInt32 UaBase_FileTrace_GetMaxTraceEntries ( )

Get the maximum number of trace entries per file.

OpcUa_UInt32 UaBase_FileTrace_GetNumBackupFiles ( )

Get the maximum number of backup files.

OpcUa_StatusCode UaBase_FileTrace_GetTraceFile ( OpcUa_String a_pTraceFile)

Get the trace file name.

OpcUa_StatusCode UaBase_FileTrace_Modify ( OpcUa_String a_pTraceFile,
OpcUa_UInt32  a_maxTraceEntries,
OpcUa_UInt32  a_numBackupFiles 
)

Modify the file trace settings.

Parameters
a_pTraceFileThe name of the file to use.
a_maxTraceEntriesMaximum number of trace entries in one file.
a_numBackupFilesMaximum number of backup files.
OpcUa_StatusCode UaBase_FileTrace_SetApplicationName ( OpcUa_String a_pApplicationName)

Set the name of the application to use for the file trace.

OpcUa_StatusCode UaBase_FileTrace_SetApplicationVersion ( OpcUa_String a_pApplicationVersion)

Set the version of the application to use for the file trace.

OpcUa_Void UaBase_FileTrace_SetFlushDisabled ( OpcUa_Boolean  a_isFlushDisabled)

Configure flushing the trace file after each entry.

The trace file is flushed automatically from time to time anyway.

  • For maximum trace performance you should set this option to true.
  • If you have issues with missing trace entries in case of an application crash, you should set this option to false.
OpcUa_Boolean UaBase_Trace_GetLocalTimeTrace ( )

Get the current setting for LocalTimeTrace.

Returns
OpcUa_True if local time is used for trace timestamps.
OpcUa_False if UTC time is used for trace timestamps.
OpcUa_Boolean UaBase_Trace_GetPrintDateInTrace ( )

Get the current setting for PrintDateInTrace.

Returns
OpcUa_True if date and time are included in the trace output.
OpcUa_False if only the time is included in the trace output.
OpcUa_StatusCode UaBase_Trace_GetTraceConfigFromSettings ( UaBase_Settings a_pSettings)

Retrieve the trace configuration from settings and apply it.

OpcUa_Void UaBase_Trace_SetLocalTimeTrace ( OpcUa_Boolean  a_isLocalTimeTrace)

Configure if local time or UTC timetamps are used for the trace.

Parameters
a_isLocalTimeTracePass OpcUa_True to use local time, OpcUa_False to use UTC time for trace timestamps.
OpcUa_Void UaBase_Trace_SetPrintDateInTrace ( OpcUa_Boolean  a_printDateInTrace)

Configure if the date should be included in the trace output.

Parameters
a_printDateInTracePass OpcUa_True to include date and time in the trace output.