GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> LSE / V2-1-0 > lsew / linux-gcc
#include <LSF/LSF_cpu.h>
#include <LSF/LSF_mode.h>
#include <LSF/LSF_origin.h>
#include <LSE/LSE_ids.h>
#include <LSE/LSE_did.h>
#include <LSE/LSE_etxCtb.h>
#include <LSE/LSEW_ctxPub.h>
#include <PBI/Endianness.h>
Classes | |
struct | _LSEW_ctxIds |
Contains the LSF identifiers of all standards context contributors. More... | |
struct | _LSEW_ctxHdr_bf |
Holds information needed of the 2nd word of the ETX context contribution, bit field representation. More... | |
struct | _LSEW_ctxHdr_us |
Holds information needed of the 2nd word of the ETX context contribution, as two unsigned short integers. More... | |
union | _LSEW_ctxHdr |
Holds information needed of the 2nd word of the ETX context contribution, union of all the representations. More... | |
struct | _LSEW_ctxPvt |
The private part of the context. More... | |
struct | _LSEW_ctx |
Holds information needed to fill in the initial time and counter context record. More... | |
Typedefs | |
typedef struct _LSEW_ctxIds | LSEW_ctxIds |
Typedef for LSEW_ctxIds. | |
typedef struct _LSEW_ctxHdr_bf | LSEW_ctxHdr_bf |
Typedef for struct _LSEW_ctxHdr_bf. | |
typedef struct _LSEW_ctxHdr_us | LSEW_ctxHdr_us |
Typedef for struct _LSEW_ctxHdr_us. | |
typedef union _LSEW_ctxHdr | LSEW_ctxHdr |
Typedef for union _LSEW_ctxHdr. | |
typedef struct _LSEW_ctxPvt | LSEW_ctxPvt |
Typedef for struct _LSEW_ctxPvt. | |
typedef struct _LSEW_ctx | LSEW_ctx |
Typedef for struct _LSEW_ctx. | |
Functions | |
void | LSEW_ctxInit (LSEW_ctx *ctx, LSF_CPU_K cpu, LSF_ORIGIN_K origin) |
!!! KLUDGE - None of the stuff following belongs here (except the INIT) | |
void | LSEW_ctxRunStart (LSEW_ctx *ctx, unsigned int runId, unsigned int startTime, LSF_MODE_K mode) |
Sets the context for a new run. | |
void | LSEW_ctxModeChange (LSEW_ctx *ctx, LSF_MODE_K mode) |
Changes the current data-taking mode. | |
unsigned int * | LSEW_ctxOpenAdd (LSEW_ctx *ctx, unsigned int *cur, unsigned int len32, unsigned int reason, unsigned int sequence, const EBF_gem *gem) |
Updates the Time/Counter context structure and inserts the the start of the appropriate (full or abbreviated) LSE_etxCtb contribution into the event datagram. | |
unsigned int * | LSEW_ctxUpdateAdd (LSEW_ctx *ctx, unsigned int *cur, unsigned int len32, unsigned int sequence, const EBF_gem *gem) |
Updates the Time/Counter context structure and inserts an Time contribution in the data stream if necessary. | |
unsigned int * | LSEW_ctxCloseAdd (LSEW_ctx *ctx, unsigned int *cur, unsigned int len32, unsigned int reason) |
Called when an event datagram is filled, it completes the opening LSE_etxCtb contribution by filling in the bridge field from the specified context. |
CVS $Id: LSEW_ctx.h,v 1.10 2011/03/26 17:35:24 russell Exp $
Typedef for struct _LSEW_ctxHdr_bf.
This word is the second word of the contribution header for the LSE_etx records. The 16-bit opaque field has been divided in 2 4-bit fields and 1 8-bit reserved field
Typedef for struct _LSEW_ctxHdr_us.
This word is the second word of the contribution header for the LSE_etx records. The 16-bit opaque field has been divided in 2 4-bit fields and one 8 bit field
In this structure the opaque word is represented as a single 16-bit field.
Typedef for LSEW_ctxIds.
Typedef for struct _LSEW_ctxPvt.
This piece concerns only the internal details of managing the standard context. It is never exported.
unsigned int* LSEW_ctxCloseAdd | ( | LSEW_ctx * | ctx, | |
unsigned int * | cur, | |||
unsigned int | len32, | |||
unsigned int | reason | |||
) |
Called when an event datagram is filled, it completes the opening LSE_etxCtb contribution by filling in the bridge field from the specified context.
cur | The current fill point in the event datagram. | |
len32 | The number of 32-bit words available. | |
ctx | The context structure. | |
reason | One of an enumerated list of reasons why this datagram is being closed. |
References _LSE_etxBridge::bf, _LSE_etxBridge_bf::close, _LSEW_ctxPvt::etx, _LSE_etxCtb::hdr, _LSEW_ctx::pvt, and _LSE_etxBridge::ub.
Referenced by LSEW_dgmClose().
void LSEW_ctxInit | ( | LSEW_ctx * | ctx, | |
LSF_CPU_K | cpu, | |||
LSF_ORIGIN_K | origin | |||
) |
!!! KLUDGE - None of the stuff following belongs here (except the INIT)
!!! KLUDGE - None of the stuff following belongs here (except the INIT)
ctx | The Timer/Counter context structure to initialize | |
cpu | The CPU producing this data | |
origin | The originating data source (the LAT, GLEAM, etc) |
References _LSE_did_pid::bf, _LSE_did_pid_bf::cpu, _LSEW_ctxPub::did, _LSEW_ctxIds::etx_abrv, _LSEW_ctxIds::etx_full, _LSEW_ctxPvt::ids, LSE_ID_K_ETX_ABBREVIATED, LSE_ID_K_ETX_FULL, LSE_ID_K_TIM_ABBREVIATED, LSE_ID_K_TIM_FULL, _LSE_did_pid_bf::origin, _LSE_did::pid, _LSEW_ctx::pub, _LSEW_ctx::pvt, _LSEW_ctxIds::tim_abrv, and _LSEW_ctxIds::tim_full.
Referenced by LSEW_dgmInit().
void LSEW_ctxModeChange | ( | LSEW_ctx * | ctx, | |
LSF_MODE_K | mode | |||
) |
Changes the current data-taking mode.
ctx | The destination context | |
mode | The new data-taking mode |
References _LSE_did_mcd::bf, _LSE_did_mcd_bf::chg, _LSEW_ctxPub::did, _LSE_did::mcd, _LSE_did_mcd_bf::mode, and _LSEW_ctx::pub.
Referenced by LSEW_dgmModeChange().
unsigned int* LSEW_ctxOpenAdd | ( | LSEW_ctx * | ctx, | |
unsigned int * | cur, | |||
unsigned int | len32, | |||
unsigned int | reason, | |||
unsigned int | sequence, | |||
const EBF_gem * | gem | |||
) |
Updates the Time/Counter context structure and inserts the the start of the appropriate (full or abbreviated) LSE_etxCtb contribution into the event datagram.
ctx | The context structure | |
cur | The current write pointer | |
len32 | The number of 32-bit words that are available | |
reason | One of an enumerated list describing why the datagram is being opened. | |
sequence | The sequence number of the next event. If the MSB of this value is set, no updating of extended counters is done. The caller may wish to by-pass this updating because it was already done. For example, this happens in the case of event failing to fit into the previous datagram. Here the update has already occurred. | |
gem | The GEM data record of the next event |
References _LSE_etxCtbCommon::bdy, _LSE_etxCtb::com, complete_etx(), copy_xcr(), _LSEW_ctxPub::did, _LSE_etxBdyCommon::did, _LSEW_ctxPvt::etx, fill_and_update_did(), _LSEW_ctxPub::gem, _LSEW_ctx::pub, _LSEW_ctx::pvt, update_xcr(), _LSEW_ctxGem::xcr, and _LSE_etxBdyCommon::xcr.
Referenced by LSEW_dgmOpen().
void LSEW_ctxRunStart | ( | LSEW_ctx * | ctx, | |
unsigned int | runId, | |||
unsigned int | startTime, | |||
LSF_MODE_K | mode | |||
) |
Sets the context for a new run.
ctx | The destination context | |
runId | The run identifier | |
startTime | The run start time rounded to the nearest second | |
mode | The running mode |
References _LSE_did_mcd::bf, _LSE_did_pid::bf, _LSE_did_mcd_bf::chg, _LSE_did_mcd_bf::dgm, _LSEW_ctxPub::did, _LSEW_ctxPub::gem, _LSE_did::mcd, _LSE_did_mcd_bf::mode, _LSE_did::pid, _LSEW_ctx::pub, _LSE_did_pid_bf::run, and _LSE_did::tim.
Referenced by LSEW_dgmRunStart().
unsigned int* LSEW_ctxUpdateAdd | ( | LSEW_ctx * | ctx, | |
unsigned int * | cur, | |||
unsigned int | len32, | |||
unsigned int | sequence, | |||
const EBF_gem * | gem | |||
) |
Updates the Time/Counter context structure and inserts an Time contribution in the data stream if necessary.
ctx | The context structure | |
cur | The current write pointer | |
len32 | The number of 32-bit words available. | |
sequence | The sequence number of the next event | |
gem | The GEM data record of the next event |
References ctx_update(), _LSEW_ctxPub::gem, LSE__elapsedSet(), _LSEW_ctx::pub, and update_xcr().
Referenced by LSEW_dgmUpdate().