GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> LCM / dev > lcm_siu / rhel5-32


Interface   Data Structures   File List   Data Fields   Globals  

LCM_control.c File Reference

CPU generic control functions. More...

#include <string.h>
#include <CCSDS/CCSDS_pkt.h>
#include <CDM/CDM_pubdefs.h>
#include <IMM/FPM_pubdefs.h>
#include <IMM/RBM_pubdefs.h>
#include <ITC/ITC_pubdefs.h>
#include <LCM_DB/LCM_DB_schema.h>
#include <MDB/MDB_pubdefs.h>
#include <PBS/MBA.h>
#include <PBS/MTX.h>
#include <PBS/RW.h>
#include <PBS/SEM.h>
#include <PBS/WUT.h>
#include <LCM/LCM_cmdxtrn.h>
#include <LCM/LCM_pubdefs.h>
#include <LCM/LCM_msgs.h>
#include <LCM_prvdefs.h>
#include <SMON.h>

Functions

static void taskStartOnce (void *prm)
 One-time call in task context to start the LCM task.
unsigned int LCM_initialize ()
 Initialize the LCM system.
unsigned int LCM_shutdown ()
 Shut down the LCM system.
unsigned int LCM_start ()
 Start the LCM task.
unsigned int LCM_stop ()
 Stop the LCM task.

Variables

LCM_ControlLCM_lcb
 Control block for LCM facility.
static const LCM_DB_Schema configData
 Default LCM configuration data.


Detailed Description

CPU generic control functions.

CVS $Id: LCM_control.c,v 1.41 2011/03/29 21:59:33 apw Exp $
Author:
A.P.Waite
LCM_control.c provides CPU generic control facilities

Function Documentation

unsigned int LCM_initialize ( void   ) 

Initialize the LCM system.

Return values:
LCM_ALOCFAIL Memory allocation failure
LCM_BADSTAT Not in state "uninitialized" (bad state transition)
LCM_MUALOCFL Cannot allocate a mutex
LCM_SUCCESS Success
LCM_initialize() initializes the LAT Spacecraft Messages system.

References _LCM_Control::cmd_chksum_size, _LCM_Control::cmd_hdr_size, _LCM_Control::config, _LCM_Control::itc_hdr_size, LCM_CTL_BROKEN, LCM_CTL_PARTIAL, LCM_CTL_UNINITIALIZED, LCM_houseInitialize(), LCM_imageInitialize(), LCM_messageInitialize(), LCM_scrubInitialize(), LCM_SMONInitialize(), LCM_taskInitialize(), _LCM_Control::mtx, _LCM_Control::node_id, _LCM_Control::rwi, _LCM_Control::state, _LCM_Control::telem_hdr_size, and _LCM_Control::version.

unsigned int LCM_shutdown ( void   ) 

unsigned int LCM_start ( void   ) 

Start the LCM task.

LCM_start() starts the LCM task. The LCM control state should be LCM_CTL_INITIALIZED before calling this function. On successful exit from this function, the LCM control state will be LCM_CTL_STARTING. As part of LCM's task start procedures, the LCM task first runs a one-time task initialization routine in LCM task context. If that is successful, the LCM control state is changed to LCM_CTL_RUNNING.

Any failures along the way and the LCM control state is set to LCM_CTL_BROKEN.

References _LCM_Control::itc, LCM_CTL_BROKEN, LCM_CTL_INITIALIZED, _LCM_Control::mtx, _LCM_Control::state, and taskStartOnce().

unsigned int LCM_stop ( void   ) 

Stop the LCM task.

The LCM control state should be LCM_CTL_RUNNING before calling this function (after calling LCM_start()). Sets LCM control state to LCM_CTL_INITIALIZED.

This function is a replacement for LCM_stopTask().

Returns:
A FILE MSG code.

References _LCM_Control::itc, LCM_CTL_INITIALIZED, LCM_CTL_RUNNING, LCM_CTL_STOPPING, _LCM_Control::mtx, and _LCM_Control::state.


Variable Documentation

static const LCM_DB_Schema configData [static]

Initial value:

{
        {
                0,                      
                0,                      
                1,                      
        },
        125,                            
        256,                            
        128,                            
        125,                            
      5,                
}
Default LCM configuration data.


Generated on Wed Mar 30 16:05:43 2011 by  doxygen 1.5.8