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 <PBS/FORK.h>
#include <MSG/MSG_pubdefs.h>
#include <GRBS/GRBS_pubdefs.h>
#include <GRBS_siu_p.h>
#include <GRBS_util_p.h>
Functions | |
static WUT_cb_status | GRBS_simWutCb (void *prm, WUT_tmr *wut) |
WUT callback routine. | |
static FORK_cb_status | GRBS_simForkCb (FORK_cb_prm *prm, FORK_msg_hdr *hdr) |
Processes simulation callbacks. | |
int | GRBS_simConfig (void *siu_ctl, unsigned int mode, unsigned int repoint, unsigned int interval) |
Configure for a simulated GRBS detection. | |
int | GRBS_simDetect (void *siu_ctl, FORK_que *que) |
Simulate a GRBS detection. | |
int | GRBS_simReset (void *siu_ctl) |
Reset the GRBS simulation. |
CVS $Id: GRBS_sim.c,v 1.6 2011/03/28 20:28:09 russell Exp $
int GRBS_simConfig | ( | void * | siu_ctl, | |
unsigned int | mode, | |||
unsigned int | repoint, | |||
unsigned int | interval | |||
) |
Configure for a simulated GRBS detection.
0,Success | ||
-1,Failure |
siu_ctl | The GRBS algorithm control block | |
mode | The GRBS simulation mode | |
repoint | The GRBS repoint time | |
interval | The interval in seconds between state transitions |
References GRBS_STATE_INACTIVE, GRBSIM_MODE_DEBUG, _GRBS_siuCtl::repoint, _GRBS_siuCtl::sim_cntr, _GRBS_siuCtl::sim_mode, _GRBS_siuCtl::sim_state, and _GRBS_siuCtl::sim_time.
int GRBS_simDetect | ( | void * | siu_ctl, | |
FORK_que * | que | |||
) |
Simulate a GRBS detection.
0,Success | ||
-1,Failure |
siu_ctl | The GRBS algorithm control block | |
que | Task fork queue |
References GRBS_simWutCb(), GRBS_STATE_INACTIVE, GRBSIM_MODE_DEBUG, _GRBS_simMsg::prm, _GRBS_siuCtl::sim_cntr, _GRBS_siuCtl::sim_mode, _GRBS_siuCtl::sim_msg, _GRBS_siuCtl::sim_que, _GRBS_siuCtl::sim_state, _GRBS_siuCtl::sim_time, _GRBS_siuCtl::sim_wut, and _GRBS_siuCtl::state.
static FORK_cb_status GRBS_simForkCb | ( | FORK_cb_prm * | prm, | |
FORK_msg_hdr * | hdr | |||
) | [static] |
Processes simulation callbacks.
prm | Pointer to callback parameter | |
hdr | Pointer to the message |
References _GRBS_siuCtl::alert, _GRBS_siuCtl::detect, GRBS_buildAlert(), GRBS_STATE_CONFIRM, GRBS_STATE_INACTIVE, GRBS_STATE_SUSPECT, GRBSIM_MODE_FULL, GRBSIM_MODE_SUSPECT, _GRBS_siuCtl::lat_svc, _GRBS_simMsg::prm, _GRBS_siuCtl::repoint, _GRBS_siuCtl::sim_cntr, _GRBS_siuCtl::sim_mode, _GRBS_siuCtl::sim_state, _GRBS_siuCtl::sim_time, and _GRBS_siuCtl::sim_wut.
Referenced by GRBS_simWutCb().
int GRBS_simReset | ( | void * | siu_ctl | ) |
Reset the GRBS simulation.
0,Success | ||
-1,Failure |
siu_ctl | The GRBS algorithm control block |
References GRBS_reset().
static WUT_cb_status GRBS_simWutCb | ( | void * | prm, | |
WUT_tmr * | wut | |||
) | [static] |
WUT callback routine.
prm | User context parameter | |
wut | Wake up timer |
References GRBS_simForkCb(), _GRBS_simMsg::hdr, _GRBS_siuCtl::sim_msg, and _GRBS_siuCtl::sim_que.
Referenced by GRBS_simDetect().