awt_trace.h File Reference

Trace management. More...

#include "awt_std.h"
#include <string.h>
#include <assert.h>
#include <stdlib.h>
#include <stdio.h>
#include <stdarg.h>
Include dependency graph for awt_trace.h:
This graph shows which files directly or indirectly include this file:

Defines

#define AWT_TRACE(lvl, fmt,...)   do { if (lvl) printer(#lvl":\t"fmt"\n", ## __VA_ARGS__); } while(0)
 Trace function.

Detailed Description

Trace management.

This header provides a trace function, which implementation will depend on hardware device.


Define Documentation

#define AWT_TRACE ( lvl,
fmt,
...   )     do { if (lvl) printer(#lvl":\t"fmt"\n", ## __VA_ARGS__); } while(0)

Trace function.

Parameters:
lvl level used to determine if the trace has to be done. Level must be an integer different of 0 to activate the trace.
fmt the format string, like in stdio functions
... the variable arguments to build the string to trace.
Note:
the level param name will be printed at the beginning of the trace line. AWT_TRACE call automatically creates a new line at the end.
 //For instance, using level created like that:
 #define DEBUG_LEVEL_EXEMPLE 1
 //used in a call like this one
 AWT_TRACE(DEBUG_LEVEL_EXEMPLE, "my format string with a number: [%d]", 42);
 //will produce:
 DEBUG_LEVEL_EXEMPLE       my format string with a number: [42]
 All Data Structures Files Functions Typedefs Enumerations Enumerator Defines
Generated on Fri Apr 8 19:30:01 2011 for ReadyAgent libraries by  doxygen 1.6.3