GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> MSG / V3-1-2 > msg_st / rhel6-32


Interface   Data Structures   File List   Data Fields   Globals  

MSG_prvdefs.h File Reference

Private definitions for the MSG facility. More...

#include <PBI/PTR.h>
#include <PBS/FORK.h>
#include <PBS/FPA.h>
#include <PBS/MTX.h>
#include <PBS/RW.ih>
#include <MDB/MDB_pubdefs.h>
#include <MSG/MSG_pubdefs.h>
#include <MSG_health.h>

Classes

struct  _MSG_Packet
 Structure to hold a complete message description packet. More...
struct  _MSG_OutputRtn
 Structure to hold an output processor (on a singly linked list). More...
struct  _MSG_TaskOption
 Per task reporting level and trace buffer options. More...
struct  _MSG_AltMessage
 Alternative message table (used to improve internal efficiency). More...
struct  _MSG_Control
 Structure to hold the MSG control block. More...

Defines

#define MSG_L_TSKNAME   ( 16 )
 Maximum length of task name (including \0).
#define MSG_L_RTNNAME   ( 32 )
 Maximum length of routine name (including \0).
#define MSG_D_TRACE   ( 0 )
 Default trace buffer number.
#define MSG_D_LEVEL   ( 0 )
 Default reporting level.
#define MSG_P_RESERVED   ( 2 )
 Packets reserved for blackout processing.
#define MSG_A_UNKNOWNS   ( 0 )
 Unknown code (severity "success").
#define MSG_A_UNKNOWNW   ( 1 )
 Unknown code (severity "warning").
#define MSG_A_UNKNOWNI   ( 2 )
 Unknown code (severity "information").
#define MSG_A_UNKNOWNE   ( 3 )
 Unknown code (severity "error").
#define MSG_A_UNIXGOOD   ( 4 )
 Unknown code (suspect Unix "good").
#define MSG_A_UNIXEROR   ( 5 )
 Unknown code (suspect Unix "error").
#define MSG_A_GAPBEGIN   ( 6 )
 Begin blackout message.
#define MSG_A_GAPEND   ( 7 )
 End blackout message.
#define MSG_L_ALTERNATE   ( 8 )
 Number of alternate messages.

Typedefs

typedef enum _MSG_States MSG_States
 Typedef for enum _MSG_States.
typedef struct _MSG_Packet MSG_Packet
 Typedef for struct _MSG_Packet.
typedef struct _MSG_TaskOption MSG_TaskOption
 Typedef for struct _MSG_TaskOptions.
typedef struct _MSG_AltMessage MSG_AltMessage
 Typedef for struct _MSG_AltMessage.
typedef struct _MSG_Control MSG_Control
 Typedef for struct _MSG_Control.

Enumerations

enum  _MSG_States {
  MSG_S_NOWHERE = 0,
  MSG_S_UNINITIALIZED = 1,
  MSG_S_INITIALIZED = 2,
  MSG_S_STARTED = 3,
  MSG_S_STOPPING = 4,
  MSG_S_STOPSYNC = 5
}
 Enumeration of states the message system can be in. More...

Functions

unsigned int MSG_getCtlThread (void)
 Return the threading model.
FORK_cb_status MSG_outputScan (FORK_cb_prm *prm, FORK_msg_hdr *hdr)
 Call back the message output processing routines.
unsigned int MSG_reportInternal (unsigned int code, WCT_time hack, const char *rtn, unsigned int nprm, va_list list)
 Process a message reporting request.

Variables

MSG_AltMessage MSG_alt [MSG_L_ALTERNATE]
 Translation table for the eight "special" messages.
MSG_ControlMSG_mcb
 Pointer to message control block structure.


Detailed Description

Private definitions for the MSG facility.

CVS $Id: MSG_prvdefs.h,v 1.13 2011/03/25 01:05:53 apw Exp $
Author:
A.P.Waite

Enumeration Type Documentation

Enumeration of states the message system can be in.

Reflects the current state of the message system. Used internally to keep the state diagram straight.

Enumerator:
MSG_S_NOWHERE  Before first initialization call
MSG_S_UNINITIALIZED  Uninitialized
MSG_S_INITIALIZED  Initialized
MSG_S_STARTED  Normal operations
MSG_S_STOPPING  Stop request queued to MSG task
MSG_S_STOPSYNC  Stop request seen in MSG task


Function Documentation

unsigned int MSG_getCtlThread ( void   ) 

Return the threading model.

Return values:
0 Single-threaded
1 Multi-threaded
The major use of MSG_getCtlThread() is testing.

FORK_cb_status MSG_outputScan ( FORK_cb_prm *  prm,
FORK_msg_hdr *  hdr 
)

unsigned int MSG_reportInternal ( unsigned int  code,
WCT_time  hack,
const char *  rtn,
unsigned int  nprm,
va_list  list 
)

Process a message reporting request.

Parameters:
code (in) Message code to be reported
hack (in) Wall clock time to be recorded with the meessage
rtn (in) Name of calling routine
nprm (in) Number of parameters that follow
list (in) A variable argument list list (!)
MSG_reportInternal() does most of the real work of reporting a message. This routine 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 MSG_report() call.

References _MSG_Control::acb, _MSG_Control::beg, _MSG_Counts::drop, _MSG_Control::drp, _MSG_Control::fqi, _MSG_Counts::lwm, MSG__packetFill(), MSG_A_GAPBEGIN, MSG_A_UNIXEROR, MSG_A_UNIXGOOD, MSG_alt, MSG_getLevel(), MSG_getTask(), MSG_getTrace(), MSG_K_FMT4BINT, MSG_mcb, MSG_outputScan(), MSG_RW_DECLARE, MSG_RW_LOCK, MSG_RW_UNLOCK, MSG_S_STARTED, _MSG_Control::now, reportCapture(), _MSG_Control::reset, _MSG_Control::rwi, _MSG_Control::start, and _MSG_Control::state.

Referenced by MSG_initialize().


Variable Documentation

MSG_AltMessage MSG_alt[MSG_L_ALTERNATE]

Translation table for the eight "special" messages.

Small database to make the substitution of alternative messages more efficient. The NULLs are replaced during the initialization phase (once only).

Referenced by MSG_initialize(), MSG_outputScan(), and MSG_reportInternal().

Pointer to message control block structure.

Pointer to the control block for the message system.

Referenced by MSG_attachOutputRtn(), MSG_detachOutputRtn(), MSG_outputScan(), MSG_reportInternal(), and reportCapture().


Generated on Tue Nov 29 16:54:51 2011 by  doxygen 1.5.8