GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> LCI / V6-0-0 > lci / mv2304


Interface   Data Structures   File List   Data Fields   Globals  

consign.h File Reference

Public definitions of the consignment structure and functions. More...

#include "configure.h"
#include "collect.h"
#include "LSEC/compact.h"
#include "PBS/WCT.h"

Typedefs

typedef enum
_LCI_compLevel 
LCI_compLevel
 Compression level values.
typedef struct
_LCI_consignment 
LCI_consignment
 Declaration of the opaque consignment structure.

Enumerations

enum  _LCI_compLevel {
  LCI_COMP_NORM = 0,
  LCI_COMP_ONLY = 1,
  LCI_COMP_NONE = 2
}
 Compression level values. More...

Functions

unsigned LCI_consComplete (LCI_consignment *cns)
 Complete a consignment.
LCI_consignmentLCI_consCreate (unsigned cpuid, unsigned srcid, LCI_configuration *cnf, LCI_collection *cll, LSEC_compaction *cpc)
 Allocate memory for an LCI_consigment structure and initialise (clear).
void LCI_consDelete (LCI_consignment *cns)
 Free the previously allocated consignment structure.
unsigned LCI_consign (LCI_consignment *cns, LCI_compLevel comp)
 Perform a consignment.
WCT_time_sat LCI_consPrepare (LCI_consignment *cns, unsigned runid)
 Set the runid and start time for the first datagram of the new calibration.
void LCI_consReason (LCI_consignment *cns, int reason)
 Set the current datagram close reason.
void LCI_consTimes (LCI_consignment *cns, int clear, long long *raw_time, long long *tot_time)
 Return accumulated consignment time.


Detailed Description

Public definitions of the consignment structure and functions.

Author:
James Swain & Owen Saxton
Id

Enumeration Type Documentation

enum _LCI_compLevel

Compression level values.

Enumerator:
LCI_COMP_NORM  Normal compression.
LCI_COMP_ONLY  No compression, but send only data for type.
LCI_COMP_NONE  No compression and send everything.


Function Documentation

unsigned LCI_consComplete ( LCI_consignment cns  ) 

Complete a consignment.

Parameters:
cns pointer to the consignment
Return values:
LCI_SUCCESS If all goes well

LCI_consignment* LCI_consCreate ( unsigned  cpuid,
unsigned  srcid,
LCI_configuration cnf,
LCI_collection cll,
LSEC_compaction *  cpc 
)

Allocate memory for an LCI_consigment structure and initialise (clear).

Parameters:
srcid ID of the data source
cpuid ID of the CPU LCI is being run on
cll Pointer to the collection of events to consign
cpc Pointer to the compaction state information
cnf Pointer to the configuration data
Returns:
Pointer to an allocated, initialised consignment (NULL if there is an error allocating memory)

void LCI_consDelete ( LCI_consignment cns  ) 

Free the previously allocated consignment structure.

Parameters:
cns Pointer to allocated, intialised consignment structure (from LCI_consCreate)

unsigned LCI_consign ( LCI_consignment cns,
LCI_compLevel  comp 
)

Perform a consignment.

Parameters:
cns Pointer to a consignment structure
comp The compression level to use.
Return values:
LCI_SUCCESS If all goes well

WCT_time_sat LCI_consPrepare ( LCI_consignment cns,
unsigned  runid 
)

Set the runid and start time for the first datagram of the new calibration.

Parameters:
cns Pointer to allocated, intialised consignment structure (from LCI_consCreate)
runid 32-bit number identifying the calibration run
Returns:
The run start time (as a 64-bit Spectrum Astro time)

void LCI_consReason ( LCI_consignment cns,
int  reason 
)

Set the current datagram close reason.

Parameters:
cns Pointer to the consignment structure
reason The reason code to be set

void LCI_consTimes ( LCI_consignment cns,
int  clear,
long long *  raw_time,
long long *  tot_time 
)

Return accumulated consignment time.

Parameters:
cns Pointer to a consignment structure.
clear If TRUE, clear the time after copying it.
raw_time Address of a variable to receive the accumulated time taken to process raw consignments, or NULL if no time wanted.
tot_time Address of a variable to receive the accumulated time taken to do total consignments, or NULL if no time wanted.


Generated on Thu Aug 20 14:53:30 2009 by  doxygen 1.5.3