GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> LSEC / V7-0-0 > lsec / mv2304
#include "LSEC_p.h"
#include "LSEC/LSEC.h"
#include "LSEC/LSEC_ctx.h"
#include "LSEC/LSEC_msgs.h"
#include "LSE/LSEW_dgmFw.h"
#include "EDS/EBF_cid.h"
#include "EDS/EBF_dir.h"
#include "EDS/EBF_edw.h"
#include "EDS/EBF_gemLocate.h"
#include "EDS/EBF_siv.h"
#include "EDS/EBF_tem.h"
#include "EDS/EBF_tkr.h"
#include "ITC/ITC_pubdefs.h"
#include "PBS/BSWP.h"
#include "PBS/FPA.h"
#include "PBS/MBA.h"
#include "PBS/SEM.h"
#include "PBS/WCT.h"
#include "MSG/MSG_pubdefs.h"
#include <string.h>
Classes | |
| struct | _LSEC_consignment |
| Structure holding processed event data. More... | |
Typedefs | |
|
typedef enum _LSEC_cnsState | LSEC_cnsState |
| Consignment state. | |
| typedef unsigned | LSEC_consignRtn (LSEC_consignment *cns) |
| Definition of routine to perform the consignment. | |
Enumerations | |
| enum | _LSEC_cnsState { LSEC_CNS_EMPTY = 0, LSEC_CNS_FULL = 1 } |
| Consignment state. More... | |
| enum | { DATAGRAM_SIZE = 1024 * 128, MAX_EVENT_SIZE = 26500, SSR_APID_BASE = 0x3c5, EVT_CELL_SIZE = 4, EVT_CELL_MASK = EVT_CELL_SIZE - 1 } |
| Various constants. | |
Functions | |
| LSEC_consignment * | LSEC_consCreate (unsigned cpuid, unsigned srcid, unsigned cap, LSEC_compaction *cpc, LSEC_event *evt, long long *times) |
| Create a new consignment. | |
| LSEC_ctx * | LSEC_consCtxGet (LSEC_consignment *cns) |
| Get the address of the context structure. | |
| void | LSEC_consDelete (LSEC_consignment *cns) |
| Free the previously allocated consignment structure. | |
| unsigned | LSEC_consEventCal (void *parm, EBF_dir *dir) |
| Process a compressed CAL event. | |
| unsigned | LSEC_consEventImm (void *parm, EBF_dir *dir) |
| Process an event immediately. | |
| void | LSEC_consPrepare (LSEC_consignment *cns, unsigned runid, unsigned mode, LSEC_compLevel comp) |
| Prepare for a new calibration run. | |
| unsigned | LSEC_consProcess (LSEC_consignment *cns) |
| Process a consignment. | |
| void | LSEC_consReason (LSEC_consignment *cns, int reason) |
| Set the current datagram close reason. | |
$Id: consign.c,v 1.3 2010/05/25 16:39:53 saxton Exp $
| enum _LSEC_cnsState |
| LSEC_consignment* LSEC_consCreate | ( | unsigned | cpuid, | |
| unsigned | srcid, | |||
| unsigned | cap, | |||
| LSEC_compaction * | cpc, | |||
| LSEC_event * | evt, | |||
| long long * | times | |||
| ) |
Create a new consignment.
This routine allocates memory for a consigment structure and its associated data structures, and initialises it.
| srcid | ID of the data source | |
| cpuid | ID of the CPU the calibration is being run on | |
| cap | The capacity (in events) of the consignment | |
| cpc | Pointer to the compaction state information | |
| evt | Pointer to the event store | |
| times | Pointer to the processing times array. |
| LSEC_ctx* LSEC_consCtxGet | ( | LSEC_consignment * | cns | ) |
Get the address of the context structure.
| cns | Pointer to the consignment structure |
| void LSEC_consDelete | ( | LSEC_consignment * | cns | ) |
Free the previously allocated consignment structure.
| cns | Pointer to allocated, intialised consignment structure |
| unsigned LSEC_consEventCal | ( | void * | parm, | |
| EBF_dir * | dir | |||
| ) |
Process a compressed CAL event.
This routine starts the process by accumulating data for the CAL means calculation.
| parm | Pointer to the consignment structure | |
| dir | Pointer to the event directory |
| LSEC_SUCCESS | Success (always) |
| unsigned LSEC_consEventImm | ( | void * | parm, | |
| EBF_dir * | dir | |||
| ) |
Process an event immediately.
This routine is used to pass an event immediately to the datagram framework. It is used in all cases except compressed CAL events.
| parm | Pointer to the consignment structure | |
| dir | Pointer to the event directory |
| LSEC_SUCCESS | Success | |
| LSEC_OVERSIZE | Event too large for a datagram |
| void LSEC_consPrepare | ( | LSEC_consignment * | cns, | |
| unsigned | runid, | |||
| unsigned | mode, | |||
| LSEC_compLevel | comp | |||
| ) |
Prepare for a new calibration run.
This routine sets the runid and start time for the first datagram of a new calibration, as well as several other mode-dependent parameters.
| cns | Pointer to allocated, intialised consignment structure | |
| runid | 32-bit number identifying the calibration run | |
| mode | The calibration mode (ACD, CAL or TKR) | |
| comp | The compression level (normal, only, none) |
| unsigned LSEC_consProcess | ( | LSEC_consignment * | cns | ) |
Process a consignment.
| cns | Pointer to a consignment structure |
| LSEC_SUCCESS | If all goes well |
| void LSEC_consReason | ( | LSEC_consignment * | cns, | |
| int | reason | |||
| ) |
Set the current datagram close reason.
| cns | Pointer to the consignment structure | |
| reason | The reason code to be set |
1.5.3