Macros
USBLib_Trace.h File Reference
#include "conf_stdio.h"
Include dependency graph for USBLib_Trace.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define DYN_TRACES   0
 
#define DYNTRACE   0
 
#define TRACE_DEBUG(...)   { }
 
#define TRACE_DEBUG_WP(...)   { }
 
#define TRACE_ERROR(...)   { printf("-E- " __VA_ARGS__); }
 
#define TRACE_ERROR_WP(...)   { printf(__VA_ARGS__); }
 
#define TRACE_FATAL(...)   { printf("-F- " __VA_ARGS__); while (1); }
 
#define TRACE_FATAL_WP(...)   { printf(__VA_ARGS__); while (1); }
 
#define TRACE_INFO(...)   { printf("-I- " __VA_ARGS__); }
 
#define TRACE_INFO_WP(...)   { printf(__VA_ARGS__); }
 
#define TRACE_LEVEL   TRACE_LEVEL_INFO
 
#define TRACE_LEVEL_DEBUG   5
 
#define TRACE_LEVEL_ERROR   2
 
#define TRACE_LEVEL_FATAL   1
 
#define TRACE_LEVEL_INFO   4
 
#define TRACE_LEVEL_NO_TRACE   0
 
#define TRACE_LEVEL_WARNING   3
 
#define TRACE_WARNING(...)   { printf("-W- " __VA_ARGS__); }
 
#define TRACE_WARNING_WP(...)   { printf(__VA_ARGS__); }
 
#define USBLIB_VERSION   "1.0"
 

Detailed Description

Purpose

Standard output methods for reporting debug information, warnings and errors, which can be easily be turned on/off.

Usage
  1. Initialize the debug message port in application, for stdio printf().
  2. Uses the TRACE_DEBUG(), TRACE_INFO(), TRACE_WARNING(), TRACE_ERROR() TRACE_FATAL() macros to output traces throughout the program.
  3. Each type of trace has a level : Debug 5, Info 4, Warning 3, Error 2 and Fatal 1. Disable a group of traces by changing the value of TRACE_LEVEL during compilation; traces with a level bigger than TRACE_LEVEL are not generated. To generate no trace, use the reserved value 0.
  4. Trace disabling can be static or dynamic. If dynamic disabling is selected the trace level can be modified in runtime. If static disabling is selected the disabled traces are not compiled.
traceLevels Trace level description
  1. TRACE_DEBUG (5): Traces whose only purpose is for debugging the program, and which do not produce meaningful information otherwise.
  2. TRACE_INFO (4): Informational trace about the program execution. Should enable the user to see the execution flow.
  3. TRACE_WARNING (3): Indicates that a minor error has happened. In most case it can be discarded safely; it may even be expected.
  4. TRACE_ERROR (2): Indicates an error which may not stop the program execution, but which indicates there is a problem with the code.
  5. TRACE_FATAL (1): Indicates a major error which prevents the program from going any further.

Definition in file USBLib_Trace.h.

Macro Definition Documentation

◆ DYN_TRACES

#define DYN_TRACES   0

Definition at line 93 of file USBLib_Trace.h.

◆ DYNTRACE

#define DYNTRACE   0

Definition at line 115 of file USBLib_Trace.h.

◆ TRACE_DEBUG

#define TRACE_DEBUG (   ...)    { }

Outputs a formatted string using 'printf' if the log level is high enough. Can be disabled by defining TRACE_LEVEL=0 during compilation.

Parameters
...Additional parameters depending on formatted string.

Definition at line 161 of file USBLib_Trace.h.

◆ TRACE_DEBUG_WP

#define TRACE_DEBUG_WP (   ...)    { }

Definition at line 162 of file USBLib_Trace.h.

◆ TRACE_ERROR

#define TRACE_ERROR (   ...)    { printf("-E- " __VA_ARGS__); }

Definition at line 182 of file USBLib_Trace.h.

◆ TRACE_ERROR_WP

#define TRACE_ERROR_WP (   ...)    { printf(__VA_ARGS__); }

Definition at line 183 of file USBLib_Trace.h.

◆ TRACE_FATAL

#define TRACE_FATAL (   ...)    { printf("-F- " __VA_ARGS__); while (1); }

Definition at line 190 of file USBLib_Trace.h.

◆ TRACE_FATAL_WP

#define TRACE_FATAL_WP (   ...)    { printf(__VA_ARGS__); while (1); }

Definition at line 191 of file USBLib_Trace.h.

◆ TRACE_INFO

#define TRACE_INFO (   ...)    { printf("-I- " __VA_ARGS__); }

Definition at line 166 of file USBLib_Trace.h.

◆ TRACE_INFO_WP

#define TRACE_INFO_WP (   ...)    { printf(__VA_ARGS__); }

Definition at line 167 of file USBLib_Trace.h.

◆ TRACE_LEVEL

#define TRACE_LEVEL   TRACE_LEVEL_INFO

Definition at line 88 of file USBLib_Trace.h.

◆ TRACE_LEVEL_DEBUG

#define TRACE_LEVEL_DEBUG   5

Definition at line 79 of file USBLib_Trace.h.

◆ TRACE_LEVEL_ERROR

#define TRACE_LEVEL_ERROR   2

Definition at line 82 of file USBLib_Trace.h.

◆ TRACE_LEVEL_FATAL

#define TRACE_LEVEL_FATAL   1

Definition at line 83 of file USBLib_Trace.h.

◆ TRACE_LEVEL_INFO

#define TRACE_LEVEL_INFO   4

Definition at line 80 of file USBLib_Trace.h.

◆ TRACE_LEVEL_NO_TRACE

#define TRACE_LEVEL_NO_TRACE   0

Definition at line 84 of file USBLib_Trace.h.

◆ TRACE_LEVEL_WARNING

#define TRACE_LEVEL_WARNING   3

Definition at line 81 of file USBLib_Trace.h.

◆ TRACE_WARNING

#define TRACE_WARNING (   ...)    { printf("-W- " __VA_ARGS__); }

Definition at line 174 of file USBLib_Trace.h.

◆ TRACE_WARNING_WP

#define TRACE_WARNING_WP (   ...)    { printf(__VA_ARGS__); }

Definition at line 175 of file USBLib_Trace.h.

◆ USBLIB_VERSION

#define USBLIB_VERSION   "1.0"

Softpack Version

Definition at line 77 of file USBLib_Trace.h.



inertial_sense_ros
Author(s):
autogenerated on Sat Sep 19 2020 03:19:07