GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> FILE / V3-11-1 > file_lcp / rhel4-32


Interface   Data Structures   File List   Data Fields   Globals  

FILE_lcp.h File Reference

File LCP application definitions. More...

#include <PBS/TASK.h>
#include <ITC/ITC_pubdefs.h>

Functions

unsigned int FILE_initialize (void)
 Initialize the FILE LCP side system.
unsigned int FILE_shutdown (void)
 Shut down the FILE LCP system.
unsigned int FILE_start (void)
 Create and start the FILE/LFS file management task.
unsigned int FILE_stop (void)
 Stop and shut down FILE/LFS file management task.
unsigned int FILE_startTask (TASK_attr *attr)
 Create and start the FILE/LFS file management task (obsolete).
unsigned int FILE_stopTask (void)
 Stop and shut down FILE/LFS file management task (obsolete).
unsigned int FILE_getTask (ITC_Task **task)
 Return the handle of the ITC "FILE task".


Detailed Description

File LCP application definitions.

Author:
D.L. Wood
Functions for controlling the FILE package LCP application.

Function Documentation

unsigned int FILE_getTask ( ITC_Task **  task  ) 

Return the handle of the ITC "FILE task".

Returns the handle of the file management LCP task (ITC_TID_LFS_M) which was created in FILE_initialize(). Other file management command handlers should attach to the ITC file management task before FILE_startTask() is called. This call is only valid when the FILE LCP control state is FILE_CTL_INITIALIZED.

Parameters:
task Holds ITC task handle on return.
Returns:
A FILE MSG code.

References FILE_CTL_INITIALIZED, _FILE_Control::state, and _FILE_Control::task.

unsigned int FILE_initialize ( void   ) 

Initialize the FILE LCP side system.

Creates and initializes all of the resources needed by the FILE LCP software. The following actions are taken:

  1. Sets the FILE control state to FILE_CTL_UNINITIALIZED.
  2. Creates a RAM disk partition by calling FILE_sysRamCreate().
  3. Mounts both SIB EEPROM TFFS partitions by calling FILE_sysTffsMount().
  4. Verifys state of TFFS partitions by calling FILE_sysTffsCheck().
  5. Allocates a file upload assembly buffer.
  6. Initializes the file upload state machine by calling FILE_uplInit().
  7. Creates the file management task (ITC_TID_LFS_M) by calling ITC_createTask().
  8. The FILE command callbacks are registerd with the file task.
  9. Sets the FILE control state to FILE_CTL_INITIALIZED.

Returns:
A FILE MSG code.

References _FILE_Control::buf, _FILE_Control::cmd_chksum_size, _FILE_Control::cmd_confirm_rbm, _FILE_Control::cmd_hdr_size, _FILE_Control::cmd_queue_fpm, cmdConfirmAlloc(), cmdQueueAlloc(), _FILE_Control::config, configData, _FILE_Control::epu_upl_buf, _FILE_Control::epu_upl_sem, _FILE_Control::epu_upl_timer, FILE_Apid641, FILE_CTL_BROKEN, FILE_CTL_INITIALIZED, FILE_CTL_INITIALIZING, FILE_CTL_UNINITIALIZED, FILE_uplGet(), FILE_uplInit(), _FILE_Control::node_id, _FILE_Control::path_str, _FILE_Control::rwi, _FILE_Control::state, _FILE_Control::task, and _FILE_Control::upl.

unsigned int FILE_shutdown ( void   ) 

Shut down the FILE LCP system.

The FILE control state should be FILE_CTL_INITIALIZED before calling this function. First the FILE control state is set to FILE_CTL_DEINITIALIZING. Then, any resources allocated by the FILE system are released. When complete, the FILE control state is set to FILE_CTL_UNINITIALIZED.

Returns:
A FILE MSG code.

References _FILE_Control::buf, _FILE_Control::cmd_confirm_rbm, _FILE_Control::cmd_queue_fpm, _FILE_Control::epu_upl_buf, _FILE_Control::epu_upl_sem, _FILE_Control::epu_upl_timer, FILE_CTL_DEINITIALIZING, FILE_CTL_INITIALIZED, FILE_CTL_UNINITIALIZED, FILE_uplExit(), lockState(), _FILE_Control::node_id, _FILE_Control::path_str, _FILE_Control::rwi, _FILE_Control::state, _FILE_Control::task, and _FILE_Control::upl.

unsigned int FILE_start ( void   ) 

Create and start the FILE/LFS file management task.

The FILE control state should be FILE_CTL_INITIALIZED before calling this function (after calling FILE_initialize()). The FILE control state is first set to FILE_CTL_STARTING. Then the file management task is started by calling ITC_startTask(). Once complete, the FILE control state is set to FILE_CTL_RUNNING.

This function is a replacement for FILE_startTask(). FILE_start() gathers the FILE ITC task configuration parameters from the CPU_DB database instead of requiring users to provide them externally.

Returns:
A FILE MSG code.

References FILE_startTask().

unsigned int FILE_startTask ( TASK_attr *  attr  ) 

Create and start the FILE/LFS file management task (obsolete).

The FILE control state should be FILE_CTL_INITIALIZED before calling this function (after calling FILE_initialize()). The FILE control state is first set to FILE_CTL_STARTING. Then the file management task is started by calling ITC_startTask(). Once complete, the FILE control state is set to FILE_CTL_RUNNING.

The function FILE_start() should be used instead of this function.

Parameters:
attr Task attributes (can be NULL).
Returns:
A FILE MSG code.

References FILE_CTL_INITIALIZED, FILE_CTL_RUNNING, FILE_CTL_STARTING, lockState(), and _FILE_Control::task.

Referenced by FILE_start().

unsigned int FILE_stop ( void   ) 

Stop and shut down FILE/LFS file management task.

The FILE control state should be FILE_CTL_RUNNING before calling this function (after calling FILE_start()). Sets FILE control state to FILE_CTL_INITIALIZED.

This function is a replacement for FILE_stopTask().

Returns:
A FILE MSG code.

References FILE_stopTask().

unsigned int FILE_stopTask ( void   ) 

Stop and shut down FILE/LFS file management task (obsolete).

The FILE control state should be FILE_CTL_RUNNING before calling this function (after calling FILE_startTask()). Sets FILE control state to FILE_CTL_INITIALIZED.

The function FILE_stop() should be used instead of this function.

Returns:
A FILE MSG code.

References FILE_CTL_INITIALIZED, FILE_CTL_RUNNING, and lockState().

Referenced by FILE_stop().


Generated on Fri Sep 30 18:57:28 2011 by  doxygen 1.5.8