GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> LMC / V0-10-1 > lmc / rad750


Interface   Data Structures   File List   Data Fields   Globals  

LMC_control.c File Reference

LAT Multiplexed Counters control initialization routines. More...

#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_ControlLMC_getCtrl (void)
 Get the control block address.

Variables

static LMC_Control lmc = {LMC_CTL_UNINITIALIZED}


Detailed Description

LAT Multiplexed Counters control initialization routines.

Author:
S.Maldonado and Owen Saxton
Id
LMC_control.c,v 1.14 2011/03/28 18:04:55 saxton Exp

Function Documentation

LMC_Control* LMC_getCtrl ( void   ) 

Get the control block address.

Returns:
The address of the control block

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   ) 

unsigned int LMC_shutdown ( void   ) 

Shut down the LMC system.

Return values:
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.

Return values:
LMC_SUCCESS Success
LMC_NOTINIT Not initialized

References LMC_startTask().

unsigned int LMC_startTask ( TASK_attr *  attr  ) 

Create and start the LMC task.

Parameters:
attr (in) Task attributes (can be NULL)
Return values:
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.

Return values:
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.


Generated on Wed Nov 21 21:32:40 2012 by  doxygen 1.5.8