GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> LPA / dev > lpa_epu / sun-gcc


Interface   Data Structures   File List   Data Fields   Globals  

LPA_output.c File Reference

LAT Physics Acquisition Event output control. More...

#include <LPA_output_p.h>
#include <LPA_utils.h>
#include <LPA/LPA_msgs.h>
#include <ITC/ITC_pubdefs.h>
#include <MSG/MSG_pubdefs.h>
#include <stdio.h>

Functions

static unsigned int LPA_outputConstruct (void *ctl, void *fpa)
 Allocate memory for an LPA_output structure and initialize (clear).
static unsigned int LPA_outputSizeOf (void)
 Return the size on bytes of the output control block.
static unsigned int * LPA_dgm_poster (void *prm, void *buf, int byt)
 Send event packet to SDI (instance of an event packet posting routine).
static unsigned int * LPA_grb_poster (void *prm, void *buf, int byt)
 Send GRB packet to SIU (instance of a GRB packet posting routine).
static void LPA_cb_postFree (ITC_QueueItem *qitem, unsigned int status, void *prm0, void *prm1, void *prm2, unsigned int tx)
 ITC comletion callback to return FPA buffer to FPA pool.
LPA_DB_OutputServices * LPA_getDgmOutputSvc (void)
 Retrieves the datagram output services block.
LPA_DB_OutputServices * LPA_getGrbOutputSvc (void)
 Retrieves the GRB output services block.
unsigned int LPA_setOutputStream (void *ctl, unsigned int state)
 Set the LPA output stream.
unsigned int LPA_getOutputPostCount (void *ctl, unsigned int reset)
 Get and reset the LPA output post count.

Variables

static LPA_DB_OutputServices LPA_DgmOutputSvc
 The static instance of the LPA datagram output services structure.
static LPA_DB_OutputServices LPA_GrbOutputSvc
 The static instance of the LPA GRB output services structure.


Detailed Description

LAT Physics Acquisition Event output control.

Author:
S.Maldonado - smaldona@slac.stanford.edu
    CVS $Id: LPA_output.c,v 1.8 2011/03/28 22:24:21 russell Exp $
   

Function Documentation

static void LPA_cb_postFree ( ITC_QueueItem *  qitem,
unsigned int  status,
void *  prm0,
void *  prm1,
void *  prm2,
unsigned int  tx 
) [static]

ITC comletion callback to return FPA buffer to FPA pool.

Parameters:
qitem (in) Queue item
status (in) Status code from the delivery process
prm0 (in) User param 0 (FPA control block)
prm1 (in) User param 1 (unused)
prm2 (in) User param 2 (unused)
tx (in) Failure during send phase of ITC_send() (unused)

Referenced by LPA_dgm_poster(), and LPA_grb_poster().

static unsigned int * LPA_dgm_poster ( void *  prm,
void *  buf,
int  byt 
) [static]

Send event packet to SDI (instance of an event packet posting routine).

Parameters:
prm (in) User context parameter (LPA_output structure)
buf (in) Pointer to post buffer
byt (in) Length (bytes) of post buffer
Return values:
x Unsigned int pointer to the next post buffer to use (never NULL).

References _LPA_output::fpa, LPA_cb_postFree(), _LPA_output::post_cnt, and _LPA_output::post_state.

Referenced by LPA_getDgmOutputSvc().

LPA_DB_OutputServices* LPA_getDgmOutputSvc ( void   ) 

Retrieves the datagram output services block.

Returns:
Status

References LPA_dgm_poster(), LPA_DgmOutputSvc, LPA_getOutputPostCount(), LPA_outputConstruct(), LPA_outputSizeOf(), and LPA_setOutputStream().

LPA_DB_OutputServices* LPA_getGrbOutputSvc ( void   ) 

Retrieves the GRB output services block.

Returns:
Status

References LPA_getOutputPostCount(), LPA_grb_poster(), LPA_GrbOutputSvc, LPA_outputConstruct(), LPA_outputSizeOf(), and LPA_setOutputStream().

unsigned int LPA_getOutputPostCount ( void *  ctl,
unsigned int  reset 
)

Get and reset the LPA output post count.

Returns:
Status
Parameters:
ctl Control parameter
reset Reset parameter

References _LPA_output::post_cnt.

Referenced by LPA_getDgmOutputSvc(), and LPA_getGrbOutputSvc().

static unsigned int * LPA_grb_poster ( void *  prm,
void *  buf,
int  byt 
) [static]

Send GRB packet to SIU (instance of a GRB packet posting routine).

Parameters:
prm (in) User context parameter (LPA_output structure)
buf (in) Pointer to post buffer
byt (in) Length (bytes) of post buffer
Return values:
x Unsigned int pointer to the next post buffer to use (never NULL).

References _LPA_output::fpa, LPA_cb_postFree(), _LPA_output::post_cnt, and _LPA_output::post_state.

Referenced by LPA_getGrbOutputSvc().

static unsigned int LPA_outputConstruct ( void *  ctl,
void *  fpa 
) [static]

Allocate memory for an LPA_output structure and initialize (clear).

Parameters:
ctl ID of the data source
fpa FPA pointer
Return values:
LPA_SUCCESS 

References _LPA_output::fpa, _LPA_output::post_cnt, and _LPA_output::post_state.

Referenced by LPA_getDgmOutputSvc(), and LPA_getGrbOutputSvc().

static unsigned int LPA_outputSizeOf ( void   )  [static]

Return the size on bytes of the output control block.

Return values:
Output ctl block size

Referenced by LPA_getDgmOutputSvc(), and LPA_getGrbOutputSvc().

unsigned int LPA_setOutputStream ( void *  ctl,
unsigned int  state 
)

Set the LPA output stream.

Returns:
Status
Parameters:
ctl Control parameter
state Enable state

References _LPA_output::post_cnt, and _LPA_output::post_state.

Referenced by LPA_getDgmOutputSvc(), and LPA_getGrbOutputSvc().


Generated on Mon Mar 28 16:16:53 2011 by  doxygen 1.5.8