GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> LSEC / V7-0-0 > lsec / rad750


Interface   Data Structures   File List   Data Fields   Globals  

event.c File Reference

Routines that handle raw event data. More...

#include "LSEC_p.h"
#include "LSEC/LSEC.h"
#include "LSEC/LSEC_msgs.h"
#include "EDS/EBF_dir.h"
#include "EDS/EBF_edw.h"
#include "EDS/EBF_siv.h"
#include "PBS/MBA.h"
#include "MSG/MSG_pubdefs.h"
#include <string.h>

Classes

struct  _LSEC_event
 Structure holding raw event data. More...

Enumerations

enum  { MAX_OVERHEAD_PER_EVENT = sizeof(EBF_pktHdr) * 8 * 56 }
 Various constants. More...

Functions

void LSEC_eventClear (LSEC_event *evt)
 Clear the stored event data.
LSEC_eventLSEC_eventCreate (int cap, long long *times)
 Create a new event structure.
void LSEC_eventDelete (LSEC_event *evt)
 Delete the previously allocated event structure.
EBF_dir * LSEC_eventGet (LSEC_event *evt)
 Get the EBF directory pointer for the next stored event.
void LSEC_eventPrepare (LSEC_event *evt, int save)
 Prepare for a new run.
unsigned LSEC_eventProcess (LSEC_event *evt, unsigned int edw, EBF_pkt *pkt)
 Process an event packet.
void LSEC_eventProcSet (LSEC_event *evt, LSEC_eventProcRtn *rtn, void *parm)
 Set the event processing routine to use.
void LSEC_eventRestart (LSEC_event *evt)
 Reset event store reading to start over.


Detailed Description

Routines that handle raw event data.

Author:
Owen Saxton
$Id: event.c,v 1.3 2010/05/03 16:31:39 saxton Exp $

Enumeration Type Documentation

anonymous enum

Various constants.

Enumerator:
MAX_OVERHEAD_PER_EVENT  Maximum fragmentation gives 8 pktHdrs and 8 event descriptor words per KB,.


Function Documentation

void LSEC_eventClear ( LSEC_event evt  ) 

Clear the stored event data.

Parameters:
evt Pointer to an event structure.

LSEC_event* LSEC_eventCreate ( int  cap,
long long *  times 
)

Create a new event structure.

Parameters:
cap The maximum number of events that can be stored.
times Address of the processing times array.
Returns:
A pointer to the new event structure, or NULL if there is insufficient memory available.

void LSEC_eventDelete ( LSEC_event evt  ) 

Delete the previously allocated event structure.

Parameters:
evt Pointer to allocated, intialised event structure

EBF_dir* LSEC_eventGet ( LSEC_event evt  ) 

Get the EBF directory pointer for the next stored event.

This routine return a pointer to the directory of the next event and advances the read counter.

Parameters:
evt Pointer to an event structure
Returns:
Pointer to the directory of the next event, or NULL if there are no more events.

void LSEC_eventPrepare ( LSEC_event evt,
int  save 
)

Prepare for a new run.

Parameters:
evt Pointer to allocated, intialised event structure
save TRUE if events are to be saved, FALSE otherwise.

unsigned LSEC_eventProcess ( LSEC_event evt,
unsigned int  edw,
EBF_pkt *  pkt 
)

Process an event packet.

This routine is called whenever a new event packet arrives.

Parameters:
evt Pointer to an event structure
edw Description of the event (a thirty-two bit number that indicates, among other things, errors in the event transmission)
pkt Pointer to the event packet
Returns:
The OR of zero or more of the bits:

void LSEC_eventProcSet ( LSEC_event evt,
LSEC_eventProcRtn rtn,
void *  parm 
)

Set the event processing routine to use.

Parameters:
evt Pointer to an event structure.
rtn Pointer to the processing routine.
parm Parameter to pass to the processing routine.

void LSEC_eventRestart ( LSEC_event evt  ) 

Reset event store reading to start over.

Parameters:
evt Pointer to an event structure.


Generated on Wed May 26 10:22:55 2010 by  doxygen 1.5.3