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_output.c File Reference

Routines to output processors and output processing. More...

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <PBS/MBA.h>
#include <PBS/MTX.h>
#include <MDB/MDB_pubdefs.h>
#include <MSG/MSG_msgs.h>
#include <MSG_health.h>
#include <MSG_packet.ih>
#include <MSG_prvdefs.h>

Functions

static int nextToken (char **fbeg, char **fend)
 Find next token from formatting string.
unsigned int MSG_attachOutputRtn (MSG_OutputRtn **handle, MSG_cb_OutputRtn *rtn, void *prm)
 Attach a message output callback routine.
unsigned int MSG_detachOutputRtn (MSG_OutputRtn *handle)
 Detach a message callback routine.
FORK_cb_status MSG_outputScan (FORK_cb_prm *prm, FORK_msg_hdr *hdr)
 Call back the message output processing routines.


Detailed Description

Routines to output processors and output processing.

CVS $Id: MSG_output.c,v 1.9 2011/03/25 01:05:53 apw Exp $
Author:
A.P.Waite
MSG_output.c contains all the routines needed to attach, detach and scan output processors for the message system.

Function Documentation

unsigned int MSG_attachOutputRtn ( MSG_OutputRtn **  handle,
MSG_cb_OutputRtn rtn,
void *  prm 
)

Attach a message output callback routine.

Parameters:
handle (out) Handle for identifying the callback (used to detach)
rtn (in) Routine entry point
prm (in) Routine parameter
Return values:
MSG_SUCCESS Success
MSG_BADSTATE Cannot attach output processors in the current MSG state
MSG_ALOCFAIL Cannot allocate memory for the output routine description
MSG_attachOutputRtn() attaches a message output processing routine. Each routine attached is called once when the message system is starting, once per call to MSG_report(), and once when the message system is stopping.

In the single-threaded version of MSG, the attached routines are called directly by the MSG_report() routine. In the multi-threaded version of MSG the routines are called by the message processing task.

Output processing routines may only be attached/detached when the MSG system is in state MSG_S_INITIALIZED. This is true:

References MSG_mcb, MSG_MX_LOCK, MSG_MX_UNLOCK, MSG_S_INITIALIZED, _MSG_Control::mtx, _MSG_Control::out, and _MSG_Control::state.

unsigned int MSG_detachOutputRtn ( MSG_OutputRtn handle  ) 

Detach a message callback routine.

Parameters:
handle (in) Handle for identifying the callback (from attach call)
Return values:
MSG_SUCCESS Success
MSG_BADSTATE Cannot detach output processors in the current MSG state
MSG_OUTNTFND Cannot find this output processor on the list
MSG_detachOutputRtn() detaches an message output processing routine.

Output processing routines may only be attached/detached when the MSG system is in state MSG_S_INITIALIZED. This is true

References MSG_mcb, MSG_MX_LOCK, MSG_MX_UNLOCK, MSG_S_INITIALIZED, _MSG_Control::mtx, _MSG_OutputRtn::next, _MSG_Control::out, and _MSG_Control::state.

FORK_cb_status MSG_outputScan ( FORK_cb_prm *  prm,
FORK_msg_hdr *  hdr 
)

static int nextToken ( char **  fbeg,
char **  fend 
) [static]

Find next token from formatting string.

Parameters:
fbeg Point at which to start searching
fend Pointer to end of search (plus one)
Return values:
0 Plain text
1 Conversion string

Referenced by MSG_outputScan().


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