| daftb |
|
Table of contents
Procedure
DAFTB ( DAF, convert transfer file to binary file )
SUBROUTINE DAFTB ( XFRLUN, BINFIL )
Abstract
Convert the contents of an DAF transfer file into an equivalent
binary DAF file.
Required_Reading
DAF
Keywords
CONVERSION
FILES
Declarations
IMPLICIT NONE
INTEGER XFRLUN
CHARACTER*(*) BINFIL
Brief_I/O
VARIABLE I/O DESCRIPTION
-------- --- --------------------------------------------------
XFRLUN I Logical unit of an open DAF transfer file.
BINFIL I Name of a binary DAF file to be created.
Detailed_Input
XFRLUN is the Fortran logical unit number of a previously opened
DAF transfer file has been.
The file pointer should be positioned ready to read
the file ID word.
BINFIL is the name of the binary DAF file to be created.
Detailed_Output
None.
Parameters
None.
Exceptions
1) If the DAF transfer file cannot be read, the error
SPICE(FILEREADFAILED) is signaled.
2) If the architecture of the file is not DAF, as specified by
the ID word, the error SPICE(NOTADAFFILE) is signaled.
3) If an error occurs while attempting to decode data in the DAF
transfer file, the error SPICE(BADDAFTRANSFERFILE) is
signaled.
4) If the DAF file cannot be written, an error is signaled by a
routine in the call tree of this routine.
5) The binary DAF file opened by this routine, BINFIL, is only
GUARANTEED to be closed upon successful completion of the
transfer file to binary file conversion process. In the event
of an error, the caller of this routine is required to close
the binary DAF file BINFIL.
Files
See arguments XFRLUN, BINFIL.
Particulars
Any binary DAF file may be transferred between heterogeneous
Fortran environments by converting it to an equivalent file
containing only ASCII characters. Such a file can be transferred
almost universally, using any number of established protocols.
Once transferred, the ASCII file can be converted to a binary
file, using the representations native to the new host
environment.
This routine provides a mechanism for converting an DAF transfer
file created by DAFBT, or an equivalent procedure, into an
equivalent binary DAF file which may be used with the SPICE
system. It is one of a pair of routines for performing conversions
between the binary format of a DAF file and the DAF transfer file.
The inverse of this routine is the routine DAFBT.
This routine makes NO use of the DAF reserved record area. It
can only deal with the data portion of a DAF file in the DAF
transfer file.
Upon successful completion, the binary DAF file specified by
BINFIL will have been created. The binary DAF file that was
created will be closed when this routine exits. The DAF transfer
file will remain open, as it was on entry, and it will be
positioned to read the first line after the encoded DAF file data.
Examples
Let
XFRLUN be the Fortran logical unit attached to a DAF
transfer file which is to be converted into its binary
DAF equivalent.
BINFIL be the name of the binary DAF file which will be
created from the DAF transfer file.
The following subroutine call would read the DAF transfer file
attached to the Fortran logical unit XFRLUN, convert its data into
binary format, and write that data to the binary DAF file which
has been created:
CALL DAFTB( XFRLUN, BINFIL )
Restrictions
1) This routine assumes that it is positioned ready to read the
file ID word from the DAF transfer file.
Literature_References
None.
Author_and_Institution
J. Diaz del Rio (ODC Space)
K.R. Gehringer (JPL)
E.D. Wright (JPL)
Version
SPICELIB Version 3.1.0, 13-AUG-2021 (JDR)
Added IMPLICIT NONE statement.
Edited the header to comply with NAIF standard.
SPICELIB Version 3.0.1, 22-AUG-2001 (EDW)
Corrected ENDIF to END IF.
SPICELIB Version 3.0.0, 25-JAN-1995 (KRG)
Updated the header and in line comments to reflect the change
from calling files text files to calling them transfer files.
Changed the variable name TXTLUN to XFRLUN to make it
compatible with the change in terminology.
Changed the short error message from "BADDAFTEXTFILE" to
"BADDAFTRANSFERFILE".
SPICELIB Version 2.0.0, 04-SEP-1993 (KRG)
This routine was modified to incorporate the file ID word
changes which will allow run time identification of the type of
data in a SPICE binary file.
Removed the error SPICE(IDWORDNOTKNOWN) as it was no longer
relevant.
Added the error SPICE(NOTADAFFILE) if this routine is called
with a file that does not contain an ID word identifying the
file as a DAF file.
SPICELIB Version 1.0.1, 24-JUN-1993 (KRG)
Modified the description of the DAF encoded text file format
appearing before the program code.
SPICELIB Version 1.0.0, 02-NOV-1992 (KRG)
|
Fri Dec 31 18:36:09 2021