GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> MSG / V3-1-2 > msg_st / rhel6-32
#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. |
CVS $Id: MSG_output.c,v 1.9 2011/03/25 01:05:53 apw Exp $
unsigned int MSG_attachOutputRtn | ( | MSG_OutputRtn ** | handle, | |
MSG_cb_OutputRtn * | rtn, | |||
void * | prm | |||
) |
Attach a message output callback routine.
handle | (out) Handle for identifying the callback (used to detach) | |
rtn | (in) Routine entry point | |
prm | (in) Routine parameter |
MSG_SUCCESS | Success | |
MSG_BADSTATE | Cannot attach output processors in the current MSG state | |
MSG_ALOCFAIL | Cannot allocate memory for the output routine description |
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.
handle | (in) Handle for identifying the callback (from attach call) |
MSG_SUCCESS | Success | |
MSG_BADSTATE | Cannot detach output processors in the current MSG state | |
MSG_OUTNTFND | Cannot find this output processor on the list |
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 | |||
) |
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_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().
static int nextToken | ( | char ** | fbeg, | |
char ** | fend | |||
) | [static] |
Find next token from formatting string.
fbeg | Point at which to start searching | |
fend | Pointer to end of search (plus one) |
0 | Plain text | |
1 | Conversion string |
Referenced by MSG_outputScan().