GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> EDS / V2-11-6 > edsd / rad750
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <EDS/EDSD_sizes.h>
#include <EDS/EBF_dir.h>
#include <EDS/EBF_siv.h>
#include <EDS/EBF_cid.h>
Classes | |
struct | _EDSD_sizeTem |
The total size and sizes of the TEM record components. More... | |
struct | _EDSD_size |
Describes the event-by-event sizes of the contributions. More... | |
struct | _EDSD_sizesSummary |
Holds the derived sizes. More... | |
struct | _EDSD_sizesCtl |
Control block for evaluating the sizes of various components of an event. More... | |
Typedefs | |
typedef struct _EDSD_sizeTem | EDSD_sizeTem |
Typedef for struct EDSD_sizesTem. | |
typedef struct _EDSD_size | EDSD_size |
Typedef for EDSD_size. | |
typedef struct _EDSD_sizesSummary | EDSD_sizesSummary |
Typedef for struct _EDSD_sizesSummary. | |
typedef struct _EDSD_sizesCtl | EDSD_sizesCtl |
Typedef for struct _EDSD_sizesCtl. | |
Functions | |
static void | calcSizesSummary (EDSD_sizesSummary *summary, const EDSD_size *sizes, int count) |
Calculates the size summary record. | |
static void | printSizesSummary (const EDSD_sizesSummary *summary) |
Prints the average sizes of the various event contributors. | |
unsigned int | EDSD_sizesProcess (EDSD_sizesCtl *ctl, unsigned int pktBytes, EBF_pkt *pkt, EBF_siv siv, EDS_fwIxb *ixb) |
Evaluates the sizes of the various pieces of the event. | |
void | EDSD_sizesReport (const EDSD_sizesCtl *ctl) |
Reports the results. | |
int | EDSD_sizesConstruct (EDSD_sizesCtl *ctl, unsigned int nevts) |
Allocates and initializes the unpacking buffers. | |
int | EDSD_sizesSizeof (void) |
Returns the size, in bytes, of the EDSD sizes control block. | |
int | EDSD_sizesDestruct (EDSD_sizesCtl *ctl) |
DeAllocates and the sizes control structure. |
CVS $Id: EDSD_sizes.c,v 1.6 2011/03/25 22:16:56 russell Exp $
Typedef for struct _EDSD_sizesSummary.
Typedef for struct EDSD_sizesTem.
Note that because of LCB padding the total size of the TEM record is not necessarily the sum of the TKR and CAL contributions.
static void calcSizesSummary | ( | EDSD_sizesSummary * | summary, | |
const EDSD_size * | sizes, | |||
int | count | |||
) | [static] |
Calculates the size summary record.
summary | The summary record to fill in | |
sizes | The vector of sizes | |
count | The number of sizes vectors |
References _EDSD_size::acd, _EDSD_sizeTem::cal, _EDSD_size::evt, _EDSD_size::gem, _EDSD_sizesSummary::nEvts, _EDSD_size::npkts, _EDSD_sizesSummary::size, _EDSD_sizeTem::tem, _EDSD_size::tems, _EDSD_sizeTem::tkr, _EDSD_sizesSummary::truncEvts, and _EDSD_sizesSummary::truncPkts.
Referenced by EDSD_sizesReport().
int EDSD_sizesConstruct | ( | EDSD_sizesCtl * | ctl, | |
unsigned int | nevts | |||
) |
Allocates and initializes the unpacking buffers.
ctl | Pointer to the control buffer | |
nevts | The number of events to process |
References _EDSD_sizesCtl::ievts, _EDSD_sizesCtl::nevts, _EDSD_sizesCtl::size, and _EDSD_sizesCtl::sizes.
int EDSD_sizesDestruct | ( | EDSD_sizesCtl * | ctl | ) |
DeAllocates and the sizes control structure.
ctl | Pointer to the control buffer |
References _EDSD_sizesCtl::sizes.
unsigned int EDSD_sizesProcess | ( | EDSD_sizesCtl * | ctl, | |
unsigned int | pktBytes, | |||
EBF_pkt * | pkt, | |||
EBF_siv | siv, | |||
EDS_fwIxb * | ixb | |||
) |
Evaluates the sizes of the various pieces of the event.
ctl | The control/context parameter | |
pktBytes | The number of bytes in pkt, includes the packet header | |
pkt | The event data packet | |
siv | The packet's state information vector | |
ixb | The framework's information exchange block |
References _EDSD_size::acd, _EDSD_sizeTem::cal, _EDSD_size::evt, _EDSD_size::gem, _EDSD_size::npkts, _EDSD_sizesCtl::size, _EDSD_sizeTem::tem, _EDSD_size::tems, and _EDSD_sizeTem::tkr.
void EDSD_sizesReport | ( | const EDSD_sizesCtl * | ctl | ) |
Reports the results.
ctl | The control parameter |
References calcSizesSummary(), printSizesSummary(), _EDSD_sizesCtl::size, and _EDSD_sizesCtl::sizes.
int EDSD_sizesSizeof | ( | void | ) |
Returns the size, in bytes, of the EDSD sizes control block.
static void printSizesSummary | ( | const EDSD_sizesSummary * | summary | ) | [static] |
Prints the average sizes of the various event contributors.
summary | Structure containing the various accumulated sizes |
References _EDSD_size::acd, _EDSD_sizeTem::cal, _EDSD_size::evt, _EDSD_size::gem, _EDSD_sizesSummary::nEvts, _EDSD_sizesCtl::nevts, _EDSD_sizesSummary::size, _EDSD_sizeTem::tem, _EDSD_size::tems, _EDSD_sizeTem::tkr, tkrSize(), _EDSD_sizesSummary::truncEvts, and _EDSD_sizesSummary::truncPkts.
Referenced by EDSD_sizesReport().