GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> LSEC / dev > lsec / rhel5-64


Interface   Data Structures   File List   Data Fields   Globals  

LSEC.h File Reference

Public definitions for the calibration event system. More...

#include <LSEC/LSEC_ctx.h>
#include <EDS/EBF_pkt.h>

Typedefs

typedef enum _LSEC_compLevel LSEC_compLevel
 Compression level values.
typedef enum _LSEC_evtStatus LSEC_evtStatus
 Event processing status values.
typedef struct _LSEC_control LSEC_control
 Declaration of the opaque control structure.

Enumerations

enum  _LSEC_compLevel {
  LSEC_COMP_NORM = 0,
  LSEC_COMP_ONLY = 1,
  LSEC_COMP_NONE = 2,
  LSEC_COMP_DROP = 3
}
 Compression level values. More...
enum  _LSEC_evtStatus {
  LSEC_EVT_FREE = 0x01,
  LSEC_EVT_DONE = 0x02
}
 Event processing status values. More...

Functions

void LSEC_clearEvent (LSEC_control *lsec)
 Clear the event processor for the next data collection.
unsigned LSEC_consign (LSEC_control *lsec)
 Complete the consignment of the event data.
LSEC_ctxLSEC_getCtx (LSEC_control *lsec)
 Get the address of the context structure.
void LSEC_getTimes (LSEC_control *lsec, long long *times)
 Get the contents of the processing times array.
LSEC_controlLSEC_initialize (unsigned cpuid, unsigned srcid, unsigned cap)
 Initialize the calibration event system.
void LSEC_initRun (LSEC_control *lsec, unsigned runid, unsigned mode, LSEC_compLevel comp)
 Initialize a new calibration run.
LSEC_evtStatus LSEC_processEvent (LSEC_control *lsec, unsigned int edw, EBF_pkt *pkt)
 Process an event.
void LSEC_setReason (LSEC_control *lsec, int reason)
 Set the current datagram close reason.
void LSEC_terminate (LSEC_control *lsec)
 Free the resources used by the calibration event system.


Detailed Description

Public definitions for the calibration event system.

Author:
Owen Saxton
$Id: LSEC.h,v 1.5 2011/03/27 17:33:21 saxton Exp $

Enumeration Type Documentation

Compression level values.

Enumerator:
LSEC_COMP_NORM  Normal compression.
LSEC_COMP_ONLY  No compression and send only data for type.
LSEC_COMP_NONE  No compression and send all data.
LSEC_COMP_DROP  Drop all the data on the floor.

Event processing status values.

Enumerator:
LSEC_EVT_FREE  Free the packet.
LSEC_EVT_DONE  Event is complete.


Function Documentation

void LSEC_clearEvent ( LSEC_control lsec  ) 

Clear the event processor for the next data collection.

Parameters:
lsec Control handle, returned by LSEC_initialize.

References _LSEC_control::evt, and LSEC_eventClear().

unsigned LSEC_consign ( LSEC_control lsec  ) 

Complete the consignment of the event data.

Parameters:
lsec Control handle, returned by LSEC_initialize.
Return values:
LSEC_SUCCESS If all goes well

References _LSEC_control::cns, and LSEC_consProcess().

LSEC_ctx* LSEC_getCtx ( LSEC_control lsec  ) 

Get the address of the context structure.

Parameters:
lsec Control handle, returned by LSEC_initialize.
Returns:
The address of the context structure

References _LSEC_control::cns, and LSEC_consCtxGet().

void LSEC_getTimes ( LSEC_control lsec,
long long *  times 
)

Get the contents of the processing times array.

Parameters:
lsec Control handle, returned by LSEC_initialize.
times Address of an array to receive the processing times. It must contain at least LSEC_N_TIMES entries.

References LSEC_N_TIMES, LSEC_TIM_ACM, LSEC_TIM_CPC, LSEC_TIM_ENC, LSEC_TIM_EVT, _LSEC_control::save, and _LSEC_control::times.

LSEC_control* LSEC_initialize ( unsigned  cpuid,
unsigned  srcid,
unsigned  cap 
)

Initialize the calibration event system.

This routine creates the components of the calibration event system.

Parameters:
srcid ID of the data source
cpuid ID of the CPU the calibration is being run on
cap The capacity (in events) of the system
Returns:
Handle for further access to the system, or NULL if initialization failed.

References _LSEC_control::cns, _LSEC_control::cpc, _LSEC_control::evt, LSEC_consCreate(), LSEC_consCtxGet(), LSEC_eventCreate(), LSEC_newCompaction(), LSEC_setContext(), LSEC_terminate(), and _LSEC_control::times.

void LSEC_initRun ( LSEC_control lsec,
unsigned  runid,
unsigned  mode,
LSEC_compLevel  comp 
)

Initialize a new calibration run.

This routine sets the runid and start time for the first datagram of a new calibration.

Parameters:
lsec Control handle, returned by LSEC_initialize.
runid 32-bit number identifying the calibration run
mode The calibration mode (ACD, CAL or TKR)
comp The compression level (normal, only, none)

References _LSEC_control::cns, _LSEC_control::cpc, _LSEC_control::evt, LSEC_COMP_DROP, LSEC_COMP_NORM, LSEC_consEventCal(), LSEC_consEventImm(), LSEC_consPrepare(), LSEC_eventPrepare(), LSEC_eventProcSet(), LSEC_setMode(), _LSEC_control::save, and _LSEC_control::times.

LSEC_evtStatus LSEC_processEvent ( LSEC_control lsec,
unsigned int  edw,
EBF_pkt *  pkt 
)

Process an event.

Parameters:
lsec Control handle, returned by LSEC_initialize.
edw The event descriptor word.
pkt The event packet.
Returns:
The OR of zero or more of the bits:

References _LSEC_control::evt, and LSEC_eventProcess().

void LSEC_setReason ( LSEC_control lsec,
int  reason 
)

Set the current datagram close reason.

Parameters:
lsec Control handle, returned by LSEC_initialize.
reason The reason code to be set

References _LSEC_control::cns, and LSEC_consReason().

void LSEC_terminate ( LSEC_control lsec  ) 

Free the resources used by the calibration event system.

Parameters:
lsec Control handle, returned by LSEC_initialize.

References _LSEC_control::cns, _LSEC_control::cpc, _LSEC_control::evt, LSEC_consDelete(), LSEC_deleteCompaction(), and LSEC_eventDelete().

Referenced by LSEC_initialize().


Generated on Mon Mar 28 10:58:03 2011 by  doxygen 1.5.8