GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> QSEP / V3-5-0 > qsep / sun-gcc


Interface   Data Structures   File List   Data Fields   Globals  

QSEP_ctxUpdate.c File Reference

Updates the application specific context for the physics data. More...

#include <QSEP/QSEP_ctx.h>
#include <QSEP_ctxUpdate.h>
#include <QSEP_pvtdef.h>
#include <QDFP_ctx.h>
#include <QSP/QSP_names.h>
#include <QSP/QFCP_cache.h>
#include <QSD/QFC_member.h>
#include <LSEP/LSEP_ids.h>
#include <LSEP/LSEP_etxCtb.h>
#include <LSEP/LSEP_evtBdy0.h>
#include <LDT/BFU.h>
#include <CDM/CDM_pubdefs.h>
#include <PBI/FFS.ih>
#include <stdlib.h>
#include <string.h>

Typedefs

typedef int(* Updater )(QSEP_ctx *ctx, const LSF_contribution *ctb, unsigned int new)
 Call signature for a contribution update routine.

Functions

static int etxUpdate (QSEP_ctx *ctx, const LSEP_etxCtb *ctb, int new)
 Update the physics specific contribution.
static int cdfUpdate (QSEP_ctx *ctx, const LSF_contribution *ctb, int new)
 Updates the compressed data contribution.
void QSEP_ctxConstruct (QSEP_ctx *ctx, QSEP_dtx *dtx)
 One-time initialization of the public application specific physics event context.
int QSEP_ctxUpdateAtRoot (QSEP_ctx *ctx, const LSF_contribution *ctb, int new)
 The datagram root contribution handler.
static void keysUpdate (QSEP_ctx *ctx, const LSEP_etxCtb *ctb)
static BFU eds0Decode (QSEP_ctx *ctx, BFU bfu, const unsigned int *src, const unsigned int max, unsigned int *active_p, unsigned int *active_cnt_p)
 Decodes version 0 of the Event Description Services.
static BFU eds1Decode (QSEP_ctx *ctx, BFU bfu, const unsigned int *src, const unsigned int max, unsigned int *active_p, unsigned int *active_cnt_p)
 Decodes version 1 of the Event Description Services.
static BFU rsdDecode (QSEP_ctx *ctx, BFU bfu, const unsigned int *src, int max, unsigned char bridge, unsigned int sum_list, unsigned int active, unsigned int active_cnt)
 Decodes the result summary block.
static int etx0Update (QSEP_ctx *ctx, const LSEP_etxCtb *ctb, int new)
 Update the physics specific contribution.
static int etx1Update (QSEP_ctx *ctx, const LSEP_etxCtb *ctb, int new)
 Update the physics specific contribution.


Detailed Description

Updates the application specific context for the physics data.

Author:
JJRussell - russell@slac.stanford.edu

   CVS $Id: QSEP_ctxUpdate.c,v 1.13 2011/03/29 18:49:04 russell Exp $

Typedef Documentation

int(* Updater)(QSEP_ctx *ctx, const LSF_contribution *ctb, unsigned int new)

Call signature for a contribution update routine.

Return values:
< 0, Private contribtuion
= 0, Standard contribution
> 0, Event contribution
Parameters:
ctx The context to update
ctb The contribution to use in updating
new Indicates that the mode changed


Function Documentation

static int cdfUpdate ( QSEP_ctx ctx,
const LSF_contribution *  ctb,
int  new 
) [static]

Updates the compressed data contribution.

Return values:
== 0, Successfully handled
!= 0, Error
Parameters:
ctx The application specific public context handle
ctb The contribution to handle
new Flag indicating that new information due to a mode change or a new run may be present.
The information in the contribution is unpacked from its dense representation into a standard, more accessible form.

References _QSEP_dtx::ctx, _QSEP_ctx::dtx, _QSEP_dtxCtx::qdfp, and QDFP_ctxUpdate().

Referenced by QSEP_ctxUpdateAtRoot().

static BFU eds0Decode ( QSEP_ctx ctx,
BFU  bfu,
const unsigned int *  src,
const unsigned int  max,
unsigned int *  active_p,
unsigned int *  active_cnt_p 
) [static]

Decodes version 0 of the Event Description Services.

Returns:
The bit decoding context
Parameters:
ctx The decoding context
bfu The bit decoding context
bfu The bit decoding context
src The buffer of input 32-bit words
max The maximum bit position
active_p Returned as the bit mask of active handlers
active_cnt_p Returned the number of bits set in active_p

References _QSEP_ctxEds::active, _QSEP_ctxKeysFilter::cfg, _QSEP_ctxEds::cfgs, _QSEP_ctx::eds, _QSEP_ctxKeys::filters, _QSEP_ctx::keys, _QSEP_ctxKeysFilter::master, and _QSEP_ctxKeys::valid.

Referenced by etx0Update().

static BFU eds1Decode ( QSEP_ctx ctx,
BFU  bfu,
const unsigned int *  src,
const unsigned int  max,
unsigned int *  active_p,
unsigned int *  active_cnt_p 
) [static]

Decodes version 1 of the Event Description Services.

Returns:
The bit decoding context
Parameters:
ctx The decoding context
bfu The bit decoding context
bfu The bit decoding context
src The buffer of input 32-bit words
max The maximum bit position
active_p Returned as the bit mask of active handlers
active_cnt_p Returned the number of bits set in active_p

References _QSEP_ctxEds::active, _QSEP_dtxCtx::cache, _QSEP_ctxKeysFilter::cfg, _QSEP_ctxEds::cfgs, _QSEP_dtx::ctx, _QSEP_ctx::dtx, _QSEP_ctx::eds, _QSEP_dtxCtx::files, _QSEP_ctxKeys::filters, _QSEP_ctx::keys, _QSEP_ctxKeysFilter::master, _QSEP_cache::std, and _QSEP_ctxKeys::valid.

Referenced by etx1Update().

int etx0Update ( QSEP_ctx ctx,
const LSEP_etxCtb *  ctb,
int  new 
) [static]

Update the physics specific contribution.

Return values:
== 0, Successfully handled
!= 0, Error
Parameters:
ctx The application specific public context handle
ctb The contribution to handle
new Flag indicating that new information due to a mode change or a new run may be present.
The information in the contribution is unpacked from its dense representation into a standard, more accessible form.

References eds0Decode(), and rsdDecode().

Referenced by etxUpdate().

int etx1Update ( QSEP_ctx ctx,
const LSEP_etxCtb *  ctb,
int  new 
) [static]

Update the physics specific contribution.

Return values:
== 0, Successfully handled
!= 0, Error
Parameters:
ctx The application specific public context handle
ctb The contribution to handle
new Flag indicating that new information due to a mode change or a new run may be present.
The information in the contribution is unpacked from its dense representation into a standard, more accessible form.

References eds1Decode(), and rsdDecode().

Referenced by etxUpdate().

static int etxUpdate ( QSEP_ctx ctx,
const LSEP_etxCtb *  ctb,
int  new 
) [static]

Update the physics specific contribution.

Return values:
== 0, Successfully handled
!= 0, Error
Parameters:
ctx The application specific public context handle
ctb The contribution to handle
new Flag indicating that new information due to a mode change or a new run may be present.
The information in the contribution is unpacked from its dense representation into a standard, more accessible form.

References etx0Update(), and etx1Update().

Referenced by QSEP_ctxUpdateAtRoot().

void QSEP_ctxConstruct ( QSEP_ctx ctx,
QSEP_dtx dtx 
)

One-time initialization of the public application specific physics event context.

Parameters:
ctx The context to construct/initialize
dtx Pointer to the application specific private context

References _QSEP_ctx::dtx.

Referenced by QSEP_construct().

int QSEP_ctxUpdateAtRoot ( QSEP_ctx ctx,
const LSF_contribution *  ctb,
int  new 
)

The datagram root contribution handler.

Return values:
< 0, if this contribution was recognized but could not be successfully processed.
==0,if this contribution was successfully handled
> 0, if this contribution was not recognized
Parameters:
ctx The application specific public context handle
ctb The contribution to handle
new Flag indicating that new information due to a mode change or a new run may be present.
After first determining that the record type is recognized, the information in the contribution is unpacked from its dense representation into a standard, more accessible form.

References cdfUpdate(), and etxUpdate().

Referenced by root_update().

static BFU rsdDecode ( QSEP_ctx ctx,
BFU  bfu,
const unsigned int *  src,
int  max,
unsigned char  bridge,
unsigned int  sum_list,
unsigned int  active,
unsigned int  active_cnt 
) [static]

Decodes the result summary block.

Returns:
Position of the next bit to decord
Parameters:
ctx The context holding both the result description and the storage to hold the decode block
bfu The bit decoding context
src The buffer of input 32-bit words
max The maximum bit position
bridge The bridge word holding any optional decoding options
sum_list The bit list of active handlers that contribute to the summary word. In general for ETX V0, this is 0, since there was no event summary word, in ETX V1, this is active handlers
active The bit list of active handlers
active_cnt The number of active handlers

References _QSEP_dtxRsd::buffer, _QSEP_dtx::ctx, _QSEP_ctxRsd::dat_list, _QSEP_ctxRsd::dscs, _QSEP_ctx::dtx, _QSEP_dtxCtx::files, _QSEP_rsdDsc::id, _QSEP_rsdDsc::len, _QSEP_dtxRsd::mbytes, _QSEP_dtxRsd::nbytes, _QSEP_rsdDsc::ptr, QSEP_RSDSTATE_K_INVALID, _QSEP_dtxCtx::rsd, _QSEP_ctx::rsd, _QSEP_rsdDsc::state, _QSEP_ctxRsd::state_list, and _QSEP_rsdDsc::version.

Referenced by etx0Update(), and etx1Update().


Generated on Wed Nov 21 21:13:57 2012 by  doxygen 1.5.8