GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> EMSG / V1-1-1 > emsg_st / rhel6-64


Interface   Data Structures   File List   Data Fields   Globals  

EMSG_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 <EMSG/EMSG_msgs.h>
#include <EMSG_prvdefs.h>

Functions

EMSG_Level EMSG_getLevel (void)
 Get the current reporting level.
const char * EMSG_getTask ()
 Return pointer to task name.
unsigned short EMSG_getTrace ()
 Get the current trace buffer number.
EMSG_Level EMSG_setLevel (EMSG_Level newval)
 Set the current reporting level.
EMSG_Level EMSG_setLevel4Task (int tid, EMSG_Level newval)
 Set the reporting level for a task.
unsigned int EMSG_setTask (const char *task)
 Set the task name.
unsigned short EMSG_setTrace (unsigned short newval)
 Set the current trace buffer number.
void EMSG_deleteOptions (void)
 Delete task options.


Detailed Description

Single-threaded specific implementations of utility routines.

Author:
A.P.Waite & Owen H Saxton
Id
EMSG_report_st.c,v 1.3 2011/03/25 21:37:59 saxton Exp

Function Documentation

void EMSG_deleteOptions ( void   ) 

Delete task options.

This routine deletes the options block associated with the current task. For the single-threaded case, this is a no-op.

EMSG_Level EMSG_getLevel ( void   ) 

Get the current reporting level.

This routine returns the level at which messages are reported. Messages whose severity is greater than or equal to the level set are reported.

Returns:
The severity level for reporting

Referenced by EMSG_report().

const char* EMSG_getTask ( void   ) 

Return pointer to task name.

This routine returns a pointer to the task name. This is the host side version where the task name is an arbitrary string under user control.

Returns:
Pointer to the string containing the task name

Referenced by EMSG_outputScan(), and EMSG_report().

unsigned short EMSG_getTrace ( void   ) 

Get the current trace buffer number.

This routine 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.

Returns:
The trace buffer number for reporting

Referenced by EMSG_outputScan(), and EMSG_report().

EMSG_Level EMSG_setLevel ( EMSG_Level  newval  ) 

Set the current reporting level.

This routine 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).

Parameters:
newval (in) Reporting level to be set
Returns:
Reporting level prior to the call

References EMSG_LVL_ERROR, and EMSG_LVL_SUCCESS.

EMSG_Level EMSG_setLevel4Task ( int  tid,
EMSG_Level  newval 
)

Set the reporting level for a task.

This routine is meaningless in the single-threaded context and is only provided to provide compatibility between the single-threaded and multi-threaded modules.

Parameters:
tid (in) Arbitrary task's ID
newval (in) Reporting level to be set
Returns:
The reporting level for the only existing task/thread

unsigned int EMSG_setTask ( const char *  task  ) 

Set the task name.

This routine sets a task name. This is only valid in the single- threaded environment where the task name is an arbitrary string under user control.

Parameters:
task (in) Pointer to task name
Return values:
EMSG_ALOCFAIL Could not allocate storage for task name string
EMSG_TNM2LONG Task name too long
EMSG_SUCCESS Success

References EMSG_L_TSKNAME, and emsg_report.

unsigned short EMSG_setTrace ( unsigned short  newval  ) 

Set the current trace buffer number.

This routine 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.

Parameters:
newval (in) Trace buffer number to set
Returns:
The trace buffer prior to the change


Generated on Tue Sep 27 19:10:11 2011 by  doxygen 1.5.8