GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> EFC / V4-5-0 > efcprint / rhel5-64


Interface   Data Structures   File List   Data Fields   Globals  

EDM.c File Reference

Event Diagnostic Message services, implementation. More...

#include <stdio.h>
#include <stdarg.h>
#include <EFC/EDM.h>

Functions

int EDM_xPrintf (EDM_level message_level, EDM_level print_level, const char *format,...)
 Prints the message if message_level is >= print_level.
int EDM_debugPrintf (EDM_level print_level, const char *format,...)
 Prints the message if EDM_K_DEBUG is >= print_level.
int EDM_infoPrintf (EDM_level print_level, const char *format,...)
 Prints the message if EDM_K_INFO is >= print_level.
int EDM_warningPrintf (EDM_level print_level, const char *format,...)
 Prints the message if EDM_K_WARNING is >= print_level.
int EDM_errorPrintf (EDM_level print_level, const char *format,...)
 Prints the message if EDM_K_ERROR is >= print_level.
int EDM_fatalPrintf (EDM_level print_level, const char *format,...)
 Prints the message if EDM_K_ERROR is >= print_level.
int EDM_printf (const char *format,...)
 Unconditional print.


Detailed Description

Event Diagnostic Message services, implementation.

Author:
JJRussell - russell@slac.stanford.edu
 CVS $Id: EDM.c,v 1.3 2011/03/27 04:55:30 russell Exp $

The facility allows one to embed printf style statements in the program.


Function Documentation

int EDM_debugPrintf ( EDM_level  print_level,
const char *  format,
  ... 
)

Prints the message if EDM_K_DEBUG is >= print_level.

Returns:
The value of the resulting printf. If the result is 0, except in very pathology situations, it means the routine was not called because the message level is below the print level
Parameters:
print_level The print level, one of the enumeration EDM_level. This is generally a more global number controlling which level of messages get printed.
format The printf format statement
... The printf format arguments
This is just a convenience routine for calling EDM_xPrintf with a message level of EDM_K_DEBUG.

In general the caller should use the macro EDM_DEBUGPRINTF to access this routine. This macro can be compiled to a NOP when the code writer wishes to configure the same piece of code with and without the EDM facility as an active component.

References EDM_K_DEBUG.

int EDM_errorPrintf ( EDM_level  print_level,
const char *  format,
  ... 
)

Prints the message if EDM_K_ERROR is >= print_level.

Returns:
The value of the resulting printf. If the result is 0, except in very pathology situations, it means the routine was not called because the message level is below the print level
Parameters:
print_level The print level, one of the enumeration EDM_level. This is generally a more global number controlling which level of messages get printed.
format The printf format statement
... The printf format arguments
This is just a convenience routine for calling EDM_xPrintf with a message level of EDM_K_ERROR.

In general the caller should use the macro EDM_ERRORPRINTF to access this routine. This macro can be compiled to a NOP when the code writer wishes to configure the same piece of code with and without the EDM facility as an active component.

References EDM_K_ERROR.

int EDM_fatalPrintf ( EDM_level  print_level,
const char *  format,
  ... 
)

Prints the message if EDM_K_ERROR is >= print_level.

Returns:
The value of the resulting printf. If the result is 0, except in very pathology situations, it means the routine was not called because the message level is below the print level
Parameters:
print_level The print level, one of the enumeration EDM_level. This is generally a more global number controlling which level of messages get printed.
format The printf format statement
... The printf format arguments
This is just a convenience routine for calling EDM_xPrintf with a message level of EDM_K_FATAL.

In general the caller should use the macro EDM_FATALPRINTF to access this routine. This macro can be compiled to a NOP when the code writer wishes to configure the same piece of code with and without the EDM facility as an active component.

References EDM_K_FATAL.

int EDM_infoPrintf ( EDM_level  print_level,
const char *  format,
  ... 
)

Prints the message if EDM_K_INFO is >= print_level.

Returns:
The value of the resulting printf. If the result is 0, except in very pathology situations, it means the routine was not called because the message level is below the print level
Parameters:
print_level The print level, one of the enumeration EDM_level. This is generally a more global number controlling which level of messages get printed.
format The printf format statement
... The printf format arguments
This is just a convenience routine for calling EDM_xPrintf with a message level of EDM_K_INFO.

In general the caller should use the macro EDM_INFOPRINTF to access this routine. This macro can be compiled to a NOP when the code writer wishes to configure the same piece of code with and without the EDM facility as an active component.

References EDM_K_INFO.

int EDM_printf ( const char *  format,
  ... 
)

Unconditional print.

Returns:
The value of the resulting printf. If the result is 0, except in very pathology situations, it means the routine was not called because the message level is below the print level
Parameters:
format The printf format statement
... The printf format arguments
In general the caller should use the macro EDM_PRINTF to access this routine. This macro can be compiled to a NOP when the code writer wishes to configure the same piece of code with and without the EDM facility as an active component.

int EDM_warningPrintf ( EDM_level  print_level,
const char *  format,
  ... 
)

Prints the message if EDM_K_WARNING is >= print_level.

Returns:
The value of the resulting printf. If the result is 0, except in very pathology situations, it means the routine was not called because the message level is below the print level
Parameters:
print_level The print level, one of the enumeration EDM_level. This is generally a more global number controlling which level of messages get printed.
format The printf format statement
... The printf format arguments
This is just a convenience routine for calling EDM_xPrintf with a message level of EDM_K_WARNING.

In general the caller should use the macro EDM_WARNINGPRINTF to access this routine. This macro can be compiled to a NOP when the code writer wishes to configure the same piece of code with and without the EDM facility as an active component.

References EDM_K_WARNING.

int EDM_xPrintf ( EDM_level  message_level,
EDM_level  print_level,
const char *  format,
  ... 
)

Prints the message if message_level is >= print_level.

Returns:
The value of the resulting printf. If the result is 0, except in very pathology situations, it means the routine was not called because the message level is below the print level
Parameters:
message_level The message level, one of the enumeration EDM_level. This is number is generally associated with a particular message
print_level The print level, one of the enumeration EDM_level. This is generally a more global number controlling which level of messages get printed.
format The printf format statement
... The printf format arguments
In general the caller should use the macro EDM_XPRINTF to access this routine. This macro can be compiled to a NOP when the code writer wishes to configure the same piece of code with and without the EDM facility as an active component


Generated on Wed Jan 4 14:13:44 2012 by  doxygen 1.5.8