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


Interface   Data Structures   File List   Data Fields   Globals  

LPA_grb.c File Reference

LAT Physics Acquisition Gamma Ray Burst Framework. More...

#include <string.h>
#include <stdio.h>
#include "PBS/WCT.h"
#include "PBS/MBA.h"
#include "PBS/FPA.h"
#include "ITC/ITC_pubdefs.h"
#include "ITC/ITC_drvdefs.h"
#include "ITC/ITC_msgs.h"
#include "IMM/FPM_pubdefs.h"
#include "CCSDS/CCSDS_pkt.h"
#include "CCSDS/CCSDS_swap.h"
#include "CDM/CDM_pubdefs.h"
#include "CMX/CMX_lookupPub.h"
#include "GRB_DB/GRB_DB_schema.h"
#include "GRB/GRB_siu.h"
#include "GRB/GRB_epu.h"
#include "GRB/GRB_latMsg.h"
#include "GRB/GRB_gbmMsg.h"
#include "GRB/GRB_pktdef.h"
#include "GRBU/GRBU_pubdefs.h"
#include "GRBU/GRBU_msgs.h"
#include "GRBS/GRBS_pubdefs.h"
#include "GRBS_DB/GRBS_DB_siu_schema.h"
#include "LPA_DB/LPA_DB_grb_siu_schema.h"
#include "LPA/LPA_cmddefs.h"
#include "LPA/LPA_tlmdefs.h"
#include "LPA_siu_p.h"
#include "LPA_grb_p.h"
#include "LPA/LPA_msgs.h"
#include "LPA_inline.ih"
#include "LPA_utils.h"

Functions

static unsigned int LPA_grb_load_db (void)
 Load the LPA GRB databases.
static unsigned int LPA_grb_proc_cmd (void *prm, const struct _ITC_QueueItem *qitem, void *pay, unsigned int len)
 Process cmd task messages.
static unsigned int LPA_grb_proc_ctl (void *prm, const struct _ITC_QueueItem *qitem, void *pay, unsigned int len)
 Process control task messages.
static unsigned int LPA_grb_proc_bulk (void *prm, const struct _ITC_QueueItem *qitem, void *pay, unsigned int len)
 Process bulk task messages.
static void * LPA_allocGRB (FPM_Pool *pcb, unsigned int siz, void **rtn, void **cb0, void **cb1, void **cb2)
 Allocate memory packet without timeout (ITC courtesy entry point).
static void LPA_disposeGRB (void *prm, GRBU_pktMerge *mrg)
 Dispose of a GRB merge packet.
static unsigned int LPA_handle_gbm (unsigned short fcode, void *pay)
 Callback function for the GBM commands.
static unsigned int LPA_send_lim_grb (LPA_MsgHdr *grb_msg)
 Send GRB message to LIM.
static unsigned int LPA_handle_alg_msg (LPA_GrbAlgMsg *msg)
 Callback function for the GRB Algorithm messages.
static void LPA_send_alg_msg (LPA_GrbAlgMsg *msg)
 Routine to send GRB alg messages to the GRB task control queue.
static void LPA_send_trigger (GRB_latAlertMsg *alert)
 Sends burst trigger messages.
static void LPA_send_update (GRB_latAlertMsg *alert)
 Sends burst update messages.
static void LPA_send_confirm (unsigned int dur, double ra, double dec)
 Sends burst confirm messages.
static void LPA_send_closeout (GRB_latAlertMsg *alert, int inhibit)
 Sends burst closeout messages.
static void LPA_send_trigger_cb (GRB_latAlertMsg *alert)
 Sends burst trigger messages.
static void LPA_send_update_cb (GRB_latAlertMsg *alert)
 Sends burst update messages.
static void LPA_send_confirm_cb (unsigned int dur, double ra, double dec)
 Sends burst confirm messages.
static void LPA_send_closeout_cb (GRB_latAlertMsg *alert, int inhibit)
 Sends burst closeout messages.
unsigned int LPA_grb_init (void)
 Initialize the LPA GRB handler on the SIU.
unsigned int LPA_grb_start (void)
 Start the LPA GRB task.

Variables

static LPA_Grb Lpa_grb
 The static instance of the LPA GRB control structure.


Detailed Description

LAT Physics Acquisition Gamma Ray Burst Framework.

Author:
S.Maldonado - smaldona@slac.stanford.edu
    CVS $Id: LPA_grb.c,v 1.21 2007/12/05 21:28:25 smaldona Exp $
   

Function Documentation

void * LPA_allocGRB ( FPM_Pool *  pcb,
unsigned int  siz,
void **  rtn,
void **  cb0,
void **  cb1,
void **  cb2 
) [static]

Allocate memory packet without timeout (ITC courtesy entry point).

Parameters:
pcb (in) Memory pool control block
siz (in) Number of bytes to allocate
rtn (out) Processing completion callback routine
cb0 (out) Processing completion callback user parameter 0
cb1 (out) Processing completion callback user parameter 1
cb2 (out) Processing completion callback user parameter 2
Return values:
NULL Memory allocation failed
x Pointer to allocated memory
FPM_alloc() is a courtesy entry point, compatible with the signature for an ITC "abstract memory allocator". In keeping with ITC's planned usage, this is an allocation without wait. The callback is set up to simply free the memory. rtn is set to FPM_freeITC() and cb0 is set to the pool control block pcb. Other callback parameters are set to NULL.

void LPA_disposeGRB ( void *  prm,
GRBU_pktMerge *  mrg 
) [static]

Dispose of a GRB merge packet.

Parameters:
prm (in) User context parameter
mrg (in) Merge packet (unused)
When a queue item, use a queue item completion.

unsigned int LPA_grb_init ( void   ) 

Initialize the LPA GRB handler on the SIU.

Return values:
LPA_SUCCESS Success

static unsigned int LPA_grb_load_db ( void   )  [static]

Load the LPA GRB databases.

Return values:
LPA_SUCCESS Success

static unsigned int LPA_grb_proc_bulk ( void *  prm,
const struct _ITC_QueueItem qitem,
void *  pay,
unsigned int  len 
) [static]

Process bulk task messages.

Return values:
LPA_ERROR Failure
LPA_SUCCESS Success

static unsigned int LPA_grb_proc_cmd ( void *  prm,
const struct _ITC_QueueItem qitem,
void *  pay,
unsigned int  len 
) [static]

Process cmd task messages.

Return values:
LPA_ERROR Failure
LPA_SUCCESS Success

static unsigned int LPA_grb_proc_ctl ( void *  prm,
const struct _ITC_QueueItem qitem,
void *  pay,
unsigned int  len 
) [static]

Process control task messages.

Return values:
LPA_ERROR Failure
LPA_SUCCESS Success

unsigned int LPA_grb_start ( void   ) 

Start the LPA GRB task.

Return values:
LPA_ERROR Failure
LPA_SUCCESS Success

static unsigned int LPA_handle_alg_msg ( LPA_GrbAlgMsg msg  )  [static]

Callback function for the GRB Algorithm messages.

Parameters:
msg The GRB algorithm message
Returns:

unsigned int LPA_handle_gbm ( unsigned short  fcode,
void *  pay 
) [static]

Callback function for the GBM commands.

Parameters:
fcode Command function code
pay Command payload
Returns:

static void LPA_send_alg_msg ( LPA_GrbAlgMsg msg  )  [static]

Routine to send GRB alg messages to the GRB task control queue.

Parameters:
msg The GRB algorithm message
Returns:

static void LPA_send_closeout ( GRB_latAlertMsg *  alert,
int  inhibit 
) [static]

Sends burst closeout messages.

Returns:

static void LPA_send_closeout_cb ( GRB_latAlertMsg *  alert,
int  inhibit 
) [static]

Sends burst closeout messages.

Returns:

static void LPA_send_confirm ( unsigned int  dur,
double  ra,
double  dec 
) [static]

Sends burst confirm messages.

Returns:

static void LPA_send_confirm_cb ( unsigned int  dur,
double  ra,
double  dec 
) [static]

Sends burst confirm messages.

Returns:

static unsigned int LPA_send_lim_grb ( LPA_MsgHdr grb_msg  )  [static]

Send GRB message to LIM.

Return values:
LPA_ERROR Failure
LPA_SUCCESS Success

void LPA_send_trigger ( GRB_latAlertMsg *  alert  )  [static]

Sends burst trigger messages.

Returns:

static void LPA_send_trigger_cb ( GRB_latAlertMsg *  alert  )  [static]

Sends burst trigger messages.

Returns:

void LPA_send_update ( GRB_latAlertMsg *  alert  )  [static]

Sends burst update messages.

Returns:

static void LPA_send_update_cb ( GRB_latAlertMsg *  alert  )  [static]

Sends burst update messages.

Returns:


Generated on Fri May 21 10:56:29 2010 by  doxygen 1.5.3