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


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.
unsigned int * LSEC_eventGet (LSEC_event *evt)
 Get the address of the next stored event.
void LSEC_eventPrepare (LSEC_event *evt)
 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.
unsigned int * LSEC_eventPut (LSEC_event *evt)
 Get the address of the next event to store.
void LSEC_eventRewind (LSEC_event *evt)
 Rewind the event store reading to the beginning.


Detailed Description

Routines that handle raw event data.

Author:
Owen Saxton
$Id: event.c,v 1.4 2010/08/12 21:17:33 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

unsigned int* LSEC_eventGet ( LSEC_event evt  ) 

Get the address of the next stored event.

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

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

void LSEC_eventPrepare ( LSEC_event evt  ) 

Prepare for a new run.

Parameters:
evt Pointer to allocated, intialised event structure

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.

unsigned int* LSEC_eventPut ( LSEC_event evt  ) 

Get the address of the next event to store.

This routine return a pointer to the next event that can be stored and advances the write pointer.

Parameters:
evt Pointer to an event structure
Returns:
Pointer to the next event to store, or NULL if the storage area is filled to capacity.

void LSEC_eventRewind ( LSEC_event evt  ) 

Rewind the event store reading to the beginning.

Parameters:
evt Pointer to an event structure.


Generated on Mon Aug 23 10:03:14 2010 by  doxygen 1.5.3