GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> MSG / V3-1-2 > msg_mt / mv2304
#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_Control * | MSG_mcb |
Pointer to message control block structure. |
CVS $Id: MSG_prvdefs.h,v 1.13 2011/03/25 01:05:53 apw Exp $
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.
unsigned int MSG_getCtlThread | ( | void | ) |
Return the threading model.
0 | Single-threaded | |
1 | Multi-threaded |
FORK_cb_status MSG_outputScan | ( | FORK_cb_prm * | prm, | |
FORK_msg_hdr * | hdr | |||
) |
Call back the message output processing routines.
prm | (in) User context stored in fork control block | |
hdr | (in) Pointer to the message (complete packet). |
References _MSG_Control::acb, _MSG_Control::beg, _MSG_Packet::buf, _MSG_Message::code, _MSG_Control::cpu, _MSG_Message::cpu, _MSG_Control::drp, _MSG_Control::end, _MSG_Message::fac, _MSG_Control::fqi, _MSG_Counts::hwm, _MSG_Message::isr, _MSG_Packet::msg, MSG__packetFill(), MSG_A_GAPEND, MSG_alt, MSG_getTask(), MSG_getTrace(), MSG_isDrained(), MSG_K_FMT4BINT, MSG_K_FMT8BINT, MSG_K_FMTBITS, MSG_K_FMTDOUBLE, MSG_K_FMTSTRING, MSG_L_FMTLENGTH, MSG_L_TSKNAME, MSG_M_FMTBITS, MSG_mcb, MSG_OUT_NORMAL, MSG_S_STOPSYNC, _MSG_OutputRtn::next, nextToken(), _MSG_Message::nick, _MSG_Control::now, _MSG_Control::out, _MSG_Control::pkt_len, _MSG_OutputRtn::prm, _MSG_Control::reset, _MSG_OutputRtn::rtn, _MSG_Message::rtn, _MSG_Control::rwi, _MSG_Counts::sent, _MSG_Message::sev, _MSG_Control::start, _MSG_Control::state, _MSG_Message::task, _MSG_Message::tbd, _MSG_Message::text, and _MSG_Message::trace.
Referenced by MSG_reportInternal(), and MSG_startTask().
unsigned int MSG_reportInternal | ( | unsigned int | code, | |
WCT_time | hack, | |||
const char * | rtn, | |||
unsigned int | nprm, | |||
va_list | list | |||
) |
Process a message reporting request.
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 (!) |
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().
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().