GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> EDS / V2-12-1 > edsd / rhel5-32
#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 <PBI/FFS.ih>
#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. |
CVS $Id: EDSD_print.c,v 1.14 2011/11/11 23:06:06 russell Exp $
static int check | ( | int | status, | |
const EBF_dir * | dir | |||
) | [static] |
Allows certain errors to be ignored.
status | The EBF directory status | |
dir | The EBF directory |
References EBF_EBW_M_RSP, EBF_EBW_M_SRC, EBF_ESW_M_DGNBLK, EBF_MATCH_M_EBW_ERRORS, and EBF_MATCH_M_ESW_ERRORS.
Referenced by EDSD_printProcess().
static int checkForErrs | ( | EDSD_printCtl * | ctl, | |
unsigned int | pktBytes, | |||
EBF_pkt * | pkt, | |||
EBF_siv | siv | |||
) | [static] |
Checks this packet for errors.
ctl | The print control structure | |
pktBytes | The number of bytes in this packet | |
pkt | The packet | |
siv | The State Information Vector |
References _EBF_ebw::bf, EBF_EBW_LEN_TO_BYTES, EBF_ESW_M_TRGPERR, _EDSD_printCtl::left, and _EBF_esw::ui.
Referenced by EDSD_printProcess().
int EDSD_printConstruct | ( | EDSD_printCtl * | ctl, | |
unsigned int | what | |||
) |
Allocates and initializes the unpacking buffers.
ctl | Pointer to the control buffer | |
what | Bit mask of what to print, see _EDSD_PRINT_M |
References _EDSD_printCtl::idx, _EDSD_printCtl::in_err, _EDSD_printCtl::left, _EDSD_printCtl::needs, needsGet(), _EDSD_printCtl::objects, objectsGet(), _EDSD_printCtl::sequence, and _EDSD_printCtl::what.
int EDSD_printDestruct | ( | EDSD_printCtl * | ctl | ) |
DeAllocates and the unpacking buffers.
ctl | Pointer to the control buffer |
unsigned int EDSD_printNeedsGet | ( | const EDSD_printCtl * | ctl | ) |
Accessor function to return the scheduling needs.
ctl | The print control structure |
References _EDSD_printCtl::needs.
unsigned int EDSD_printObjectsGet | ( | const EDSD_printCtl * | ctl | ) |
Accessor function to return the list of EDS_fw objects.
ctl | The print control structure |
References _EDSD_printCtl::objects.
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.
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 |
References check(), checkForErrs(), EDSD_PRINT_M_ACD, EDSD_PRINT_M_ACDP, EDSD_PRINT_M_CAL, EDSD_PRINT_M_DGN, EDSD_PRINT_M_DIR, EDSD_PRINT_M_ERR, EDSD_PRINT_M_GEM, EDSD_PRINT_M_MC, EDSD_PRINT_M_RAW, EDSD_PRINT_M_TKR, _EDSD_printCtl::evt, _EDSD_printCtl::idx, _EDSD_printCtl::in_err, printFull(), printRaw(), and _EDSD_printCtl::what.
void EDSD_printReport | ( | const EDSD_printCtl * | ctl | ) |
The reporting function.
ctl | The control parameters |
int EDSD_printSizeof | ( | void | ) |
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.
request | The print request list | |
objects | The object list |
References EDSD_PRINT_M_ERR, EDSD_PRINT_M_MC, EDSD_PRINT_M_ON_ERR, EDSD_PRINT_M_RAW, and _EDSD_printCtl::needs.
Referenced by EDSD_printConstruct().
static __inline unsigned int objectsGet | ( | unsigned int | request | ) | [static] |
Determine which objects are needed based on the print request.
request | The requested print list, as a list of EDSD_PRINT_M values |
References EDSD_PRINT_M_ACD, EDSD_PRINT_M_ACDP, EDSD_PRINT_M_CAL, EDSD_PRINT_M_DGN, EDSD_PRINT_M_DIR, EDSD_PRINT_M_eCAL, EDSD_PRINT_M_ECAL, EDSD_PRINT_M_ERR, EDSD_PRINT_M_fERR, EDSD_PRINT_M_GEM, EDSD_PRINT_M_TKR, and _EDSD_printCtl::objects.
Referenced by EDSD_printConstruct().
static void printFull | ( | EDS_fwEvt * | evt, | |
const EDSD_printCtl * | ctl | |||
) | [static] |
Prints a highly formatted version of the event.
evt | The event structure | |
ctl | Control parameters |
References EDSD_PRINT_M_ACD, EDSD_PRINT_M_ACDP, EDSD_PRINT_M_CAL, EDSD_PRINT_M_cCAL, EDSD_PRINT_M_eCAL, EDSD_PRINT_M_ECAL, EDSD_PRINT_M_ERR, EDSD_PRINT_M_fERR, EDSD_PRINT_M_GEM, EDSD_PRINT_M_MCAL, EDSD_PRINT_M_rERR, EDSD_PRINT_M_TKR, EDSD_PRINT_M_TTKR, EDSD_PRINT_M_tTKR, EDSD_PRINT_M_UTKR, EDSD_PRINT_M_uTKR, and _EDSD_printCtl::what.
Referenced by EDSD_printProcess().
static void printRaw | ( | const EBF_pkt * | pkt, | |
unsigned int | psize, | |||
int | sequence | |||
) | [static] |
Prints a very crude hex dump of the event to stdout.
pkt | Pointer to the packet to print | |
psize | The packet size in bytes (includes header) | |
sequence | The event sequence number. |
References _EBF_ebw::bf, and _EBF_ebw::ui.
Referenced by EDSD_printProcess().