dafbt |
Table of contents
ProcedureDAFBT ( DAF, convert binary file to transfer file ) SUBROUTINE DAFBT ( BINFIL, XFRLUN ) AbstractConvert the contents of a binary DAF file to an equivalent DAF transfer file. Required_ReadingDAF KeywordsCONVERSION FILES DeclarationsIMPLICIT NONE CHARACTER*(*) BINFIL INTEGER XFRLUN Brief_I/OVARIABLE I/O DESCRIPTION -------- --- -------------------------------------------------- BINFIL I The name of a binary DAF file to be converted. XFRLUN I Logical unit of a previously opened file. Detailed_InputBINFIL is the name of a binary DAF file which is to be converted to an equivalent DAF transfer file. XFRLUN is the Fortran logical unit number of a previously opened file. The DAF transfer file will be written to the file attached to this logical unit beginning at the current position in the file. Detailed_OutputNone. ParametersNone. Exceptions1) If the binary DAF file specified by the filename BINFIL cannot be opened for read access, an error is signaled by a routine in the call tree of this routine. 2) If for some reason the DAF transfer file cannot be written to, the error SPICE(FILEWRITEFAILED) is signaled. 3) If, for any reason, the DAF file cannot be read, an error is signaled by a routine in the call tree of this routine. 4) If the ID word cannot be read from the binary file, the error SPICE(FILEREADFAILED) is signaled. 5) The binary DAF file opened by this routine, BINFIL, is only GUARANTEED to be closed upon successful completion of the conversion process. In the event of an error, the caller of this routine is required to close the binary DAF file BINFIL. FilesSee arguments BINFIL, XFRLUN. ParticularsAny 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 a binary DAF file into an equivalent encoded ASCII file called a DAF transfer file. 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 DAFTB. The contents of the reserved records in a binary DAF file are ignored by this routine. They are not written to the DAF transfer file. The reserved records must be dealt with separately from the data in a DAF file. Upon successful completion, the DAF transfer file attached to Fortran logical unit XFRLUN will contain the same data as the binary DAF file BINFIL. The binary DAF file BINFIL 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 write on the first line following the encoded DAF data. ExamplesLet BINFIL be the name of a binary DAF file which is to be converted to an equivalent DAF transfer file. XFRLUN be the Fortran logical unit to which the DAF transfer file is to be written. The following subroutine call would read the binary DAF file with the name BINFIL, convert its data into an encoded format, and write that data to the DAF transfer file attached to the Fortran logical unit XFRLUN, beginning at the current position in the file. CALL DAFBT( BINFIL, XFRLUN ) RestrictionsNone. Literature_ReferencesNone. Author_and_InstitutionJ. Diaz del Rio (ODC Space) K.R. Gehringer (JPL) F.S. Turner (JPL) VersionSPICELIB Version 4.1.0, 13-AUG-2021 (JDR) Added IMPLICIT NONE statement. Edited the header to comply with NAIF standard. SPICELIB Version 4.0.0, 16-NOV-2001 (FST) Updated the routine to utilize the new handle manager interfaces. 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. SPICELIB Version 2.0.0, 04-OCT-1993 (KRG) No changes to this routine were necessary to incorporate the new file ID word format. This routine already read and copied the ID word to the text file being created. Also, all list directed writes in this routine were replaced by formatted writes with FMT = '(A)'. This routine only writes character data. Added a test of FAILED() after the call to DAFHLU for completeness. 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, 29-OCT-1992 (KRG) |
Fri Dec 31 18:36:07 2021