GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > LPA / V6-1-2

Constituent: lpa_epu     Tag: rad750


Interface   Data Structures   File List   Data Fields   Globals  

LPA.c File Reference

LAT Physics Acquisition Event delivery and output management. More...

#include "LPA_prvdefs.h"
#include "LPA_utils.h"
#include "LPA_grb_post_p.h"
#include "LPA_DB/LPA_DB_schema.h"
#include "LPA/LPA_msgs.h"
#include "LPA_output_p.h"
#include "PBS/FPA.h"
#include "PBS/FORK.h"
#include "LCBD/LCB.h"
#include "LCBD/LCBD.h"
#include "LCBD/LCBD_cr.h"
#include "LCBD/LCBD_evt.h"
#include "EDS/EDS_fw.h"
#include "EDS/EDS_fwServices.h"
#include "EDS/TMR.h"
#include "EDS/LCBV.h"
#include "EDS/FFS.h"
#include "EDS/io/LCBP.h"
#include "EDS_DB/EDS_DB_schema.h"
#include "EDS/EBF_match.h"
#include "EDS/EBF_pkt.h"
#include "EDS/EBF_ebw.h"
#include "LSE/LSEW_dgmFw.h"
#include "LSEP/LSEPW.h"
#include "LSF/LSF_ids.h"
#include "LSF/LSF_cpu.h"
#include "CDM/CDM_pubdefs.h"
#include "CMX/CMX_lookupPub.h"
#include "MSG/MSG_pubdefs.h"
#include "ITC/ITC_pubdefs.h"
#include "LCS/LCS_pubdefs.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>

Include dependency graph for LPA.c:


Data Structures

struct  _LPA_handler
 Contains the parameters specifying how to install an event handler. More...
struct  _LPA_poster
 Contains the parameters specifying how to output events. More...
struct  _LPA_installation
 The installation specification. More...
struct  _LPA
 The LPA control structure. More...

Typedefs

typedef _LPA_handler LPA_handler
 Typedef for struct _LPA_hander.
typedef _LPA_poster LPA_poster
 Typedef for struct _LPA_poster.
typedef _LPA_installation LPA_installation
 Typedef for struct _LPA_installation.
typedef _LPA LPA
 Typedef for struct _LPA.

Functions

static unsigned int LPA_configOutput (LPA *lpa, LPA_DB_Schema *schema)
 Configures the output routine.
static unsigned int LPA_configHandlers (LPA *lpa, LPA_DB_Schema *schema, unsigned int instance)
 Configures the event handlers.
static unsigned int LPA_install (LPA *lpa, unsigned int list, unsigned int instance)
 Install configured handlers into the EDS framework.
static unsigned int LPA_translate (LPA *lpa, unsigned int handlers)
 Translates an LPA handler mask to an EDS handler mask.
static __inline int LPA_isFirstPkt (const EBF_pkt *pkt)
 Determine if packet is the first of an event.
static __inline int LPA_isLastPkt (unsigned int edw)
 Determine if packet is the last of an event.
int LPA_startMarkerProcess (void *prm, unsigned int edw, LCBD_evt *lcb_pkt)
 The start marker event handler callback This routine intercepts marker events and notifies LPA.
int LPA_stopMarkerProcess (void *prm, unsigned int edw, LCBD_evt *lcb_pkt)
 The stop marker event handler callback This routine intercepts marker events and notifies LPA.
LPALPA_construct (LPA_RespCb cb)
 Preinitializes an LPA control block.
void LPA_destruct (void *lpa)
 Destroys an LPA control block.
int LPA_connect_start_marker (LPA *lpa)
 Connects the LCB's event callback handler to the LPA start marker event handler.
int LPA_connect_stop_marker (LPA *lpa)
 Connects the LCB's event callback handler to the LPA marker event handler.
int LPA_connect_eds (LPA *lpa)
 Connects the LCB's event callback handler to the Event Delivery Service's handler.
int LPA_disconnect (LPA *lpa)
 Disconnects the LCB's event callback handler from the active event handler callback and restores the original handler.
unsigned int LPA_configure (LPA *lpa, const LPA_DB_Schema *schema, unsigned int instance, unsigned int sbc_key)
 Configures datagram, output, and handlers for LPA.
unsigned int LPA_startRun (LPA *lpa, unsigned int run_id, unsigned int mode, unsigned int time, unsigned int reason, unsigned int latc_key, unsigned int lpa_key)
 Start the physics acquisition run.
unsigned int LPA_change_handlers (LPA *lpa, unsigned int newState, unsigned int handlers)
 Requests enabling/disabling of the specified list of handlers.
unsigned int LPA_change_eds_out (LPA *lpa, unsigned int newState, unsigned int streams)
 Requests state change for the specified output streams.
unsigned int LPA_change_post_out (LPA *lpa, unsigned int newState)
 Requests state change for the specified output streams.
unsigned int LPA_change_grb (LPA *lpa, unsigned int id)
 Change the active GRB processor.
unsigned int LPA_get_post_count (LPA *lpa, unsigned int out_type)
 Get the output post count.
unsigned int LPA_change_compress (LPA *lpa, unsigned int level, unsigned int *set_level)
 Requests a change for the specified compression level.
unsigned int LPA_select (LPA *lpa, unsigned int mode)
 Changes mode for the specified list of handlers.
unsigned int LPA_modeAssociate (LPA *lpa, unsigned int handlers, unsigned int mode, unsigned int cfg_id)
 Associate a mode with a set of handlers.
unsigned int LPA_flush (LPA *lpa, unsigned int handlers, unsigned int reason)
 Requests the specified list of handlers to flush their output.

Detailed Description

LAT Physics Acquisition Event delivery and output management.

Author:
S.Maldonado - smaldona@slac.stanford.edu
    CVS $Id: LPA.c,v 1.20 2007/05/21 16:40:41 smaldona Exp $
   

Function Documentation

unsigned int LPA_change_compress LPA lpa,
unsigned int  level,
unsigned int *  set_level
 

Requests a change for the specified compression level.

Returns:
Compression level set
Parameters:
lpa The LPA control structure
level The requested compression level
set_level Storage for actual value applied

unsigned int LPA_change_eds_out LPA lpa,
unsigned int  newState,
unsigned int  streams
 

Requests state change for the specified output streams.

Returns:
A list, in the form of a bit mask, of the previous state
Parameters:
lpa The LPA control structure
newState The EDS post streams state
streams The LPA post streams to change

unsigned int LPA_change_grb LPA lpa,
unsigned int  id
 

Change the active GRB processor.

Returns:
Previous active GRB processor
Parameters:
lpa The LPA control structure
id The GRB processor ID

unsigned int LPA_change_handlers LPA lpa,
unsigned int  newState,
unsigned int  handlers
 

Requests enabling/disabling of the specified list of handlers.

Returns:
A list, in the form of a bit mask, of the previously enabled handlers
Parameters:
lpa The LPA control structure
newState A list, in the form of a bit mask, of the new state of the target list of handlers (0=Disable, 1=Enable)
handlers A list, in the form of a bit mask, of the target list handlers. Only those handlers with a set bit will be affected.

unsigned int LPA_change_post_out LPA lpa,
unsigned int  newState
 

Requests state change for the specified output streams.

Returns:
A list, in the form of a bit mask, of the previous state
Parameters:
lpa The LPA control structure
newState The LPA post streams state

static unsigned int LPA_configHandlers LPA lpa,
LPA_DB_Schema *  schema,
unsigned int  instance
[static]
 

Configures the event handlers.

Returns:
LPA_success
Parameters:
lpa The LPA control handle
schema The LPA_DB schema to use when doing the configruation
instance The LPA_DB instance

static unsigned int LPA_configOutput LPA lpa,
LPA_DB_Schema *  schema
[static]
 

Configures the output routine.

Returns:
LPA_SUCCESS
Parameters:
lpa The LPA control handle
schema The LPA_DB schema to use when doing the configruation

unsigned int * LPA_configure LPA lpa,
const LPA_DB_Schema *  schema,
unsigned int  instance,
unsigned int  sbc_key
 

Configures datagram, output, and handlers for LPA.

Returns:
Status
Parameters:
lpa The LPA control handle
schema The LPA_DB schema to use when doing the configruation
instance The LPA_DB instance number
sbc_key The SBC DB file key

int LPA_connect_eds LPA lpa  ) 
 

Connects the LCB's event callback handler to the Event Delivery Service's handler.

Returns:
The status value of the LCBD_evt_cb_set
Parameters:
lpa The LPA control structure

int LPA_connect_start_marker LPA lpa  ) 
 

Connects the LCB's event callback handler to the LPA start marker event handler.

Returns:
The status value of the LCBD_evt_cb_set
Parameters:
lpa The LPA control structure

int LPA_connect_stop_marker LPA lpa  ) 
 

Connects the LCB's event callback handler to the LPA marker event handler.

Returns:
The status value of the LCBD_evt_cb_set
Parameters:
lpa The LPA control structure

LPA_construct LPA_RespCb  cb  ) 
 

Preinitializes an LPA control block.

Returns:
Pointer to the LPA device control block

LPA_destruct void *  lpa  ) 
 

Destroys an LPA control block.

Returns:
Pointer to the LPA device control block

int LPA_disconnect LPA lpa  ) 
 

Disconnects the LCB's event callback handler from the active event handler callback and restores the original handler.

Returns:
The status value of the LCBD_evt_cb_set
Parameters:
lpa The LPA control structure

unsigned int LPA_flush LPA lpa,
unsigned int  handlers,
unsigned int  reason
 

Requests the specified list of handlers to flush their output.

Returns:
A list, in the form of a bit mask, indicating which handlers failed to comply with the request
Parameters:
lpa The LPA control structure
handlers The list of handlers to flush
reason A value passed transparently to the user's flush routine. The value 0 has been reserved by the EFC facility to mean that the result vector list has been exhausted. LPA uses the value -1 to indicate a flush on TIMEOUT, and 1 to indicate a flush on stop.

unsigned int LPA_get_post_count LPA lpa,
unsigned int  out_type
 

Get the output post count.

Returns:
Output post count
Parameters:
lpa The LPA control structure
out_type Output type

static unsigned int LPA_install LPA lpa,
unsigned int  list,
unsigned int  instance
[static]
 

Install configured handlers into the EDS framework.

Returns:
LPA_SUCCESS
Parameters:
lpa The LPA control handle
list Bit mask of which handlers to install
instance The LPA DB instance

static __inline int LPA_isFirstPkt const EBF_pkt *  pkt  )  [static]
 

Determine if packet is the first of an event.

Returns:
0 or 1
Parameters:
pkt The event packet

static __inline int LPA_isLastPkt unsigned int  edw  )  [static]
 

Determine if packet is the last of an event.

Returns:
0 or 1
Parameters:
edw The event descriptor word

unsigned int LPA_modeAssociate LPA lpa,
unsigned int  handlers,
unsigned int  mode,
unsigned int  cfg_id
 

Associate a mode with a set of handlers.

Return values:
Status 

unsigned int LPA_select LPA lpa,
unsigned int  mode
 

Changes mode for the specified list of handlers.

Returns:
LPA_SUCCESS
Parameters:
lpa The LPA control structure
mode Target mode

int LPA_startMarkerProcess void *  prm,
unsigned int  edw,
LCBD_evt *  lcb_evt
 

The start marker event handler callback This routine intercepts marker events and notifies LPA.

Returns:
The fate of the event
Parameters:
prm The LPA control structure
edw The Event Descriptor Word
lcb_evt The packet to process

unsigned int LPA_startRun LPA lpa,
unsigned int  run_id,
unsigned int  mode,
unsigned int  time,
unsigned int  reason,
unsigned int  latc_key,
unsigned int  lpa_key
 

Start the physics acquisition run.

Parameters:
lpa The LPA control structure
run_id The ground run ID
mode Mode to start the run in
time Start time request
reason Start run reason
latc_key LATC file key
lpa_key LPA_DB key

int LPA_stopMarkerProcess void *  prm,
unsigned int  edw,
LCBD_evt *  lcb_evt
 

The stop marker event handler callback This routine intercepts marker events and notifies LPA.

Returns:
The fate of the event
Parameters:
prm The LPA control structure
edw The Event Descriptor Word
lcb_evt The packet to process

static unsigned int LPA_translate LPA lpa,
unsigned int  handlers
[static]
 

Translates an LPA handler mask to an EDS handler mask.

Returns:
A list, in the form of a bit mask, of EDS handlers
Parameters:
lpa The LPA control structure
handlers The list of EDS handlers


Generated on Mon Aug 27 05:02:15 2007 by  doxygen 1.4.4