GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> LCI / dev > lci / rad750


Interface   Data Structures   File List   Data Fields   Globals  

collect.c File Reference

Routines to collect the event data. More...

#include <lci_p.h>
#include <LCI/LCI_msgs.h>
#include <LSEC/LSEC.h>
#include <LSEC/enums.h>
#include <LEM/list.h>
#include <LEM/defs.h>
#include <MSG/MSG_pubdefs.h>
#include <EDS/EBF_pkt.h>
#include <EDS/EBF_edw.h>
#include <LCBD/LCBD_evt.h>
#include <PBS/MBA.h>
#include <PBS/WCT.h>
#include <string.h>
#include <stdio.h>

Functions

void LCI_collClearCounts (LCI_collection *cll)
 Clear collection counters.
void LCI_collCounts (LCI_collection *cll, unsigned int *nWait, unsigned int *nSignal, unsigned int *nTimeout)
 Get collection counters.
LCI_collectionLCI_collCreate (LSEC_control *lsec)
 Allocate and initialise a collection structure.
void LCI_collDelete (LCI_collection *cll)
 Free a structure previously allocated using LCI_collCreate.
unsigned LCI_collect (LCI_collection *cll, unsigned nev, unsigned period)
 Initiate the calibration triggers and wait for each event to be collected and constructed.
unsigned LCI_collected (LCI_collection *cll)
 Get the number of events collected.
void LCI_collRunInit (LCI_collection *cll, LCBD lcbd, LEM_micr *cr)
 Initialize for a new calibration run.
void LCI_collRunTerm (LCI_collection *cll)
 Terminate a calibration run.
void LCI_collTime (LCI_collection *cll, int clear, long long *ctime)
 Return accumulated collection time.


Detailed Description

Routines to collect the event data.

Author:
James Swain & Owen Saxton
$Id: collect.c,v 1.14 2011/03/29 19:32:56 saxton Exp $

Function Documentation

void LCI_collClearCounts ( LCI_collection cll  ) 

Clear collection counters.

This routine calls through to the cue counter clear routine.

Parameters:
cll Pointer to an allocated and initialised collection structure that has been used to collect events

References LCI_clearCueCounts().

Referenced by LCI_calibrate().

void LCI_collCounts ( LCI_collection cll,
unsigned int *  nWait,
unsigned int *  nSignal,
unsigned int *  nTimeout 
)

Get collection counters.

This routine calls through to the cue counters get routine, returning the counts accumulated since the last clear.

Parameters:
cll Pointer to a collection structure.
nWait Address of an integer to receive the number of wait calls, or NULL if not needed.
nSignal Address of an integer to receive the number of signal calls, or NULL if not needed.
nTimeout Address of an integer to receive the number of timeouts, or NULL if not needed.

References LCI_getCueCounts().

Referenced by LCI_terminate().

LCI_collection* LCI_collCreate ( LSEC_control *  lsec  ) 

Allocate and initialise a collection structure.

Parameters:
lsec LSEC access handle.
Returns:
Pointer to an allocated, initialised LCI_collection

References LCI_collDelete(), and LCI_newCue().

Referenced by LCI_newController().

void LCI_collDelete ( LCI_collection cll  ) 

Free a structure previously allocated using LCI_collCreate.

Parameters:
cll Pointer to an allocated and initialised LCI_collection structure

References LCI_deleteCue().

Referenced by LCI_collCreate(), and LCI_deleteController().

unsigned LCI_collect ( LCI_collection cll,
unsigned  nev,
unsigned  period 
)

Initiate the calibration triggers and wait for each event to be collected and constructed.

Parameters:
cll Pointer to an intialised event collection structure
nev Number of events to be collected
period The period (in 50 ns ticks) between triggers
Return values:
LCI_SUCCESS If all the expected events were successfully collected
LCI_LOSTEVT If some of the events were not collected

References LCI_clearCue(), and LCI_waitCue().

unsigned LCI_collected ( LCI_collection cll  ) 

Get the number of events collected.

Parameters:
cll Pointer to an allocated and initialised collection structure that has been used to collect events
Returns:
Number of events collected

void LCI_collRunInit ( LCI_collection cll,
LCBD  lcbd,
LEM_micr *  cr 
)

Initialize for a new calibration run.

This routine saves the lcbd and cr pointers and sets up the event callback routine.

Parameters:
cll Pointer to a collection structure.
lcbd Pointer to the LCB control block,
cr Pointer to a multi-item command-response list.

Referenced by LCI_calibrate().

void LCI_collRunTerm ( LCI_collection cll  ) 

Terminate a calibration run.

The event callback is set back to its original value.

Parameters:
cll Pointer to a collection structure.

Referenced by LCI_terminate().

void LCI_collTime ( LCI_collection cll,
int  clear,
long long *  ctime 
)

Return accumulated collection time.

Parameters:
cll Pointer to a collection structure.
clear If TRUE, clear the time after copying it.
ctime Address of a variable to receive the accumulated time taken to do collections, or NULL if no time wanted.

Referenced by LCI_calibrate().


Generated on Tue Sep 27 15:43:55 2011 by  doxygen 1.5.8