GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> MSG / V3-1-2 > test_msg_st / sun-gcc


Interface   Data Structures   File List   Data Fields   Globals  

MSG_testBuffer.c File Reference

Various tests of buffering. More...

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

Defines

#define MSG_L_BUFTEST   ( 40 )
 Transit buffer length. Must be multiple of eight.
#define MSG_L_MSGTEST   ( 16 )
 Length of string used in test.

Functions

static void * testBuffer_task (void *prm)
 Main routine for buffering tests.
static unsigned int testBufferMsg (void)
 Test transit buffer overflows.
static void testBufferMsg_cb (MSG_OutputModes mode, void *prm, const MSG_Message *msg)
 Output processor to check buffer overflows.
unsigned int MSG_testBuffer ()
 Driver for the MSG buffering test suite.

Variables

static const char * s_state = "control state"
 The string "control state".
static const char * s_status = "status value"
 The string "status value".
static const char * s_taskname = "MaxLen_TaskName"
 A maximally long task name.
static const char digit [10] = { '-', '1', '2', '3', '4', '5', '6', '7', '8', '9' }
 Slightly off list of digits.


Detailed Description

Various tests of buffering.

CVS $Id: MSG_testBuffer.c,v 1.9 2011/03/25 01:05:53 apw Exp $
Author:
A.P.Waite

Function Documentation

static void * testBuffer_task ( void *  prm  )  [static]

Main routine for buffering tests.

Parameters:
prm (in) User parameter (not used)
testBuffer_task() walks through a variety of buffer boundary conditions.

References _EQ, MSG_action(), MSG_announceMajor(), MSG_announceMajorEnd(), MSG_announceMinor(), MSG_announceMinorEnd(), MSG_L_BUFTEST, MSG_testInt(), testBufferMsg(), and testBufferMsg_cb().

Referenced by MSG_testBuffer().

void testBufferMsg_cb ( MSG_OutputModes  mode,
void *  prm,
const MSG_Message *  msg 
) [static]

Output processor to check buffer overflows.

Parameters:
mode (in) Output processor call (init, normal or exit)
prm (in) User parameter (for this output processor)
msg (in) Message structure
testBufferMsg_cb() handles transit buffer overflow testing.

References i4, i8, MSG_action(), and MSG_L_BUFTEST.

Referenced by testBuffer_task().


Generated on Wed Nov 21 18:13:51 2012 by  doxygen 1.5.8