GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> QSE / V2-3-2 > qse / linux-gcc
#include <LSF/LSF_ids.h>
#include <LSE/LSE_ids.h>
#include <LSE/LSE_timCtb.h>
#include <LSE/LSE_etxCtb.h>
#include <QSE/QSE_evt.h>
#include <QSE/QSE_ctx.h>
#include <QSE/QSE_ctxUpdate.h>
#include <EDS/EBF_dir.h>
#include <EDS/EBF_gem.h>
#include <EDS/EBF_cid.h>
#include <EDS/EBF_ctb.h>
#include <string.h>
Typedefs | |
typedef int(* | Updater )(QSE_ctx *ctx, const LSF_contribution *ctb) |
Call signature for a contribution update routine. | |
Functions | |
static void | transfer_did (QSD_ctxDid *dst, const LSE_did *src) |
Transfers the datagram identification information from the event datagram to the presentation level. | |
static void | transfer_ctrs (QSE_ctxCounters *ctrs, const LSE_xcr *xcr) |
Transfers the datagram extended counter information from the event datagram to the presentation level. | |
static __inline unsigned long long int | update64 (unsigned long long ctr, unsigned int new, unsigned int msk) |
Updates the specified 64-bit counter. | |
static __inline unsigned long long int | update32 (unsigned int ctr, unsigned int new, unsigned int msk) |
Updates the specified 32-bit counter. | |
static void | etxFullOpen (QSE_ctx *ctx, const LSE_etxCtb *etx) |
Opens a new presentation level event context using the information from the event datagram context. | |
static void | etxAbrvOpen (QSE_ctx *ctx, const LSE_etxCtb *etx) |
Opens a new presentation level event context using the information from the event datagram context. | |
static void | timFullUpdate (QSE_ctx *ctx, const LSE_timCtbFull *tim) |
Opens a new presentation level event context using the information from the event datagram context. | |
static void | timAbrvUpdate (QSE_ctx *ctx, const LSE_timCtbAbbreviated *tim) |
Opens a new presentation level event context using the information from the event datagram context. | |
static void | ctx_update (QSE_ctx *ctx, const EBF_gem *gem, unsigned int sequence) |
Updates the information in the presentation level event context using information in the GEM and the trigger sequence number. | |
void | QSE_ctxConstruct (QSE_ctx *ctx) |
Constructs/Initializes the public context structure. | |
int | QSE_ctxUpdateAtRoot (QSE_ctx *ctx, const LSF_contribution *ctb) |
The datagram root contribution handler. | |
void | QSE_ctxUpdateAtContribution (QSE_ctx *ctx, const LSF_contribution *ctb) |
Updates the context based on the contribution. | |
void | QSE_ctxUpdateAtEvent (QSE_ctx *ctx, const QSE_ctxUpdateInfo *info) |
Updates the context based on partially decoded information in event portion of the context. |
CVS $Id: QSE_ctxUpdate.c,v 1.18 2011/03/27 01:45:45 russell Exp $
int(* Updater)(const LSF_contribution *ctb) |
Call signature for a contribution update routine.
< | 0, Private contribtuion | |
= | 0, Standard contribution | |
> | 0, Event contribution |
ctx | The context to update | |
ctb | The contribution to use in updating |
static void ctx_update | ( | QSE_ctx * | ctx, | |
const EBF_gem * | gem, | |||
unsigned int | sequence | |||
) | [static] |
Updates the information in the presentation level event context using information in the GEM and the trigger sequence number.
ctx | The present level event context record to be updated | |
gem | The GEM information for this event; | |
sequence | The trigger event sequence number |
References _QSE_ctx::ctrs, _QSE_ctxTime::cur, _QSE_ctxCounters::deadzone, _QSE_ctx::dgm, _QSE_ctxCounters::discarded, _QSE_ctxCounters::elapsed, _QSE_ctxCounters::livetime, _QSE_ctxTime::ppsticks, _QSE_ctxCounters::prescaled, _QSE_ctxTime::prv, _QSE_ctxCounters::sequence, _QSE_ctx::tim, _QSE_ctxTime::trgticks, and update64().
Referenced by QSE_ctxUpdateAtEvent().
void etxAbrvOpen | ( | QSE_ctx * | ctx, | |
const LSE_etxCtb * | etx | |||
) | [static] |
Opens a new presentation level event context using the information from the event datagram context.
ctx | The present level event context record to be filled | |
etx | The event datagram context contribution |
References _QSE_ctx::ctrs, _QSE_ctxTime::cur, _QSE_ctx::dgm, _QSE_ctxTime::prv, _QSE_ctx::tim, transfer_ctrs(), and transfer_did().
Referenced by QSE_ctxUpdateAtContribution(), and QSE_ctxUpdateAtRoot().
void etxFullOpen | ( | QSE_ctx * | ctx, | |
const LSE_etxCtb * | etx | |||
) | [static] |
Opens a new presentation level event context using the information from the event datagram context.
ctx | The event context record to be filled | |
etx | The event datagram context contribution |
References _QSE_ctx::ctrs, _QSE_ctxTime::cur, _QSE_ctx::dgm, _QSE_ctxTime::prv, _QSE_ctx::tim, transfer_ctrs(), and transfer_did().
Referenced by QSE_ctxUpdateAtContribution(), and QSE_ctxUpdateAtRoot().
void QSE_ctxConstruct | ( | QSE_ctx * | ctx | ) |
Constructs/Initializes the public context structure.
ctx | The public context structure |
References _QSE_ctx::dgm.
void QSE_ctxUpdateAtContribution | ( | QSE_ctx * | ctx, | |
const LSF_contribution * | ctb | |||
) |
Updates the context based on the contribution.
ctx | The event context handle | |
ctb | The datagram contribution used in doing the update |
References etxAbrvOpen(), etxFullOpen(), timAbrvUpdate(), and timFullUpdate().
void QSE_ctxUpdateAtEvent | ( | QSE_ctx * | ctx, | |
const QSE_ctxUpdateInfo * | info | |||
) |
Updates the context based on partially decoded information in event portion of the context.
ctx | The event context handle | |
info | The event context update information |
References ctx_update(), _QSE_ctxUpdateInfo::gem, and _QSE_ctxUpdateInfo::seq.
int QSE_ctxUpdateAtRoot | ( | QSE_ctx * | ctx, | |
const LSF_contribution * | ctb | |||
) |
The datagram root contribution handler.
!=0, if it was not recognized
ctx | The event context handle | |
ctb | The contribution to handle |
References etxAbrvOpen(), and etxFullOpen().
void timAbrvUpdate | ( | QSE_ctx * | ctx, | |
const LSE_timCtbAbbreviated * | tim | |||
) | [static] |
Opens a new presentation level event context using the information from the event datagram context.
ctx | The present level event context record to be filled | |
tim | The time update contribution, abbreviated version |
References _QSE_ctxTime::cur, _QSE_ctxTime::prv, and _QSE_ctx::tim.
Referenced by QSE_ctxUpdateAtContribution().
void timFullUpdate | ( | QSE_ctx * | ctx, | |
const LSE_timCtbFull * | tim | |||
) | [static] |
Opens a new presentation level event context using the information from the event datagram context.
ctx | The event context record to be filled | |
tim | The time update contribution, full version |
References _QSE_ctxTime::cur, _QSE_ctxTime::prv, and _QSE_ctx::tim.
Referenced by QSE_ctxUpdateAtContribution().
static __inline void transfer_ctrs | ( | QSE_ctxCounters * | ctrs, | |
const LSE_xcr * | xcr | |||
) | [static] |
Transfers the datagram extended counter information from the event datagram to the presentation level.
ctrs | The presentation level counter information | |
xcr | The event datagram context extended counter record |
References _QSE_ctxCounters::deadzone, _QSE_ctxCounters::discarded, _QSE_ctxCounters::elapsed, _QSE_ctxCounters::livetime, _QSE_ctxCounters::prescaled, and _QSE_ctxCounters::sequence.
Referenced by etxAbrvOpen(), and etxFullOpen().
static __inline void transfer_did | ( | QSD_ctxDid * | dst, | |
const LSE_did * | src | |||
) | [static] |
Transfers the datagram identification information from the event datagram to the presentation level.
dst | The presentation level datagram identification | |
src | The event datagram context contribution |
Referenced by etxAbrvOpen(), and etxFullOpen().
static __inline unsigned int update32 | ( | unsigned int | ctr, | |
unsigned int | new, | |||
unsigned int | msk | |||
) | [static] |
Updates the specified 32-bit counter.
ctr | The counter value to update | |
new | The new value of the GEM version of this counter | |
msk | The mask of the significant bits |
static __inline unsigned long long int update64 | ( | unsigned long long | ctr, | |
unsigned int | new, | |||
unsigned int | msk | |||
) | [static] |
Updates the specified 64-bit counter.
ctr | The counter value to update | |
new | The new value of the GEM version of this counter | |
msk | The mask of the significant bits |
Referenced by ctx_update().