GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > EMSG / V0-0-3

Constituent: emsg_mt     Tag: i845e


Interface   Data Structures   File List   Data Fields   Globals  

EMSG_report.c File Reference

Core run time routines for the message facility. More...

#include <stdio.h>
#include <stdarg.h>
#include <stdlib.h>
#include <string.h>
#include "EMSG/EMSG_msgs.h"
#include "EMSG_prvdefs.h"

Include dependency graph for EMSG_report.c:


Functions

unsigned int EMSG_report (unsigned int code, const char *rtn, unsigned int nprm,...)
 Process a message reporting request.

Detailed Description

Core run time routines for the message facility.

Author:
A.P.Waite & Owen H Saxton
Id
EMSG_report.c,v 1.2 2006/02/28 20:48:15 saxton Exp

Function Documentation

unsigned int EMSG_report unsigned int  code,
const char *  rtn,
unsigned int  nprm,
  ...
 

Process a message reporting request.

This routine reports a message. It allocates a message packet and populates it with a block of standard information (timestamp, CPU, task name, etc.) and the variable information in the variadic arguments following nprm.

The packet is sent to an message task (in the multi-threaded case) where the message is formatted using the formatting string associated with the message code. The message task then calls all output processors in turn to do whatever it is they want to do with the information.

In the single-threaded case, the message processing occurs inline with the routine call.

Parameters:
code (in) Message code to be reported
rtn (in) Name of calling routine (note 1)
nprm (in) Number of parameters that follow
Return values:
code Reflection of the first input argument, probably with "reported" bit set
Note:
  1. String must be persistent. Recommended method for the caller to provide this argument: don't call this routine directly, but use the emsg_report() macro, which will provide this argument automatically. If there is some necessity to call EMSG_report() directly, please use the compiler provided __func__ macro to fill in the routine name.
Warning:
Under normal circumstances, no-one should be calling this routine directly. It's far more convenient (and usually more accurate) to use the emsg_report() macro provided by the EMSG package. See note 1 above for the reason.


Generated on Thu Mar 8 09:42:01 2007 by  doxygen 1.4.4