GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> LPA / V6-2-0 > lpa_epu / rad750


Interface   Data Structures   File List   Data Fields   Globals  

LPA_grb_post.c File Reference

Manage post buffers for GRB event packets. More...

#include <stdio.h>
#include <string.h>
#include "CDM/CDM_pubdefs.h"
#include "CMX/CMX_lookupPub.h"
#include "EDS/EDS_fw.h"
#include "EDS/EDS_fwServices.h"
#include "GRB/GRB_epu.h"
#include "GRB/GRB_msgdef.h"
#include "GRB/GRB_pktdef.h"
#include "GRB_DB/GRB_DB_schema.h"
#include "IMM/RBM_pubdefs.h"
#include "ITC/ITC_pubdefs.h"
#include "LCBD/LCBD_drv.h"
#include "LCBD/LCBD_evt.h"
#include "LPA/LPA_msgs.h"
#include "LPA_DB/LPA_DB_grb_epu_schema.h"
#include "LSF/LSF_reason.h"
#include "MSG/MSG_pubdefs.h"
#include "PBS/WCT.h"
#include "LPA_grb_post_p.h"
#include "LPA_slvdefs.h"
#include "LPA_utils.h"
#include "GRBS/../src/GRBS_epu_p.h"

Functions

static int LPA_grbPostStart (void *prm, int reason, unsigned int run_id, unsigned int startTime, unsigned int mode, unsigned int hw_key, unsigned int cfg_key)
 The post start routine.
static void LPA_grbPostWrite (void *prm, EDS_fwIxb *ixb)
 The post write routine.
static int LPA_grbPostNotify (void *prm, unsigned int mode, unsigned int active, const unsigned char cfgs[32], void *rsdTbl)
 The post notify routine.
static int LPA_grbPostFlush (void *prm, int reason)
 The post flush routine.
static WUT_cb_status LPA_grbWutExpire (void *prm, WUT_tmr *wut)
 Fork a message to GRB slave processing to force a packet to be sent.
static FORK_cb_status LPA_grbWutFork (FORK_cb_prm *prm, FORK_msg_hdr *hdr)
 Fork routine for processing "GRB packet flush on time" operations.
static unsigned int LPA_grbPostIt (LPA_GrbPostCtl *gpc, GRB_pktCloseReason closeOn, GRB_pktOpenReason openOn)
 Utility to do some management and call the actual flush routine.
const
EDS_fwPostServices * 
LPA_constructGrbPostSvc (LPA_GrbPostCtl *gpc, EDS_fw *eds, void *postRtn, void *postPrm, unsigned int *buf, int buf_size)
 Construct the GRB output services.
unsigned int LPA_grbPostCtlSizeOf (void)
 Retrieves the GRB post services control block size.
int LPA_setGrbProcessor (void *prm, unsigned int id)
 Select the GRB processor to use.


Detailed Description

Manage post buffers for GRB event packets.

CVS $Id: LPA_grb_post.c,v 1.7 2009/04/30 01:12:13 apw Exp $
Author:
S.Maldonado

A.P.Waite


Function Documentation

const EDS_fwPostServices * LPA_constructGrbPostSvc ( LPA_GrbPostCtl gpc,
EDS_fw *  eds,
void *  postRtn,
void *  postPrm,
unsigned int *  buf,
int  buf_size 
)

Construct the GRB output services.

Parameters:
gpc (in) The GRB poster control handle
eds (in) The EDS framework handle
postRtn (in) Routine to post the formatted GRB summary
postPrm (in) Parameter passed to the post routine
buf (in) The first, preallocated buffer to fill
buf_size (in) The size, in bytes, of the ouptut buffer. Events will be packed into this buffer until full
Return values:
NULL Failure
x Success (pointer to EDS_fwPostServices)

unsigned int LPA_grbPostCtlSizeOf ( void   ) 

Retrieves the GRB post services control block size.

Returns:
Size of GRB post services control block

int LPA_grbPostFlush ( void *  prm,
int  reason 
) [static]

The post flush routine.

Parameters:
prm (in) Flush parameter (the GRB posting control block)
reason (in) Flush reason
Return values:
0 Always

static unsigned int LPA_grbPostIt ( LPA_GrbPostCtl gpc,
GRB_pktCloseReason  closeOn,
GRB_pktOpenReason  openOn 
) [static]

Utility to do some management and call the actual flush routine.

Parameters:
gpc (in) GRB posting control
closeOn (in) Close reason
openOn (in) Open reason
Return values:
LPA_SUCCESS Always

static int LPA_grbPostNotify ( void *  prm,
unsigned int  mode,
unsigned int  active,
const unsigned char  cfgs[32],
void *  rsdTbl 
) [static]

The post notify routine.

Parameters:
prm (in) Notify parameter (the GRB posting control block)
mode (in) Notification mode
active (in) Active
cfgs (in) Configurations
rsdTbl (in) Result descriptor table
Return values:
0 Always

static int LPA_grbPostStart ( void *  prm,
int  reason,
unsigned int  run_id,
unsigned int  startTime,
unsigned int  mode,
unsigned int  hw_key,
unsigned int  cfg_key 
) [static]

The post start routine.

Parameters:
prm (in) Start parameter (the GRB posting control block)
reason (in) Start reason
run_id (in) Run ID
startTime (in) Run start time
mode (in) Run mode
hw_key (in) Hardware cfg file key
cfg_key (in) Software cfg file key
Return values:
0 Always

static void LPA_grbPostWrite ( void *  prm,
EDS_fwIxb *  ixb 
) [static]

The post write routine.

Parameters:
prm (in) Write parameter (the GRB posting control block)
ixb (in) Pointer to information exchange block

static WUT_cb_status LPA_grbWutExpire ( void *  prm,
WUT_tmr *  wut 
) [static]

Fork a message to GRB slave processing to force a packet to be sent.

Parameters:
prm (in) WUT callback routine user parameter
wut (in) Wake up timer
Return values:
WUT_K_STATE_CHANGE_NO Always
Force the posting of a GRB packet to the master GRB processing task at a maximum interval.

FORK_cb_status LPA_grbWutFork ( FORK_cb_prm *  prm,
FORK_msg_hdr *  hdr 
) [static]

Fork routine for processing "GRB packet flush on time" operations.

Parameters:
prm (in) FORK parameter (unused)
hdr (in) FORK message
Return values:
FORK_C_CONTINUE Always

int LPA_setGrbProcessor ( void *  prm,
unsigned int  id 
)

Select the GRB processor to use.

Parameters:
prm (in) GRB post control handle
id (in) GRB processor ID
Return values:
0 Success
-1 Failure


Generated on Tue Sep 15 14:09:41 2009 by  doxygen 1.5.3