GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > LSE / V1-3-6
Constituent: lsew     Tag: rad750
#include "LSF/LSF.h"
#include "LSEW_ctx.h"
#include "LSE/LSE_ids.h"
#include "LSE/LSEW_dgm.h"
#include "LSE_time.ih"
#include "CCSDS/CCSDS_pkt.h"
#include <string.h>
Include dependency graph for LSEW_dgm.c:
Data Structures | |
struct | _LSEW_dgm |
Control structure for outputing events. More... | |
Defines | |
#define | RND_UP(_x, _r) ( (((int)(_x)) + (_r) - 1) & ~((_r) - 1) ) |
Rounds _x up to the nearest multiple of _r. | |
#define | MAXIMUM_EVENTS_PER_CONTRIBUTION 255 |
Sets the maximum number of events that can be committed to one event contribution. | |
Typedefs | |
typedef _LSEW_dgm | LSEW_dgm |
Typedef for struct _LSEW_dgm. | |
Functions | |
static __inline unsigned int | evt_size (void) |
Returns the minimum size of a new event contribution. | |
static __inline unsigned int * | evt_open (unsigned int *beg) |
Opens a new event record contribution. | |
static __inline unsigned int * | evt_close (unsigned int *beg, const unsigned int *end, unsigned int id, unsigned short int bridge) |
Closes out (completes) the current event contribution by filling in the LSF event header. | |
static __inline void | datagram_close (unsigned int *beg, const unsigned int *end, unsigned int dgm_id) |
Closes out (completes) the current data packet by filling in the LSF packet header. | |
static __inline unsigned int * | ccsds_complete (unsigned int *beg, unsigned char *dat, unsigned int *lsf, unsigned int *evt, unsigned int *end, unsigned int nevts, unsigned int apid, unsigned int seq) |
Completes the CCSDS header. | |
unsigned int | LSEW_dgmSizeof (void) |
The size, in bytes, of the control structure. | |
unsigned int | LSEW_dgmInit (LSEW_dgm *dgm, unsigned short int apid, unsigned int dgm_id, LSF_CPU_K cpu, LSF_ORIGIN_K origin) |
Initializes the control structure. | |
int | LSEW_dgmBufSet (LSEW_dgm *dgm, unsigned int *buf, int buf_size) |
Sets the specified buffer as the new output buffer. | |
void | LSEW_dgmRunStart (LSEW_dgm *dgm, unsigned int runId, unsigned int startTime, LSF_MODE_K mode) |
Sets the context for a new run. | |
void | LSEW_dgmModeChange (LSEW_dgm *dgm, LSF_MODE_K mode) |
Changes the current data-taking mode. | |
unsigned int * | LSEW_dgmOpen (LSEW_dgm *dgm, unsigned int reason, unsigned int evt_seq, const EBF_gem *gem) |
Opens a new event datagram. | |
unsigned int * | LSEW_dgmEvtOpen (LSEW_dgm *dgm, unsigned int *cur) |
Opens a new event datagram. | |
void | LSEW_dgmRootClose (LSEW_dgm *dgm, const unsigned int *end) |
unsigned int * | LSEW_dgmEvtCommit (LSEW_dgm *dgm, unsigned int *cur) |
Commits this event. This does two things, updates the current write pointer and increments the number of events in this contribution. | |
unsigned int * | LSEW_dgmEvtClose (LSEW_dgm *dgm) |
Completes the final processing of an event just before it is presented to the output stream. | |
unsigned int * | LSEW_dgmUpdate (LSEW_dgm *dgm, unsigned int evt_seq, const EBF_gem *gem) |
Updates the current datagram, adding a time record if necessary. | |
unsigned int * | LSEW_dgmCommit (LSEW_dgm *dgm, unsigned int *cur) |
Commits the current write by updating the write potnter. | |
unsigned int * | LSEW_dgmClose (LSEW_dgm *dgm, unsigned int *cur, unsigned int reason) |
Closes out the datagram; it is now ready to be written out. | |
const LSEW_ctxPub * | LSEW_dgmCtxPub (const LSEW_dgm *dgm) |
Returns a pointer to the public context structure. | |
unsigned int * | LSEW_dgmBeg (const LSEW_dgm *dgm) |
Returns the value of the beginning of the specified event datagram. | |
unsigned int * | LSEW_dgmCur (const LSEW_dgm *dgm) |
Returns the value of the beginning of the specified event datagram. | |
unsigned int * | LSEW_dgmEnd (const LSEW_dgm *dgm) |
Returns the value of the end of the specified event datagram. | |
unsigned int | LSEW_dgmLeft32 (const LSEW_dgm *dgm) |
Returns the number of 32 words left in the buffer. |
CVS $Id: LSEW_dgm.c,v 1.14 2008/08/26 16:09:24 russell Exp $
|
Sets the maximum number of events that can be committed to one event contribution. This value is set by the width of the bridge word in the LSF contribution header (1 byte) |
|
Rounds _x up to the nearest multiple of _r.
|
|
Completes the CCSDS header.
|
|
Closes out (completes) the current data packet by filling in the LSF packet header.
|
|
Closes out (completes) the current event contribution by filling in the LSF event header.
|
|
Opens a new event record contribution.
|
|
Returns the minimum size of a new event contribution.
|
|
Returns the value of the beginning of the specified event datagram.
|
|
Sets the specified buffer as the new output buffer.
|
|
Closes out the datagram; it is now ready to be written out.
|
|
Commits the current write by updating the write potnter.
|
|
Returns a pointer to the public context structure.
|
|
Returns the value of the beginning of the specified event datagram.
|
|
Returns the value of the end of the specified event datagram.
|
|
Completes the final processing of an event just before it is presented to the output stream.
|
|
Commits this event. This does two things, updates the current write pointer and increments the number of events in this contribution.
|
|
Opens a new event datagram.
|
|
Initializes the control structure.
|
|
Returns the number of 32 words left in the buffer.
|
|
Changes the current data-taking mode.
|
|
Opens a new event datagram.
|
|
|
|
Sets the context for a new run.
|
|
Updates the current datagram, adding a time record if necessary.
|