OMS Data Receipt (ODR) Pipeline ZIPFOF Process Design Document
Contents
ZIPFOF Process Overview
ZIPFOF (File decompression)
===========================
i. Algorithms
This process is responsible for decompressing FOF data transferred
to the institute. OFS's marked "W" for ZIPFOF will trigger the
decompression of the FOF data. ZIPFOF will use the ZIP -d command
to perform this decompression of the FOF data. As stated in the
Overview section, this process will most likely execute exclusivsly
on the SUN/SPARC/SOLARIS platform.
When successfully processed, the OSF will be marked with a "C" and the
CVTFOF process will be marked with a "W".
PN FT ZI CV CL CLASS
== == == == == =====
C N N N _ PNM
C C C W _ FOF
ii. Error Handling
Should a I/O or database error occur during the processing of a
FOF OSF, the FOF OSF will be set to "F".
iii. Mode
This process will allow both pipeline and interactive processing,
and will be restricted to running on unix work stations.
iv. Interfaces
1) interactive
eg.
ZIPFOF i -f Tyyyydddhhmmss.MRG-GZ
(this command would be typed into the command line)
ZIPFOF: command name
i : denotes interactive processing
-f : file_specification followed by the FOf file to be
unziped.
pipeline
eg.
ZIPFOF -p opus_definitions_dir:your.path
(this command is contained in the process resource file)
ZIPFOF: command name
-p : denotes path file will be used to direct the process
opus_definitions_dir:your.path: path file to use
2) input/output
input : Tyyyydddhhmmss.MRG-GZ zipped FOF data file.
output: Tyyyydddhhmmss.MRG unzipped FOF data file.
zipped fof data files are the CCS products which contain the GZIP
full resolution telemetry data.
unzipped fof data files are the CCS products which contain the unGZIP
full resolution telemetry data.
To examine details of the ZIPFOF Process requirements, reference the
ODR Pipeline Requirements Document.
ZIPFOF Process Call Tree and Hierarchy Table
ZIPFOF !main driver to control PNMFOF processing
ZIPFOF_decompress_fof_data !Decompresses FOF data file.
ZIPFOF Process Required Packages
OPUSBB (OPUS BlackBoard Package)
MSGRPT (Message Reporting Package)
OSF (Observation Status File Package)
OSFILE (Operating System File Package)
SYS (System File Package)
STDB (ST Database Package)
ZIPFOF Process Individual Routine Descriptions
ZIPFOF
ZIPFOF_decompress_fof_data
============================================================================
! ZIPFOF
!
! This is the driver module for the ZIPFOF process. It calls a subordinate
! routine to initialize the process and then enters an infinite loop to poll
! for input. When input is received, appropriate subordinate routines are
! called to process the input. After processing an input, a success or
! failure status is indicated and a poll for the next input is initiated.
!
void ZIPFOF (
int argc, /* I: command line argument count */
char *argv /* I: command line arguments */
)
loop forever
Poll for OSF column ZI = "W"
if ZIPFOF_decompress_fof_data(osf_name) == success
update FOF OSF complete
else
update FOF OSF failure
endif
found halt
exit (SUCCESS)
interactive, exit (SUCCESS)
end loop
============================================================================
============================================================================
! ZIPFOF_decompress_fof_data
! This routine decompress ZIPPED FOf data.
int ZIPFOF_decompress_fof_data (
osf_name /* osf_name */
)
construct fof file specification
construct ZIP command as follows:
"gzip -d ",fof_file
execute ZIP command
if success return(success)
if failure return(failure);
============================================================================
ZIPFOF Process Resource File
!--------------------------------------------------------------------
!
! ZIPFOF RESOURCE FILE
!
!
! This file is used to construct the trigger, error, and success status
! fields in the observation status file.
!
!
!--------------------------------------------------------------------
! REVISION HISTORY
!--------------------------------------------------------------------
! MOD PR
! LEVEL DATE NUMBER User Description
! ----- -------- ------ ------ -------------------------------------
! 000 05/29/98 36120 Ken S. Created
!--------------------------------------------------------------------
PROCESS_NAME = ZIPFOF ! Short name for process id
TASK = < ZIPFOF -P 'PATH_FILE >
CLASS = FOF
DESCRIPTION = 'Unzip FOf data files supplied by CCS'
SYSTEM = ODR
DISPLAY_ORDER = 1
OK_TO_UPDATE_DATABASE = BLANK ! Determined by PATH
INTERNAL_POLLING_PROCESS = TRUE
OSF_RANK = 1 ! First Trigger
OSF_TRIGGER2.DATA_TYPE = FOF ! only for FOF class
OSF_TRIGGER2.PN = C ! Need a 'complete' flag for PNM
OSF_TRIGGER2.FT = C ! Need a 'complete' flag for FTP
OSF_TRIGGER2.ZI = W ! Need a 'wait' flag for loding telemetry
OSF_PROCESSING.ZI = P ! Set the processing flag to 'Processing'
OSF_COMPLETE.ZI = C ! Complete: Completed
OSF_COMPLETE.CV = W ! Complete: Completed
OSF_FAIL.ZI = F ! Error: Set the trouble flag
POLLING_TIME = 10 ! Wait (seconds) before polling for next
INPATH = CCS_FOF_DIR ! Directory of input files
OUTPATH = CCS_FOF_DIR ! Directory of output files