GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > QSE / V1-6-3
Constituent: qse_repacktest     Tag: sun-gcc
#include "QSE/QSE_aemRepack.h"
#include "EDS/TMR.h"
#include "EDS/LCBV.h"
#include "EDS/io/EBF_evts.h"
#include "EDS/io/EBF_stream.h"
#include "EDS/io/LCBP.h"
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <sys/types.h>
#include "EDS/FFS.h"
#include "EDS/EBF_cid.h"
#include "EDS/EBF_ctb.h"
#include "EDS/EBF_evt.h"
#include "EDS/EBF_pkt.h"
#include "EDS/EBF_dir.h"
#include "EDS/EBF_siv.h"
#include "EDS/EBF_tem.h"
#include "EDS/EBF_tkr.h"
#include "EDS/EBF_edw.h"
#include "QSE/QSE_aem.h"
#include "QSE/QSE_aemUnpack.h"
Include dependency graph for qse_repacktest.c:
Data Structures | |
struct | _Ctl |
Collections all the control parameters together. These are essentially the interpretted command line options. More... | |
struct | _RepackRecord |
Information about the unpacking/repacking of one object. More... | |
struct | _RepackResult |
Information about the unpacking/repacking of one event. More... | |
struct | _RepackSummary |
struct | _RepackCtl |
Demonstration/test of the basic repacking routines control block. More... | |
Defines | |
#define | HW_ACCESS(_hwa) *(unsigned short int *)(&(_hwa)) |
Addresses the AEM half-word array in a way that is compatiable with big or little endian machines. | |
Typedefs | |
typedef _RepackCtl | RepackCtl |
Typedef for struct _RepackCtl. | |
typedef enum _REPACK_OBJ_K | REPACK_OBJ_K |
Typedef for enum _EDSD_REPACK_OBJ_K. | |
typedef enum _REPACK_OBJ_V | REPACK_OBJ_V |
Typedef for enum _REPACK_OBJ_V. | |
typedef enum _REPACK_OBJ_M | REPACK_OBJ_M |
Typedef for enum _REPACK_OBJ_M. | |
typedef _Ctl | Ctl |
Typedef for struct _Ctl. | |
typedef _RepackRecord | RepackRecord |
Typedef for struct _RepackRecord. | |
typedef _RepackResult | RepackResult |
Typedef for struct _RepackResult. | |
typedef _RepackSummary | RepackSummary |
Enumerations | |
enum | _REPACK_OBJ_K { REPACK_OBJ_K_DIR = 0, REPACK_OBJ_K_AEM = 1, REPACK_OBJ_K_TKR = 2, REPACK_OBJ_K_CAL = 3, REPACK_OBJ_K_CNT = 4, REPACK_OBJ_K_EVT = 16, REPACK_OBJ_K_SUM = 17, REPACK_OBJ_K_DMP = 18 } |
Enumerates what to unpack/repack. More... | |
enum | _REPACK_OBJ_V { REPACK_OBJ_V_DIR = REPACK_OBJ_K_DIR, REPACK_OBJ_V_AEM = REPACK_OBJ_K_AEM, REPACK_OBJ_V_TKR = REPACK_OBJ_K_TKR, REPACK_OBJ_V_CAL = REPACK_OBJ_K_CAL, REPACK_OBJ_V_SUM = REPACK_OBJ_K_SUM, REPACK_OBJ_V_EVT = REPACK_OBJ_K_EVT, REPACK_OBJ_V_DMP = REPACK_OBJ_K_DMP } |
Enumerates the bit positions of the unpack/repack objects. More... | |
enum | _REPACK_OBJ_M { REPACK_OBJ_M_DIR = (1 << REPACK_OBJ_V_DIR), REPACK_OBJ_M_AEM = (1 << REPACK_OBJ_V_AEM), REPACK_OBJ_M_TKR = (1 << REPACK_OBJ_V_TKR), REPACK_OBJ_M_CAL = (1 << REPACK_OBJ_V_CAL), REPACK_OBJ_M_ALL = (1 << REPACK_OBJ_K_CNT)-1, REPACK_OBJ_M_SUM = (1 << REPACK_OBJ_V_SUM), REPACK_OBJ_M_EVT = (1 << REPACK_OBJ_V_EVT), REPACK_OBJ_M_DMP = (1 << REPACK_OBJ_V_DMP) } |
Enumerates the bit masks of the unpack/repack objects. More... | |
Functions | |
static int | repackSizeof (void) |
Returns the size, in bytes, of the control structure. | |
static int | repackConstruct (RepackCtl *ctl, int nevts, unsigned int objects, LCBV_pktsRngFreeCb freeRtn, void *freePrm) |
Allocates and initializes the repacking buffers and control structures. | |
static unsigned int | repackProcess (RepackCtl *ctl, unsigned int edw, EBF_pkt *pkt) |
Loops through the events, printing the contents to stdout. | |
static void | repackReport (const RepackCtl *ctl) |
The reporting function. | |
static int | repackDestruct (RepackCtl *ctl) |
DeAllocates and the unpacking/repacking buffers. | |
static void | reportUsage (void) |
Brief explanation on readtest usage. | |
static unsigned int | repack (Ctl *ctl) |
Finishes the platform common setup and initalization, starts the packet flow. | |
static unsigned int | get_report_opts (const char *optarg) |
Returns a bit mask of the reporting options. | |
static int | fillCtl (Ctl *ctl, int argc, char *const argv[]) |
Examines the command line parameters and fills the print control structure. | |
int | main (int argc, char *const argv[]) |
Usual entry point for the readtest. | |
static void * | alloc (const char *what, int nbytes) |
Attempts to allocate the specified number of bytes and issues an error message if it cannot. | |
static void | dump (const void *dat, int nbytes) |
Produce a semi-formatted dump of the AEM data. | |
static void | calc_summary (RepackSummary *summary, const RepackResult *results, int nresults, unsigned int objects) |
Calculates the summary statistics from the result records. | |
static void | report_evt_results (const RepackResult *results, int nresults, unsigned int objects) |
Prints the event-by-event results. | |
static void | report_summary (RepackSummary *summary, unsigned int objects) |
Reports the repacking summary statistics. | |
static void | print_title (const char *caption, unsigned int objects) |
Prints the title bars for the report summary. | |
static void | print_separator (int cnt) |
Prints the separator line of the title bar. | |
static void | new_line (void) |
Print a new line character. | |
static int | compare (const void *s1, const void *s2, int nbytes) |
Compares the 32-bit bswapped arrays. |
$ qse_repacktest -A <file.ebf> where A: Repack AEM
CVS $Id: qse_repacktest.c,v 1.2 2006/02/22 01:24:42 russell Exp $
|
Addresses the AEM half-word array in a way that is compatiable with big or little endian machines.
|
|
Typedef for struct _RepackResult. This contains two values, 0 is the unpack record, 1 is the repack record. |
|
|
Enumerates the bit masks of the unpack/repack objects.
|
|
Enumerates the bit positions of the unpack/repack objects.
|
|
Attempts to allocate the specified number of bytes and issues an error message if it cannot.
|
|
Calculates the summary statistics from the result records.
|
|
Compares the 32-bit bswapped arrays.
|
|
Produce a semi-formatted dump of the AEM data.
|
|
Examines the command line parameters and fills the print control structure.
|
|
Returns a bit mask of the reporting options.
|
|
Usual entry point for the readtest.
$ qse_repacktest -s<nskip> -n<nevts> -A <file.ebf> where: -s: Indicates the number of events to skip before processing begins -n: Indicates the number of events to process -A: Test the AEm repacking |
|
Prints the separator line of the title bar.
|
|
Prints the title bars for the report summary.
|
|
Finishes the platform common setup and initalization, starts the packet flow.
|
|
Allocates and initializes the repacking buffers and control structures.
|
|
DeAllocates and the unpacking/repacking buffers.
|
|
Loops through the events, printing the contents to stdout.
|
|
The reporting function.
|
|
Returns the size, in bytes, of the control structure.
|
|
Prints the event-by-event results.
|
|
Reports the repacking summary statistics.
|