GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> LFS / V1-12-3 > lfs_lcp / rad750


Interface   Data Structures   File List   Data Fields   Globals  

LFS_lcp_control.c File Reference

LFS LCP control functions. More...

#include <PBS/RW.h>
#include <PBS/MBA.h>
#include <PBS/WUT.h>
#include <PBS/TOV.h>
#include <MSG/MSG_pubdefs.h>
#include <ITC/ITC_pubdefs.h>
#include <ITC/ITC_dump.h>
#include <IMM/FPM_pubdefs.h>
#include <CCSDS/CCSDS_pkt.h>
#include <FILE/FILE_lcp.h>
#include <FBS/FBS_pubrtos.h>
#include <CDM/CDM_pubdefs.h>
#include <FILE_DB/FILE_DB_schema.h>
#include <LFS/LFS_msg.h>
#include <LFS/LFS_lcp.h>
#include <LFS/LFS_cmdxtrn.h>
#include <LFS/LFS_tlmdefs.h>
#include <LFS_lcp_private.h>
#include <Memmap.h>

Functions

static unsigned int lockState (LFS_Control *ctl, RW_key *key, LFS_ControlState old, LFS_ControlState new, const char *fnc)
 Walk round the state diagram.
static WUT_cb_status LFS_telemDelay (SEM sem, WUT_tmr *timer)
unsigned int LFS_initialize (void)
 Initialize the LFS LCP side system.
unsigned int LFS_shutdown (void)
 Shut down the LFS LCP system.
void LFS_freeTelem (ITC_QueueItem *qitem, unsigned int status, LFS_Control *ctl, void *prm1, void *prm2)
 Free telemetry packet memory.
void LFS_freeTelemSSR (ITC_QueueItem *qitem, unsigned int status, LFS_Control *ctl, void *prm1, void *prm2)
 Free telemetry packet memory.
unsigned short LFS_apidMap (unsigned short itcNode)
 Translate an ITC node ID to a SSR science data file dump CCSDS APID.

Variables

static LFS_Control LFS_ctl
static const FILE_DB_Schema configData
static const unsigned short apidMap []


Detailed Description

LFS LCP control functions.

Author:
D.L. Wood

Function Documentation

unsigned short LFS_apidMap ( unsigned short  itcNode  ) 

Translate an ITC node ID to a SSR science data file dump CCSDS APID.

Translate an ITC node ID to a SSR science data file dump CCSDS APID.

Parameters:
itcNode The ITC node ID.
Returns:
The APID value.

References apidMap.

Referenced by LFS_bootDumpFileSSR(), LFS_bootDumpRamSSR(), and LFS_FileDumpSSR().

void LFS_freeTelem ( ITC_QueueItem *  qitem,
unsigned int  status,
LFS_Control ctl,
void *  prm1,
void *  prm2 
)

Free telemetry packet memory.

Free memory after sending ITC telemetry packets. This is also used as a packet send completion callback.

Parameters:
qitem The memory buffer.
status Status of telemetry.
ctl LFS control structure.
prm1 Completion callback paramter 1.
prm2 Completion callback paramter 2.

References _LFS_Control::config, LFS_telemDelay(), _LFS_Control::node_id, _LFS_Control::telem_pool, _LFS_Control::telem_sem, and _LFS_Control::telem_timer.

Referenced by LFS_bootDumpEntry(), LFS_bootDumpFile(), LFS_bootDumpRam(), LFS_dirEmpty(), LFS_dumpDir(), LFS_dumpRoot(), LFS_FileDumpCTDB(), and LFS_SysStatus().

void LFS_freeTelemSSR ( ITC_QueueItem *  qitem,
unsigned int  status,
LFS_Control ctl,
void *  prm1,
void *  prm2 
)

Free telemetry packet memory.

Free memory after sending ITC telemetry packets to the SSR. This is also used as a packet send completion callback.

Parameters:
qitem The memory buffer.
status Status of telemetry.
ctl LFS control structure.
prm1 Completion callback paramter 1.
prm2 Completion callback paramter 2.

References _LFS_Control::telem_sem.

Referenced by LFS_bootDumpFileSSR(), LFS_bootDumpRamSSR(), and LFS_FileDumpSSR().

unsigned int LFS_initialize ( void   ) 

unsigned int LFS_shutdown ( void   ) 

static WUT_cb_status LFS_telemDelay ( SEM  sem,
WUT_tmr *  timer 
) [static]

Timer callback for telmetry send delay.

Parameters:
sem The semaphore to release to indicate delay done.
timer The WUT handle for the timer.
Returns:
WUT_K_STATE_CHANGE_NO.

Referenced by LFS_freeTelem().

static unsigned int lockState ( LFS_Control ctl,
RW_key *  key,
LFS_ControlState  old,
LFS_ControlState  new,
const char *  fnc 
) [static]

Walk round the state diagram.

Parameters:
ctl (in) LFS control block
key (in) An RW key
old (in) State the control block must be in to transition
new (in) State to which the control block wishes to transition
fnc (in) Function name calling this inline
Returns:
A LFS MSG code.

References _LFS_Control::rwi, and _LFS_Control::state.

Referenced by LFS_shutdown().


Variable Documentation

apidMap [static]

Initial value:

Array mapping ITC node ID's to SSR telemetry packet APID's.

Referenced by LFS_apidMap().

configData [static]

Initial value:

{
        {
                0,                      
                1,                      
                1,                      
                0,                      
                1,                      
                1,                      
                1,                      
        },
        NULL,                   
        NULL,                           
        0x100000,               
        0x1000,                 
        0x100000,                       
        2032,                   
        2,                              
        16,                             
        16,                             
        390,                    
        125,                    
        2032,                   
}
Default config values if CDM database is not found.

Referenced by LFS_initialize().

LFS_ctl [static]

The global instance of the LFS LCP control block


Generated on Wed Nov 21 21:50:01 2012 by  doxygen 1.5.8