GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> EDS / V2-10-1 > edsd / linux-gcc


Interface   Data Structures   File List   Data Fields   Globals  

EDSD_print.c File Reference

Print demonstration and test routines. More...

#include "EDS/EDSD_print.h"
#include "EDS/EBF_dirPrint.h"
#include "EDS/EDA_cal.h"
#include "EDS/ECR_cal.h"
#include "EDS/EBF_mc.h"
#include "EDS/EDR_mcPrint.h"
#include "EDS/EDR_gemPrint.h"
#include "EDS/EDR_acd.h"
#include "EDS/EDR_acdUnpack.h"
#include "EDS/EDR_acdPrint.h"
#include "EDS/EDR_cal.h"
#include "EDS/EDR_calUnpack.h"
#include "EDS/EDR_calPrint.h"
#include "EDS/EDR_tkr.h"
#include "EDS/EDR_tkrUnpack.h"
#include "EDS/EDR_tkrPrint.h"
#include "EDS/EDR_err.h"
#include "EDS/EDR_errUnpack.h"
#include "EDS/ACD_unpack.h"
#include "EDS/ACD_rec.h"
#include "EDS/ACD_print.h"
#include "EDS/EBF_pktPrint.h"
#include "EDS/EBF_match.h"
#include "EDS/EBF_siv.h"
#include "EDS/EBF_dir.h"
#include "EDS/EBF_evt.h"
#include "EDS/EBF_cid.h"
#include "EDS/EBF_ctb.h"
#include "EDS/EBF_edw.h"
#include "EDS/FFS.h"
#include <stdlib.h>
#include <stdio.h>

Classes

struct  _EDSD_printCtl
 Print control block. More...

Typedefs

typedef struct
_EDSD_printCtl 
EDSD_printCtl
 Typedef for struct _EDSD_printCtl.

Functions

static void printRaw (const EBF_pkt *pkt, unsigned int psize, int enumber)
 Prints a very crude hex dump of the event to stdout.
static void printFull (EDS_fwEvt *evt, const EDSD_printCtl *ctl)
 Prints a highly formatted version of the event.
static int check (int status, const EBF_dir *dir)
 Allows certain errors to be ignored.
static int checkForErrs (EDSD_printCtl *ctl, unsigned int pktBytes, EBF_pkt *pkt, EBF_siv siv)
 Checks this packet for errors.
static __inline
unsigned int 
objectsGet (unsigned int request)
 Determine which objects are needed based on the print request.
static __inline
unsigned int 
needsGet (unsigned int request, unsigned int objects)
 Determine the scheduling needs based on the request and object list.
int EDSD_printSizeof (void)
 Returns the size, in bytes, of the control structure.
unsigned int EDSD_printProcess (EDSD_printCtl *ctl, unsigned int pktBytes, EBF_pkt *pkt, EBF_siv siv, EDS_fwIxb *ixb)
 Loops through the events, printing the contents to stdout.
void EDSD_printReport (const EDSD_printCtl *ctl)
 The reporting function.
int EDSD_printConstruct (EDSD_printCtl *ctl, unsigned int what)
 Allocates and initializes the unpacking buffers.
unsigned int EDSD_printNeedsGet (const EDSD_printCtl *ctl)
 Accessor function to return the scheduling needs.
unsigned int EDSD_printObjectsGet (const EDSD_printCtl *ctl)
 Accessor function to return the list of EDS_fw objects.
int EDSD_printDestruct (EDSD_printCtl *ctl)
 DeAllocates and the unpacking buffers.


Detailed Description

Print demonstration and test routines.

Author:
JJRussell - russell@slac.stanford.edu
   CVS $Id: EDSD_print.c,v 1.12 2009/05/07 00:51:25 russell Exp $

Function Documentation

static int check ( int  status,
const EBF_dir *  dir 
) [static]

Allows certain errors to be ignored.

Returns:
Either the original status or 0, if the only errors are ignorable ones
Parameters:
status The EBF directory status
dir The EBF directory
In the informal environment that this code runs in, certain errors can be tolerated. This routine defines those, allowing the code to plow forward.

static int checkForErrs ( EDSD_printCtl ctl,
unsigned int  pktBytes,
EBF_pkt *  pkt,
EBF_siv  siv 
) [static]

Checks this packet for errors.

Returns:
Non-zero if any errors are found
Parameters:
ctl The print control structure
pktBytes The number of bytes in this packet
pkt The packet
siv The State Information Vector

int EDSD_printConstruct ( EDSD_printCtl ctl,
unsigned int  what 
)

Allocates and initializes the unpacking buffers.

Returns:
Status
Parameters:
ctl Pointer to the control buffer
what Bit mask of what to print, see _EDSD_PRINT_M

int EDSD_printDestruct ( EDSD_printCtl ctl  ) 

DeAllocates and the unpacking buffers.

Returns:
Status
Parameters:
ctl Pointer to the control buffer

unsigned int EDSD_printNeedsGet ( const EDSD_printCtl ctl  ) 

Accessor function to return the scheduling needs.

Returns:
A bit mask of the scheduling needs
Parameters:
ctl The print control structure

unsigned int EDSD_printObjectsGet ( const EDSD_printCtl ctl  ) 

Accessor function to return the list of EDS_fw objects.

Returns:
A bit mask of the objects
Parameters:
ctl The print control structure

unsigned int EDSD_printProcess ( EDSD_printCtl ctl,
unsigned int  pktBytes,
EBF_pkt *  pkt,
EBF_siv  siv,
EDS_fwIxb *  ixb 
)

Loops through the events, printing the contents to stdout.

Parameters:
ctl Control structure dictating how many and what to print
pktBytes The number of bytes in the packet
pkt The packet to process
siv The state information vector
ixb The information exchange block

void EDSD_printReport ( const EDSD_printCtl ctl  ) 

The reporting function.

Parameters:
ctl The control parameters

int EDSD_printSizeof ( void   ) 

Returns the size, in bytes, of the control structure.

Returns:
The size, in bytes, of the control structure

static __inline unsigned int needsGet ( unsigned int  request,
unsigned int  objects 
) [static]

Determine the scheduling needs based on the request and object list.

Returns:
A bit mask of the scheduling needs
Parameters:
request The print request list
objects The object list

static __inline unsigned int objectsGet ( unsigned int  request  )  [static]

Determine which objects are needed based on the print request.

Returns:
A bit mask of the necessary objects
Parameters:
request The requested print list, as a list of EDSD_PRINT_M values

static void printFull ( EDS_fwEvt *  evt,
const EDSD_printCtl ctl 
) [static]

Prints a highly formatted version of the event.

Parameters:
evt The event structure
ctl Control parameters

static void printRaw ( const EBF_pkt *  pkt,
unsigned int  psize,
int  sequence 
) [static]

Prints a very crude hex dump of the event to stdout.

Parameters:
pkt Pointer to the packet to print
psize The packet size in bytes (includes header)
sequence The event sequence number.


Generated on Fri Feb 26 09:17:00 2010 by  doxygen 1.5.3