GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> QSEP / V3-5-0 > qsep / 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 <LSE/LSE_ids.h>
#include <PBI/PTR.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
Classes | |
struct | _RootUpdateCtx |
Context of the root update function. More... | |
Defines | |
#define | RND8(_x) (((PTR_as_uint)(_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, unsigned 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.18 2012/09/22 00:17:20 russell Exp $
#define RND8 | ( | _x | ) | (((PTR_as_uint)(_x) + 7) & ~0x7) |
Round _x up to the nearest boundary of 8.
_x | The value to round |
Referenced by QSEP_sizeof().
QSEP * QSEP_alloc | ( | int | resource_level | ) |
Allocates and constructs the QSEP handle.
resource_level | The maximum resource level that is needed |
References QSEP_construct().
const QSE_ctx * QSEP_appCtxGet | ( | const QSEP * | qsep | ) |
Return a pointer to the public QSEP application specific context block.
qsep | The physics event handle |
References _QSEP::atx.
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 |
References _QSEP::atx, _QSEP::ctx, _QSEP::dtx, _QSEP::evt, _QSEP::free, QSEP_ctxConstruct(), qsep_dtx_construct(), qsep_file_ctx_get(), and QSEP_sizeof().
Referenced by QSEP_alloc().
void QSEP_destruct | ( | QSEP * | qsep | ) |
Destroys the QSEP handle.
qsep | The handle to destroy |
References _QSEP::free.
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 |
References _QSEP_dtx::ctx, _QSEP_dtx::evt, qsep_dtxCtx_construct(), and qsep_dtxEvt_construct().
Referenced by QSEP_construct().
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 |
References _QSEP_dtxRsd::buffer, _QSEP_dtxCtx::cache, _QSEP_cacheCfg::calGains, _QSEP_cacheCfg::calPeds, _QSEP_cache::cfg, _QSEP_dtxCtx::files, _QSEP_dtxCtx::max_level, _QSEP_dtxRsd::mbytes, _QSEP_dtxRsd::nbytes, _QSEP_dtxCtx::qdfp, QDFP_ctxConstruct(), _QSEP_dtxCtx::qse, _QSEP_dtxCtx::qsep, _QSEP_dtxCtx::rsd, and _QSEP_cache::std.
Referenced by qsep_dtx_construct().
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 |
References _QSEP_dtxEvt::qdfp, and QDFP_evtConstruct().
Referenced by qsep_dtx_construct().
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, | |||
unsigned 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 |
References _QSEP_dtxEvt::decode, _QSEP::dtx, and _QSEP_dtx::evt.
static __inline QFR_fileCtx * qsep_file_ctx_get | ( | void | ) | [static] |
Returns the QSEP file resolution context handle.
Referenced by QSEP_construct().
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. |
References QDFP_ctxSizeof(), QDFP_evtSizeof(), and RND8.
Referenced by QSEP_construct().
const char * QSEP_statusString | ( | int | status | ) |
Translates a QSEP status code to a string.
status | The status code to translate |
References QSEP_STATUS_K_LAST_VALID.
const QSE_ctx * QSEP_stdCtxGet | ( | const QSEP * | qsep | ) |
Return a pointer to the standard QSE context block.
qsep | The physics event handle |
References _QSEP::ctx.
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 |
References _QSEP::ctx, _QSEP::dtx, _QSEP_dtx::evt, QSEP_evt0_update(), QSEP_evt2_update(), QSEP_evt3_update(), and _QSEP_dtxEvt::update.
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 |
References _RootUpdateCtx::chg, _QSEP::ctx, _RootUpdateCtx::flags, _RootUpdateCtx::qsep, root_update(), and _RootUpdateCtx::tim.
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 |
References _QSEP::ctx, _QSEP::dtx, _QSEP_dtx::evt, and _QSEP_dtxEvt::update.
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 |
References _QSEP::atx, _RootUpdateCtx::chg, _QSEP::ctx, _RootUpdateCtx::flags, _RootUpdateCtx::qsep, QSEP_ctxUpdateAtRoot(), and _RootUpdateCtx::tim.
Referenced by QSEP_updateAtDatagram().