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

Constituent: msg_mt     Tag: linux-gcc


Interface   Data Structures   File List   Data Fields   Globals  

MSG_prvdefs.h File Reference

Private definitions for the MSG facility. More...

#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"

Include dependency graph for MSG_prvdefs.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Data Structures

struct  _MSG_AltMessage
 Alternative message table (used to improve internal efficiency). More...

struct  _MSG_Control
 Structure to hold the MSG control block. More...

struct  _MSG_OutputRtn
 Structure to hold an output processor (on a singly linked list). More...

struct  _MSG_Packet
 Structure to hold a complete message description packet. More...

struct  _MSG_TaskOption
 Per task reporting level and trace buffer options. More...


Defines

#define MSG_L_TSKNAME   16
 Maximum length of task name (incl. \0).

#define MSG_L_RTNNAME   32
 Maximum length of routine name (incl. \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 _MSG_Packet MSG_Packet
 Typedef for struct _MSG_Packet.

typedef _MSG_TaskOption MSG_TaskOption
 Typedef for struct _MSG_TaskOptions.

typedef _MSG_AltMessage MSG_AltMessage
 Typedef for struct _MSG_AltMessage.

typedef _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.

void MSG_getIP (unsigned char *ip)
 Get the IP address of the current node (if possible).

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.10 2005/07/16 19:46:32 apw Exp $
Author:
A.P.Waite

Enumeration Type Documentation

enum _MSG_States
 

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.

Enumeration values:
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.

void MSG_getIP unsigned char *  ip  ) 
 

Get the IP address of the current node (if possible).

Parameters:
ip (out) Pointer to four byte array, filled by this routine
In this host system version, MSG_getIP() will attempt identify the IP address of the current host using standard IP procedures. If anything goes wrong, this routine will fill in the IP address as '127.0.0.1' (i.e. "I'm me").

FORK_cb_status MSG_outputScan FORK_cb_prm *  prm,
FORK_msg_hdr *  hdr
 

Call back the message output processing routines.

Parameters:
prm (in) User context stored in fork control block
hdr (in) Pointer to the message (complete packet).
MSG_outputScan scans through attached output processors.

Here is the call graph for this function:

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.

Here is the call graph for this function:


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

MSG_Control* MSG_mcb  ) 
 

Pointer to message control block structure.

Pointer to the control block for the message system.


Generated on Sun Jul 17 09:55:45 2005 by doxygen 1.3.3