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

Constituent: msg2src     Tag: linux-gcc


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"

Include dependency graph for MSG_output.c:

Include dependency graph

Functions

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.7 2005/07/16 19:46:32 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:

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

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:

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


Generated on Thu Sep 22 08:09:06 2005 by doxygen 1.3.3