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

Constituent: lci     Tag: mcp750


Interface   Data Structures   File List   Data Fields   Globals  

collect.h File Reference

The collection routines coordinate between the LCDB task recieving the event packets and the LCI task that will handle the complete events. More...

#include "EDS/EBF_pkt.h"
#include "EDS/EBF_dir.h"
#include "LCBD/LCBD_evt.h"

Include dependency graph for collect.h:

This graph shows which files directly or indirectly include this file:


Typedefs

typedef _LCI_collection LCI_collection
 Declaration of the opaque collection structure.

Functions

void LCI_clearCollCounts (LCI_collection *cll)
 Clear collection counters.
void LCI_clearCollection (LCI_collection *cll)
 Clear out anything left from a previous cycle.
void LCI_collCounts (LCI_collection *cll, unsigned int *nWait, unsigned int *nSignal, unsigned int *nTimeout)
 Get collection counters.
unsigned LCI_collect (LCI_collection *cll, unsigned nev, unsigned period)
 Initiate the calibration triggers and wait for the events to be collected and constructed.
unsigned LCI_collected (LCI_collection *cll)
 Get the number of events collected.
void LCI_deleteCollection (LCI_collection *cll)
 Free a structure previously allocated using LCI_newCollection.
unsigned LCI_evt_cb (void *prm, unsigned int dsc, LCBD_evt *pkt)
 LCI event handler that initiates the event collection.
EBF_dir * LCI_get (LCI_collection *cll)
 Return the directory of the next event (or NULL) and advance the read counter.
LCI_collectionLCI_newCollection (unsigned cap)
 Allocate and initialise an LCI_collection structure.
void LCI_put (LCI_collection *cll, unsigned edw, EBF_pkt *pkt)
 Copy the packet into the storage area, update the state information vector and compose the directory - on the last packet of the event construct the event.
void LCI_restart (LCI_collection *cll)
 Reset the read counter to 0.
void LCI_setCollectionCom (LCI_collection *cll, void *lcbd, void *cr)
 Set the communications pointers of the collection structure.

Detailed Description

The collection routines coordinate between the LCDB task recieving the event packets and the LCI task that will handle the complete events.

Author:
James Swain & Owen Saxton
Id
collect.h,v 1.7 2007/08/21 22:44:42 saxton Exp

Function Documentation

void LCI_clearCollCounts 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

void LCI_clearCollection LCI_collection cll  ) 
 

Clear out anything left from a previous cycle.

Parameters:
cll Pointer to an allocated and initialised LCI_collection structure

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 an allocated and initialised collection structure that has been used to collect events
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.

unsigned LCI_collect LCI_collection cll,
unsigned  nev,
unsigned  period
 

Initiate the calibration triggers and wait for the events 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

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_deleteCollection LCI_collection cll  ) 
 

Free a structure previously allocated using LCI_newCollection.

Parameters:
cll Pointer to an allocated and initialised LCI_collection structure

unsigned LCI_evt_cb void *  prm,
unsigned int  dsc,
LCBD_evt *  pkt
 

LCI event handler that initiates the event collection.

Parameters:
prm Pointer to the LCI_collection structure, passed through the LCBD event handler
dsc Description of the event (a thirty-two bit number that indicates, among other things, errors in the event transmission)
pkt Pointer to an event packet
Return values:
0 Indicates that the packet should be freed by the LCB driver

EBF_dir* LCI_get LCI_collection cll  ) 
 

Return the directory of the next event (or NULL) and advance the read counter.

Parameters:
cll Pointer to an allocated and initialised collection
Returns:
Pointer to the directory of the next event, or none if the collection has been exhausted.

LCI_collection* LCI_newCollection unsigned  cap  ) 
 

Allocate and initialise an LCI_collection structure.

Parameters:
cap Capacity, the maximum number of events that can be collected
Returns:
Pointer to an allocated, initialised LCI_collection

void LCI_put LCI_collection cll,
unsigned  edw,
EBF_pkt *  pkt
 

Copy the packet into the storage area, update the state information vector and compose the directory - on the last packet of the event construct the event.

Parameters:
cll Pointer to an allocated and prepared LCI_collection structure
edw Event descriptor word
pkt Pointer to the packet that just arrived on the LCB

void LCI_restart LCI_collection cll  ) 
 

Reset the read counter to 0.

Parameters:
cll Pointer to a collection structure

void LCI_setCollectionCom LCI_collection cll,
void *  lcbd,
void *  cr
 

Set the communications pointers of the collection structure.

The lcbd and cr pointers are void to avoid dragging in LCBD and LEM dependancies

Parameters:
cll Pointer to an allocated and initialised LCI_collection structure
lcbd Pointer to the LCB control block
cr Pointer to a multi-item command-response list


Generated on Mon Aug 27 02:38:45 2007 by  doxygen 1.4.4