GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> GRBS / V0-1-2 > grbs_siu / mv2304
#include <stdio.h>
#include <string.h>
#include <PBS/WCT.h>
#include <PBS/WUT.h>
#include <PBS/TOV.h>
#include <MSG/MSG_pubdefs.h>
#include <THS/THS.h>
#include <CDM/CDM_pubdefs.h>
#include <GRB/GRB_siu.h>
#include <GRB/GRB_pktdef.h>
#include <GRB/GRB_latMsg.h>
#include <GRB/GRB_gbmMsg.h>
#include <GRBS/GRBS_pubdefs.h>
#include <GRBS/GRBS_msgs.h>
#include <GRBS_util_p.h>
#include <GRBS_siu_p.h>
#include <GRBS_epu_p.h>
#include <GRBS_DB/GRBS_DB_siu_schema.h>
Functions | |
unsigned int | GRBS_siuSizeOf (void *prm) |
Returns the size of a algorithm control block. | |
GRB_siuServices * | GRBS_siuGetServices (void *siu_ctl, void *prm, const GRB_latMsgServices *lat_svc) |
Returns the SIU GRB services block. | |
void | GRBS_handleEvents (void *siu_ctl, GRB_msgHdr *hdr) |
Processes GRBS event summaries from the GRBS filter. This is a counting simulation and transitions between detection states based on summary counters. | |
void | GRBS_handleStart (void *siu_ctl) |
Handle the start run message. | |
void | GRBS_handleStop (void *siu_ctl) |
Handle the stop run message. | |
void | GRBS_handleGbmInt (void *siu_ctl) |
Handle the GBM Interrupt. | |
void | GRBS_handleGbmCalc (void *siu_ctl, GRB_gbmCalcMsg *dat) |
Handle the GBM Calc Info command. | |
void | GRBS_handleGbmRpt (void *siu_ctl, GRB_gbmRptMsg *dat) |
Handle the GBM Repoint command. | |
int | GRBS_handleGbmClose (void *siu_ctl, GRB_gbmCloseMsg *dat) |
Handle the GBM Closeout command. | |
static WUT_cb_status | GRBS_inactiveCb (void *prm, WUT_tmr *wut) |
WUT callback routine. | |
static WUT_cb_status | GRBS_gbmInactiveCb (void *prm, WUT_tmr *wut) |
WUT callback routine. | |
unsigned int | GRBS_reset (GRBS_siuCtl *ctl) |
Reset the GRBS algorithm control block. | |
void | GRBS_buildAlert (GRB_latAlertMsg *alert, unsigned int class, char ts) |
Build a GRBS alert message. |
CVS $Id: GRBS_siu.c,v 1.9 2011/03/28 20:28:09 russell Exp $
void GRBS_buildAlert | ( | GRB_latAlertMsg * | alert, | |
unsigned int | class, | |||
char | ts | |||
) |
Build a GRBS alert message.
alert | Pointer to alert message | |
class | Burst classification | |
ts | Timestamp flags |
Referenced by GRBS_gbmInactiveCb(), GRBS_handleEvents(), GRBS_handleGbmRpt(), GRBS_inactiveCb(), GRBS_reset(), and GRBS_simForkCb().
static WUT_cb_status GRBS_gbmInactiveCb | ( | void * | prm, | |
WUT_tmr * | wut | |||
) | [static] |
WUT callback routine.
prm | User context parameter | |
wut | Wake up timer |
References _GRBS_siuCtl::alert, _GRBS_siuCtl::detect, GRBS_buildAlert(), GRBS_STATE_INACTIVE, _GRBS_siuCtl::lat_svc, _GRBS_siuCtl::state, and _GRBS_siuCtl::timeout_state.
Referenced by GRBS_handleGbmCalc(), and GRBS_handleGbmInt().
void GRBS_handleEvents | ( | void * | siu_ctl, | |
GRB_msgHdr * | hdr | |||
) |
Processes GRBS event summaries from the GRBS filter. This is a counting simulation and transitions between detection states based on summary counters.
siu_ctl | The GRBS algorithm control block | |
hdr | The GRBS message header |
References _GRBS_siuCtl::alert, _GRBS_msg::bdy, _GRBS_siuCtl::detect, _GRBS_msgBdy::dx, _GRBS_msgBdy::dy, _GRBS_msgBdy::dz, _GRBS_msgBdy::energy, GRBS_buildAlert(), GRBS_CLOSEOUT_EVT_CNT, GRBS_CONFIRM_EVT_CNT, GRBS_INACTIVE_EVT_CNT, GRBS_inactiveCb(), GRBS_NUM_EVTS_PKT, GRBS_STATE_CONFIRM, GRBS_STATE_INACTIVE, GRBS_STATE_SUSPECT, GRBS_SUSPECT_EVT_CNT, GRBS_UPDATE_HI_EVT_CNT, GRBSIM_MODE_DEBUG, GRBSIM_MODE_DISABLE, _GRBS_msg::hdr, _GRBS_siuCtl::ievt, _GRBS_siuCtl::lat_svc, _GRBS_msgBdy::pps, _GRBS_siuCtl::repoint, _GRBS_siuCtl::sim_mode, _GRBS_siuCtl::started, _GRBS_siuCtl::state, _GRBS_siuCtl::timeout, _GRBS_siuCtl::timeout_state, _GRBS_msgBdy::trg, and _GRBS_siuCtl::wut.
Referenced by GRBS_siuGetServices().
int GRBS_handleGbmClose | ( | void * | siu_ctl, | |
GRB_gbmCloseMsg * | dat | |||
) |
Handle the GBM Closeout command.
0,Disarm | finish | |
1,Arm | finish |
References _GRBS_siuCtl::detect, _GRBS_siuCtl::gbm_timeout, _GRBS_siuCtl::gbm_wut, GRBS_STATE_INACTIVE, _GRBS_siuCtl::sim_mode, and _GRBS_siuCtl::state.
Referenced by GRBS_siuGetServices().
void GRBS_handleGbmInt | ( | void * | siu_ctl | ) |
Handle the GBM Interrupt.
0,Success | ||
-1,Failure |
References _GRBS_siuCtl::detect, _GRBS_siuCtl::gbm_timeout, _GRBS_siuCtl::gbm_wut, GRBS_gbmInactiveCb(), GRBS_STATE_INACTIVE, GRBS_STATE_SUSPECT, _GRBS_siuCtl::sim_mode, and _GRBS_siuCtl::state.
Referenced by GRBS_siuGetServices().
void GRBS_handleStart | ( | void * | siu_ctl | ) |
Handle the start run message.
0,Success | ||
-1,Failure |
References _GRBS_siuCtl::started.
Referenced by GRBS_siuGetServices().
void GRBS_handleStop | ( | void * | siu_ctl | ) |
Handle the stop run message.
0,Success | ||
-1,Failure |
References GRBS_reset().
Referenced by GRBS_siuGetServices().
static WUT_cb_status GRBS_inactiveCb | ( | void * | prm, | |
WUT_tmr * | wut | |||
) | [static] |
WUT callback routine.
prm | User context parameter | |
wut | Wake up timer |
References _GRBS_siuCtl::alert, _GRBS_siuCtl::detect, GRBS_buildAlert(), GRBS_STATE_INACTIVE, _GRBS_siuCtl::lat_svc, _GRBS_siuCtl::state, and _GRBS_siuCtl::timeout_state.
Referenced by GRBS_handleEvents().
unsigned int GRBS_reset | ( | GRBS_siuCtl * | ctl | ) |
Reset the GRBS algorithm control block.
Status | code |
References _GRBS_siuCtl::alert, _GRBS_siuCtl::detect, _GRBS_siuCtl::gbm_wut, GRBS_buildAlert(), GRBS_STATE_INACTIVE, GRBSIM_MODE_DISABLE, _GRBS_siuCtl::ievt, _GRBS_siuCtl::lat_svc, _GRBS_siuCtl::sim_cntr, _GRBS_siuCtl::sim_mode, _GRBS_siuCtl::sim_state, _GRBS_siuCtl::sim_time, _GRBS_siuCtl::sim_wut, _GRBS_siuCtl::started, _GRBS_siuCtl::state, _GRBS_siuCtl::timeout_state, and _GRBS_siuCtl::wut.
Referenced by GRBS_handleStop(), and GRBS_simReset().
GRB_siuServices * GRBS_siuGetServices | ( | void * | siu_ctl, | |
void * | prm, | |||
const GRB_latMsgServices * | lat_svc | |||
) |
Returns the SIU GRB services block.
GRB | SIU services pointer |
References _GRBS_siuCtl::detect, _GRBS_siuCtl::gbm_timeout, _GRBS_siuCtl::gbm_wut, GRBS_handleEvents(), GRBS_handleGbmCalc(), GRBS_handleGbmClose(), GRBS_handleGbmInt(), GRBS_handleGbmRpt(), GRBS_handleStart(), GRBS_handleStop(), GRBS_STATE_INACTIVE, GRBSIM_MODE_DISABLE, _GRBS_siuCtl::ievt, _GRBS_siuCtl::lat_svc, _GRBS_siuCtl::repoint, _GRBS_siuCtl::services, _GRBS_siuCtl::sim_cntr, _GRBS_siuCtl::sim_mode, _GRBS_siuCtl::sim_state, _GRBS_siuCtl::sim_time, _GRBS_siuCtl::sim_wut, _GRBS_siuCtl::state, _GRBS_siuCtl::timeout, _GRBS_siuCtl::timeout_state, and _GRBS_siuCtl::wut.
unsigned int GRBS_siuSizeOf | ( | void * | prm | ) |
Returns the size of a algorithm control block.
Size | in bytes of algorithm control block |