GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > QSEP / V3-3-0
Constituent: qsep     Tag: sun-gcc
#include "QSEP/QSEP.h"
#include "QSEP/QSEP_evt0.h"
#include "QSEP_pvtdef.h"
#include "QSEP_ctxUpdate.h"
#include "QDFP_ctx.h"
#include "QDFP_evt.h"
#include "QSE/QSE_ctxUpdate.h"
#include "QSP/QSP_names.h"
#include "QSP/QFCP_cache.h"
#include "QSD/QFC_cache.h"
#include "QSD/QFR_file.h"
#include "LSF/LSF_scan.h"
#include <stdlib.h>
#include <string.h>
Classes | |
struct | _RootUpdateCtx |
Context of the root update function. More... | |
Defines | |
#define | RND8(_x) (((int)(_x) + 7) & ~0x7) |
Round _x up to the nearest boundary of 8. | |
#define | ARND8(_x) ((void *)RND8((_x))) |
Typedefs | |
typedef struct _RootUpdateCtx | RootUpdateCtx |
Typedef for struct _RootUpdateCtx. | |
Functions | |
static LSF_scanRecordHandler | root_update (RootUpdateCtx *rux, const LSF_contribution *ctb) |
Call back routine for each contribution in the root. | |
static __inline QFR_fileCtx * | qsep_file_ctx_get (void) |
Returns the QSEP file resolution context handle. | |
static __inline void * | qsep_dtxCtx_construct (QSEP_dtxCtx *dtxCtx, int level, void *prm, QSEP *qsep, QSEP_ctx *qsep_ctx, QSE_ctx *qse_ctx, QFR_fileCtx *qfr, int depth, void *ptr) |
Initializes the physics application specific private context. | |
static void * | qsep_dtxEvt_construct (QSEP_dtxEvt *dtxEvt, int level, void *prm, void *ptr) |
Initializes the physics application specific private context. | |
static __inline void * | qsep_dtx_construct (QSEP_dtx *dtx, int level, void *prm, QSEP *qsep, QSEP_ctx *qsep_ctx, QSE_ctx *qse_ctx, QFR_fileCtx *qfr, int depth, void *ptr) |
Initializes the physics application specific private context. | |
QSEP * | QSEP_alloc (int resource_level) |
Allocates and constructs the QSEP handle. | |
int | QSEP_sizeof (unsigned int resource_level, void *prm) |
Returns the size, in bytes, of the handle for updating the standard event meta-information. | |
int | QSEP_ebfSizeof (void) |
Returns the maximum size, in bytes, of an EBF event. | |
QSEP * | QSEP_construct (QSEP *qsep, unsigned int resource_level, void *prm) |
Construct (initializes) the handle for updating the standard event meta-information. | |
void | QSEP_destruct (QSEP *qsep) |
Destroys the QSEP handle. | |
void | QSEP_updateAtDatagram (QSEP *qsep, const LSF_datagram *dgm) |
Updates the run oriented information in the event context using the information from the event datagram. | |
void | QSEP_updateAtContribution (QSEP *qsep, const LSF_contribution *ctb) |
Updates the context based on the contribution. | |
int | QSEP_updateAtRecord (QSEP *qsep, const LSF_record *rec) |
Updates the context based on the record. | |
int | QSEP_expand (QSEP *qsep, const LSF_record *rec, QSE_ebfEvt *ebf, int ebf_size, int *ret_size) |
Expands the event into EBF format. | |
const char * | QSEP_statusString (int status) |
Translates a QSEP status code to a string. | |
const QSEP_ctx * | QSEP_appCtxGet (const QSEP *qsep) |
Return a pointer to the public QSEP application specific context block. | |
const QSE_ctx * | QSEP_stdCtxGet (const QSEP *qsep) |
Return a pointer to the standard QSE context block. |
CVS $Id: QSEP.c,v 1.15 2009/06/19 20:12:12 russell Exp $
#define RND8 | ( | _x | ) | (((int)(_x) + 7) & ~0x7) |
Round _x up to the nearest boundary of 8.
_x | The value to round |
QSEP * QSEP_alloc | ( | int | resource_level | ) |
Allocates and constructs the QSEP handle.
resource_level | The maximum resource level that is needed |
const QSE_ctx * QSEP_appCtxGet | ( | const QSEP * | qsep | ) |
Return a pointer to the public QSEP application specific context block.
qsep | The physics event handle |
Construct (initializes) the handle for updating the standard event meta-information.
qsep | The handle to initialize, if specified as NULL, one will be allocated | |
resource_level | The maximum resource level. Attempts to expand event with resources needs above this value will return QSEP_STATUS_K_INSRSC, that is INSUFFICIENT RESOURCES. | |
prm | A run-time set parameter used to stylize the configuration |
void QSEP_destruct | ( | QSEP * | qsep | ) |
Destroys the QSEP handle.
qsep | The handle to destroy |
static __inline void * qsep_dtx_construct | ( | QSEP_dtx * | dtx, | |
int | level, | |||
void * | prm, | |||
QSEP * | qsep, | |||
QSEP_ctx * | qsep_ctx, | |||
QSE_ctx * | qse_ctx, | |||
QFR_fileCtx * | qfr, | |||
int | depth, | |||
void * | ptr | |||
) | [static] |
Initializes the physics application specific private context.
dtx | The physics application specific private context to initialize | |
level | The maximum decoding level that this structure can support. Higher compression levels demand more resources. Enough resources will be allocated to met this requested level. | |
prm | Arbitrary user parameter, unused | |
qsep | Pointer to the physics application context (full) | |
qsep_ctx | Pointer to the physics application specific public context | |
qse_ctx | The generic public context | |
qfr | The file resolution context | |
depth | The cache depth | |
ptr | The memory pool |
static __inline void * qsep_dtxCtx_construct | ( | QSEP_dtxCtx * | dtxCtx, | |
int | level, | |||
void * | prm, | |||
QSEP * | qsep, | |||
QSEP_ctx * | qsep_ctx, | |||
QSE_ctx * | qse_ctx, | |||
QFR_fileCtx * | qfr, | |||
int | depth, | |||
void * | ptr | |||
) | [static] |
Initializes the physics application specific private context.
dtxCtx | The physics application specific private context to initialize | |
level | The maximum decoding level that this structure can support. Higher compression levels demand more resources. Enough resources will be allocated to met this requested level. | |
prm | Arbitrary user parameter, unused | |
qsep | Pointer to the physcis application context (full) | |
qsep_ctx | Pointer to the physics application specific public context | |
qse_ctx | The generic public context | |
qfr | The file resolution context | |
depth | The cache depth | |
ptr | The memory pool |
static __inline void * qsep_dtxEvt_construct | ( | QSEP_dtxEvt * | dtxEvt, | |
int | level, | |||
void * | prm, | |||
void * | ptr | |||
) | [static] |
Initializes the physics application specific private context.
dtxEvt | The physics application specific private event context to initialize | |
level | The maximum decoding level that this structure can support. Higher compression levels demand more resources. Enough resources will be allocated to met this requested level. | |
prm | Arbitrary user parameter, unused | |
ptr | The memory pool |
int QSEP_ebfSizeof | ( | void | ) |
Returns the maximum size, in bytes, of an EBF event.
int QSEP_expand | ( | QSEP * | qsep, | |
const LSF_record * | rec, | |||
QSE_ebfEvt * | ebf, | |||
int | ebf_size, | |||
int * | ret_size | |||
) |
Expands the event into EBF format.
0,Successful | expand | |
<0,Failute,see | the enumeration QSEP_STATUS_K for the reasons |
qsep | The physics event handle | |
rec | The LSF record containing the event | |
ebf | The ebf buffer to expand the event into, this pointer must be 32-bit aligned | |
ebf_size | The size, in bytes, of the buffer | |
ret_size | Returned as the status of the expand |
static __inline QFR_fileCtx * qsep_file_ctx_get | ( | void | ) | [static] |
Returns the QSEP file resolution context handle.
int QSEP_sizeof | ( | unsigned int | resource_level, | |
void * | prm | |||
) |
Returns the size, in bytes, of the handle for updating the standard event meta-information.
resource_level | The maximum resource level. Attempts to expand event with compression levels that use resources beyond this value will return QSEP_STATUS_K_INSRSC that is INSUFFICIENT RESOURCES. This must be a number between 0 and 15. This parameter plus prm must also be passed to QSEP_construct | |
prm | A run-time set parameter used to stylize the configuration. This parameter plus max_level must also be passed to QSEP_construct. |
const char * QSEP_statusString | ( | int | status | ) |
Translates a QSEP status code to a string.
status | The status code to translate |
const QSE_ctx * QSEP_stdCtxGet | ( | const QSEP * | qsep | ) |
Return a pointer to the standard QSE context block.
qsep | The physics event handle |
void QSEP_updateAtContribution | ( | QSEP * | qsep, | |
const LSF_contribution * | ctb | |||
) |
Updates the context based on the contribution.
0,if | the contribution is non-record | |
1,if | the contribution is an contribution |
qsep | The physics event handle to update | |
ctb | The contribution |
void QSEP_updateAtDatagram | ( | QSEP * | qsep, | |
const LSF_datagram * | dgm | |||
) |
Updates the run oriented information in the event context using the information from the event datagram.
qsep | The physics event handle | |
dgm | The event datagram |
int QSEP_updateAtRecord | ( | QSEP * | qsep, | |
const LSF_record * | rec | |||
) |
Updates the context based on the record.
Positive | values indicate a successful update to an event record | |
Negative | values indicate an unsuccessful update to an event record | |
0 | indicates that this was not an event record |
qsep | The physics event handle to update | |
rec | The event record |
static LSF_scanRecordHandler root_update | ( | RootUpdateCtx * | rux, | |
const LSF_contribution * | ctb | |||
) | [static] |
Call back routine for each contribution in the root.
rux | The root update context | |
ctb | The contribution |