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

Constituent: test_msg_mt     Tag: rad750


Interface   Data Structures   File List   Data Fields   Globals  

MSG_testShotgun.c File Reference

Shotgun the MSG system. More...

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "PBS/MBA.h"
#include "PBS/PTS.h"
#include "PBS/QI.h"
#include "PBS/TASK.h"
#include "MSG/MSG_pubdefs.h"
#include "MSG/MSG_msgs.h"
#include "MSG_prvdefs.h"
#include "MSG_tstdefs.h"
#include "MTS_msgs.h"

Include dependency graph for MSG_testShotgun.c:

Include dependency graph

Data Structures

struct  _MSG_AllRx
 Structure to hold overall counters used in shotgun testing. More...

struct  _MSG_CountGrab
 Structure to hold a collection of instrumentation blocks. More...

struct  _MSG_CountPair
 Structure to hold start and reset instrumentation blocks. More...

struct  _MSG_TaskOpt
 Structure to hold a task setup block for shotgun testing. More...

struct  _MSG_TaskRx
 Structure to hold per task reception statistics. More...

struct  _MSG_TaskTx
 Structure to hold per task transmission statistics. More...

struct  _MSG_TestOpt
 Structure to hold a task setup block for shotgun testing. More...


Defines

#define MSG_L_SECS   10
 Number of seconds for which to accumulate.

#define MSG_N_TASK   8
 Number of tasks to spawn.

#define MSG_M_TASK   0x00000044
 Mask of tasks to report from interrupt.

#define MSG_M_TWOBEG   0x00000001
 Two begin blackouts in a row.

#define MSG_M_TWOEND   0x00000002
 Two end blackouts in a row.

#define MSG_M_BEGDED   0x00000004
 A begin gap message marked not reported.

#define MSG_M_BADMSG   0x00000008
 Unexpected message code back from MSG_report.

#define MSG_M_BADTSK   0x00000010
 Task number out of range.

#define MSG_M_BADTRC   0x00000020
 Bad trace number.

#define MSG_M_NULTBD   0x00000040
 TBD pointer is null.


Typedefs

typedef _MSG_TestOpt MSG_TestOpt
 Typedef for struct _MSG_TestOpt.

typedef _MSG_TaskTx MSG_TaskTx
 Typedef for struct _MSG_TaskTx.

typedef _MSG_TaskRx MSG_TaskRx
 Typedef for struct _MSG_TaskRx.

typedef _MSG_AllRx MSG_AllRx
 Typedef for struct _MSG_AllRx.

typedef _MSG_TaskOpt MSG_TaskOpt
 Typedef for struct _MSG_TaskOpt.

typedef _MSG_CountPair MSG_CountPair
 Typedef for struct _MSG_CountPair.

typedef _MSG_CountGrab MSG_CountGrab
 Typedef for struct _MSG_CountGrab.


Functions

void testShotgun (MSG_TestOpt *testOpt)
 Run the accumulation phase of the shotgun test.

void testShotgun_accumulate (unsigned int status, unsigned int dtim, unsigned int task)
 Statistics accumulation routine.

unsigned int testShotgun_analyze (void)
 Analyze the output from a shotgun run.

void testShotgun_cb (MSG_OutputModes mode, void *prm, const MSG_Message *msg)
 Output processor to capture statistics during shotgun test.

void testShotgun_counts_dump (void)
 Instrumentation block dump.

void testShotgun_counts_grab (void)
 Instrumentation grab.

void testShotgun_task (void *prm)
 Main routine of a shotgun test task.

void testTaskName (char *buf, int idx)
 Generate a task name.

WUT_cb_status testShotgun_tmr (void *prm, WUT_tmr *wut)
 Timer expiry callback routine.

unsigned int MSG_testShotgun ()
 Driver for the MSG shotgun test.


Variables

MSG_TestOpt testOpt [2]
 Options for a pair of tests ("relaxed" and "tense").

const char * s_state = "control state"
 The string "control state".

const char * s_status = "status value"
 The string "status value".

MSG_TaskTx taskTx [MSG_N_TASK<< 1]
 Statistics.

MSG_AllRx allRx
 Statistics.

MSG_CountGrab countGrab
 Instrumentation block stack.


Detailed Description

Shotgun the MSG system.

CVS $Id: MSG_testShotgun.c,v 1.8 2004/12/12 06:45:40 apw Exp $
Author:
A.P.Waite

Function Documentation

void testShotgun MSG_TestOpt testOpt  )  [static]
 

Run the accumulation phase of the shotgun test.

Parameters:
testOpt Test options (configuration)
testShotgun() runs the accumulation phase of the shotgun test.

Here is the call graph for this function:

void testShotgun_accumulate unsigned int  status,
unsigned int  dtim,
unsigned int  task
[static]
 

Statistics accumulation routine.

Parameters:
status (in) MSG code at exit from MSG_report() call
dtim (in) Delta time in MSG_report() (nanoseconds)
task (in) Task number

unsigned int testShotgun_analyze void   )  [static]
 

Analyze the output from a shotgun run.

testShotgun_analyze() analyzes the output from a shotgun run.

Here is the call graph for this function:

void testShotgun_cb MSG_OutputModes  mode,
void *  prm,
const MSG_Message *  msg
[static]
 

Output processor to capture statistics during shotgun test.

Parameters:
mode (in) Output processor call (init, normal or exit)
prm (in) User parameter (for this output processor)
msg (in) Message structure
testShotgun_cb() captures statistics on calls from different tasks running with different options in a shotgun test.

void testShotgun_task void *  prm  )  [static]
 

Main routine of a shotgun test task.

Parameters:
prm (in) User parameter (to parameterize the task)
testOptions_task() is the main routine of a task that randomly fires off messages. By running a number of these tasks in parallel with varying timing, priority, etc., the message system (and particularly the message servicing task) is subjected to a harsh workout.

Here is the call graph for this function:

WUT_cb_status testShotgun_tmr void *  prm,
WUT_tmr *  wut
[static]
 

Timer expiry callback routine.

Parameters:
prm (in) User parameter (to pass context from driving thread)
wut (in) The timer control block (not used)
testOptions_tmr() is the callback routine for a delay timer in each of the competing tasks. For all tasks except task 0, this routine simply wakes up the waiting task. For task 0 only, this routine calls MSG_report (thus testing MSG_report() calls from interrupt level).

Here is the call graph for this function:

void testTaskName char *  buf,
int  idx
[static]
 

Generate a task name.

Parameters:
buf (in) Buffer to use
idx (in) Task ID number (according to testShotgun)


Variable Documentation

testOpt
 

Initial value:

    { { MSG_N_TASK << 2, MSG_L_SECS,   0.000050, 0.001000, 0.000100 },
      { MSG_N_TASK,      MSG_L_SECS,   0.000050, 0.001000, 0.000100 } }
Options for a pair of tests ("relaxed" and "tense").


Generated on Sun Jul 17 10:07:48 2005 by doxygen 1.3.3