GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> LMC / V0-10-1 > lmc / rad750
#include <LMC_prvdefs.h>
#include <LMC/LMC_msgs.h>
#include <LMC/LMC_cmdxtrn.h>
#include <LMC/LMC_cmddefs.h>
#include <LMC/LMC_tlmdefs.h>
#include <LMC/LMC_pubdefs.h>
#include <PBS/RW.ih>
#include <PBS/MBA.h>
#include <PBS/SEM.h>
#include <PBS/WUT.h>
#include <PBS/FPA.h>
#include <MSG/MSG_pubdefs.h>
#include <ITC/ITC_pubdefs.h>
#include <ITC/ITC_drvdefs.h>
#include <IMM/FPM_pubdefs.h>
#include <CDM/CDM_pubdefs.h>
#include <CPU_DB/CPU_DB_pubdefs.h>
#include <CCSDS/CCSDS_pkt.h>
#include <string.h>
Functions | |
static unsigned int | allocCcb (LMC_Counter **cntr, LMC_CntrType type) |
static void | freeCcb (LMC_Counter *cnt) |
static void | shutdown (void) |
static unsigned int | changeState (unsigned int old, unsigned int new, RW_ctl *rwi, unsigned int *cur, const char *fnc) |
static unsigned int | bind_reset_cmd (ITC_QueueItem **qitem, void *pkt, unsigned int len, const char *s_cmd) |
static WUT_cb_status | send_reset_cmd (void *prm, WUT_tmr *wut) |
unsigned int | LMC_initialize (void) |
Initialize the LMC system. | |
unsigned int | LMC_shutdown (void) |
Shut down the LMC system. | |
unsigned int | LMC_start (void) |
Start the LMC system. | |
unsigned int | LMC_startTask (TASK_attr *attr) |
Create and start the LMC task. | |
unsigned int | LMC_stopTask (void) |
Stop the LMC task. | |
LMC_Control * | LMC_getCtrl (void) |
Get the control block address. | |
Variables | |
static LMC_Control | lmc = {LMC_CTL_UNINITIALIZED} |
LMC_Control* LMC_getCtrl | ( | void | ) |
Get the control block address.
Referenced by LMC_acd_tile_all(), LMC_acd_tile_pair(), LMC_cal_lrs(), LMC_stop_count(), LMC_tem_deadtime(), and LMC_tkr_lrs().
unsigned int LMC_initialize | ( | void | ) |
Initialize the LMC system.
LMC_SUCCESS | Success |
References _LMC_Control::acd_cnt, _LMC_Control::cal_cnt, _LMC_Control::crx_fcb, _LMC_Control::ctx_fcb, _LMC_Control::dead_cnt, _LMC_Control::dtx_fcb, _LMC_Control::hdr_size, _LMC_Control::itc_task, LMC_Apid69c, LMC_CTL_INITIALIZED, LMC_CTL_INITIALIZING, LMC_CTL_UNINITIALIZED, LMC_DGM_SIZE, LMC_K_RESET_FORMAT_0, LMC_NUM_DGMS, LMC_NUM_PKTS, LMC_PKT_SIZE, LMC_TYP_ACD, LMC_TYP_CAL, LMC_TYP_DEAD, LMC_TYP_TKR, _LMC_Control::reset, _LMC_Control::rwi, _LMC_Control::state, _LMC_Control::stx_fcb, _LMC_Control::tkr_cnt, _LMC_Reset::trd, _LMC_Reset::trd_cache, _LMC_reset_valid::uc, _LMC_Reset_Row::valid, and _LMC_Reset::wut.
unsigned int LMC_shutdown | ( | void | ) |
Shut down the LMC system.
LMC_SUCCESS | Success | |
LMC_INVSTATE | Not in initialized state |
References LMC_CTL_DEINITIALIZING, LMC_CTL_INITIALIZED, _LMC_Control::rwi, and _LMC_Control::state.
unsigned int LMC_start | ( | void | ) |
Start the LMC system.
LMC_SUCCESS | Success | |
LMC_NOTINIT | Not initialized |
References LMC_startTask().
unsigned int LMC_startTask | ( | TASK_attr * | attr | ) |
Create and start the LMC task.
attr | (in) Task attributes (can be NULL) |
LMC_SUCCESS | Success | |
LMC_INVSTATE | Not in INITIALIZED state | |
ITC_ALOCFAIL | Cannot allocate for fork control block | |
ITC_CTLSTAT | ITC control block not in state initialized | |
ITC_FORKINIT | Fork initialization failed | |
ITC_FORKQHND | Cannot recover all fork queue handles (obscure) | |
ITC_NOTINIT | ITC control block does not exist |
References _LMC_Control::itc_task, LMC_CTL_INITIALIZED, LMC_CTL_STARTED, LMC_CTL_STARTING, _LMC_Control::rwi, and _LMC_Control::state.
Referenced by LMC_start().
unsigned int LMC_stopTask | ( | void | ) |
Stop the LMC task.
LMC_SUCCESS | Success | |
LMC_INVSTATE | Not in STARTED state | |
ITC_CTLSTAT | ITC control block not in state initialized | |
ITC_NOTINIT | ITC control block does not exist | |
ITC_TASKHNDL | Task handle is invalid | |
ITC_TASKSTAT | Invalid task state for this operation |
References _LMC_Control::itc_task, LMC_CTL_INITIALIZED, LMC_CTL_STARTED, LMC_CTL_STOPPING, _LMC_Control::rwi, and _LMC_Control::state.