GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> EMSG / V1-1-1 > emsg_st / rhel6-64


Interface   Data Structures   File List   Data Fields   Globals  

EMSG_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/FPA.h>
#include <EMSG/EMSG_msgs.h>
#include <EMSG_prvdefs.h>
#include <PBI/PTR.h>

Functions

unsigned int EMSG_attachOutputRtn (EMSG_OutputRtn **handle, EMSG_CbOutputRtn *rtn, void *prm)
 Attach a message output callback routine.
unsigned int EMSG_detachOutputRtn (EMSG_OutputRtn *handle)
 Detach a message callback routine.
unsigned int EMSG_outputScan (void *prm, void *hdr)
 Call back the message output processing routines.


Detailed Description

Routines to output processors and output processing.

This file contains all the routines needed to attach, detach and scan output processors for the message system.

Author:
A.P.Waite & Owen H Saxton
Id
EMSG_output.c,v 1.5 2011/03/25 21:37:59 saxton Exp

Function Documentation

unsigned int EMSG_attachOutputRtn ( EMSG_OutputRtn **  handle,
EMSG_CbOutputRtn rtn,
void *  prm 
)

Attach a message output callback routine.

This routine attaches a message output processing routine. Each routine attached is called once when the message system is starting, once per call to EMSG_report(), and once when the message system is stopping.

In the single-threaded version of MSG, the attached routines are called directly by the EMSG_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 message system is in state EMSG_S_INITIALIZED. This is true:

Parameters:
handle (out) Handle for identifying the callback (used to detach)
rtn (in) Routine entry point
prm (in) Routine parameter
Return values:
EMSG_SUCCESS Success
EMSG_BADSTATE Cannot attach output processors in the current message state
EMSG_ALOCFAIL Cannot allocate memory for the output routine description

References EMSG_mcb, EMSG_MX_LOCK, EMSG_MX_UNLOCK, EMSG_S_INITIALIZED, _EMSG_Control::out, and _EMSG_Control::state.

unsigned int EMSG_detachOutputRtn ( EMSG_OutputRtn handle  ) 

Detach a message callback routine.

This routine detaches an message output processing routine.

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

Parameters:
handle (in) Handle for identifying the callback (from attach call)
Return values:
EMSG_SUCCESS Success
EMSG_BADSTATE Cannot detach output processors in the current message state
EMSG_OUTNTFND Cannot find this output processor on the list

References EMSG_mcb, EMSG_MX_LOCK, EMSG_MX_UNLOCK, EMSG_S_INITIALIZED, _EMSG_OutputRtn::next, _EMSG_Control::out, and _EMSG_Control::state.

unsigned int EMSG_outputScan ( void *  prm,
void *  hdr 
)


Generated on Tue Sep 27 19:10:10 2011 by  doxygen 1.5.8