GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > MSG / V3-0-2

Constituent: msg2src     Tag: linux-gcc


Interface   Data Structures   File List   Data Fields   Globals  

MSG_report_st.c File Reference

Single-threaded specific implementations of utility routines. More...

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "PBS/MBA.h"
#include "MSG/MSG_pubdefs.h"
#include "MSG/MSG_msgs.h"
#include "MSG_prvdefs.h"

Include dependency graph for MSG_report_st.c:

Include dependency graph

Functions

MSG_Level MSG_getLevel ()
 Get the current reporting level.

const char * MSG_getTask ()
 Return pointer to task name.

unsigned short MSG_getTrace ()
 Get the current trace buffer number.

MSG_Level MSG_setLevel (MSG_Level newval)
 Set the current reporting level.

MSG_Level MSG_setLevel4Task (void **tbd, MSG_Level newval)
 No meaning in the single-threaded context ... call is ignored.

unsigned int MSG_setTask (const char *task)
 Set the task name.

unsigned short MSG_setTrace (unsigned short newval)
 Set the current trace buffer number.


Variables

MSG_TaskOption MSG_taskOption = { 1, MSG_D_LEVEL, MSG_D_TRACE }
 Static variable providing the reporting level and trace buffer number.

const char MSG_defaultTask [] = { "UND>" }
 Static variable providing a default task name.

const char * MSG_task = MSG_defaultTask
 Variable to record the task name.


Detailed Description

Single-threaded specific implementations of utility routines.

CVS $Id: MSG_report_st.c,v 1.3 2004/12/12 06:45:41 apw Exp $
Author:
A.P.Waite

Function Documentation

MSG_Level MSG_getLevel void   ) 
 

Get the current reporting level.

Returns:
The severity level for reporting
MSG_getLevel() returns the level at which messages are reported. Messages whose severity is greater than or equal to the level set are reported.

const char * MSG_getTask void   ) 
 

Return pointer to task name.

Returns:
Pointer to the string containing the task name
MSG_getTask() returns a pointer to the task name. This is the host side version where the task name is an arbitrary string under user control.

unsigned short MSG_getTrace void   ) 
 

Get the current trace buffer number.

Returns:
The trace buffer number for reporting
MSG_getTrace() returns the trace buffer number currently in effect. This is a 16-bit number associated with a message. All messages record the current value of the trace buffer number. This is a simple mechanism to group messages.

MSG_Level MSG_setLevel MSG_Level  newval  ) 
 

Set the current reporting level.

Parameters:
newval (in) Reporting level to be set
Returns:
Reporting level prior to the call
MSG_setLevel() sets the level at which messages are reported. A message whose severity is greater than or equal to the level set is reported. The routine returns the reporting level prior to the call (to allow simple reversion).

MSG_Level MSG_setLevel4Task void **  tbd,
MSG_Level  newval
 

No meaning in the single-threaded context ... call is ignored.

Parameters:
tbd (in) Pointer to arbitrary task's TBD block
newval (in) Reporting level to be set
Returns:
The reporting level for the only existing task/thread
MSG_setLevel4Task() is meaningless in the single-threaded context and is only provided to provide compatibility between the single-threaded and multi-threaded modules.

unsigned int MSG_setTask const char *  task  ) 
 

Set the task name.

Parameters:
task (in) Pointer to task name
Return values:
MSG_ALOCFAIL Could not allocate storage for task name string
MSG_TNM2LONG Task name too long
MSG_SUCCESS Success
MSG_setTask() sets a task name. This is only valid in the single-threaded environment where the task name is an arbitrary string under user control.

unsigned short MSG_setTrace unsigned short  newval  ) 
 

Set the current trace buffer number.

Parameters:
newval (in) Trace buffer number to set
Returns:
The trace buffer prior to the change
MSG_setTrace() sets the trace buffer number currently in effect. This is a 16-bit number associated with a message. All messages record the current value of the trace buffer number. This is a simple mechanism to group messages. The routine returns the trace buffer in effect prior to the call to make reversion simple.


Generated on Thu Sep 22 08:09:27 2005 by doxygen 1.3.3