GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> LFS / V1-12-3 > lfs_lcp / rhel5-32
#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 [] |
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.
itcNode | The ITC node ID. |
References apidMap.
Referenced by 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.
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_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.
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_FileDumpSSR().
unsigned int LFS_initialize | ( | void | ) |
Initialize the LFS LCP side system.
The LFS control state is initialzed. This function should be called during the system initialization process after FILE_initialize() but before FILE_startTask().
References _LFS_Control::bnk_buf, _LFS_Control::cmd_hdr_size, _LFS_Control::config, configData, _LFS_Control::copy_buf, _LFS_Control::hdr_buf, _LFS_Control::itc_hdr_size, LFS_Apid648, LFS_Apid649, LFS_CTL_BROKEN, LFS_CTL_INITIALIZED, LFS_CTL_INITIALIZING, LFS_CTL_UNINITIALIZED, _LFS_Control::node_id, _LFS_Control::path_str_0, _LFS_Control::path_str_1, _LFS_Control::rwi, _LFS_Control::state, _LFS_Control::telem_buf, _LFS_Control::telem_hdr_size, _LFS_Control::telem_pool, _LFS_Control::telem_sem, and _LFS_Control::telem_timer.
unsigned int LFS_shutdown | ( | void | ) |
Shut down the LFS LCP system.
Releases any resources allocated in LFS_initialize().
References _LFS_Control::bnk_buf, _LFS_Control::copy_buf, _LFS_Control::hdr_buf, LFS_CTL_DEINITIALIZING, LFS_CTL_INITIALIZED, LFS_CTL_UNINITIALIZED, lockState(), _LFS_Control::node_id, _LFS_Control::path_str_0, _LFS_Control::path_str_1, _LFS_Control::rwi, _LFS_Control::state, _LFS_Control::telem_buf, _LFS_Control::telem_pool, _LFS_Control::telem_sem, and _LFS_Control::telem_timer.
static WUT_cb_status LFS_telemDelay | ( | SEM | sem, | |
WUT_tmr * | timer | |||
) | [static] |
Timer callback for telmetry send delay.
sem | The semaphore to release to indicate delay done. | |
timer | The WUT handle for the timer. |
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.
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 |
References _LFS_Control::rwi, and _LFS_Control::state.
Referenced by LFS_shutdown().
apidMap [static] |
Initial value:
{ LFS_LFSDUMPSSRSI_TLM_APID, LFS_LFSDUMPSSRE0_TLM_APID, LFS_LFSDUMPSSRE1_TLM_APID, LFS_LFSDUMPSSRE2_TLM_APID, LFS_LFSDUMPSSRE3_TLM_APID, }
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, }
Referenced by LFS_initialize().
LFS_ctl [static] |
The global instance of the LFS LCP control block