Index of Functions: A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X 
Index Page
cklpf

Table of contents
Procedure
Abstract
Required_Reading
Keywords
Declarations
Brief_I/O
Detailed_Input
Detailed_Output
Parameters
Exceptions
Files
Particulars
Examples
Restrictions
Literature_References
Author_and_Institution
Version

Procedure

     CKLPF ( CK, load pointing file )

     ENTRY CKLPF ( FNAME, HANDLE )

Abstract

     Load a CK pointing file for use by the CK readers. Return that
     file's handle, to be used by other CK routines to refer to the
     file.

Required_Reading

     CK
     DAF

Keywords

     POINTING

Declarations

    CHARACTER*(*)         FNAME
    INTEGER               HANDLE

Brief_I/O

     VARIABLE  I/O  DESCRIPTION
     --------  ---  --------------------------------------------------
     FNAME      I   Name of the CK file to be loaded.
     HANDLE     O   Loaded file's handle.
     FTSIZE     P   Maximum number of loaded CK files.

Detailed_Input

     FNAME    is the name of a C-kernel file to be loaded.

Detailed_Output

     HANDLE   is an integer handle assigned to the file upon loading.
              Almost every other CK routine will subsequently use
              this number to refer to the file.

Parameters

     FTSIZE   is the maximum number of CK files that may
              be loaded simultaneously under any circumstances.
              FTSIZE is currently set to match the maximum number
              of DAF files that may be loaded simultaneously.

Exceptions

     1)  If an attempt is made to load more DAF files than is
         specified by the parameter FTSIZE in DAF system, an error
         is signaled by a routine in the call tree of this routine.

     2)  If an attempt is made to load more files than is specified
         by the parameter FTSIZE in the CK subsystem, and if the DAF
         system has room to load another file, the error
         SPICE(CKTOOMANYFILES) is signaled. The current setting of
         FTSIZE does not allow this situation to arise: the DAF
         system will trap the error before this routine has the
         chance.

     3)  If the file specified by FNAME can not be opened, an error
         is signaled by a routine in the call tree of this routine.

     4)  If the file specified by FNAME has already been loaded,
         it will become the "last-loaded" file. The readers
         search the last-loaded file first.

Files

     The C-kernel file specified by FNAME is loaded. The file is
     assigned an integer handle by CKLPF. Other CK routines will refer
     to this file by its handle.

Particulars

     Before a file can be read by the C-kernel readers, it must be
     loaded by CKLPF, which among other things load the file into
     the DAF subsystem.

     Up to FTSIZE files may be loaded for use simultaneously, and a
     file only has to be loaded once to become a potential search
     target for any number of subsequent reads.

     Once a C-kernel has been loaded, it is assigned a file
     handle, which is used to keep track of the file internally, and
     which is used by the calling program to refer to the file in all
     subsequent calls to CK routines.

     If there is room for a new file, CKLPF opens the file for
     reading. This routine must be called prior to a call to CKGP or
     CKGPAV.

     CK readers search files loaded with CKLPF in the reverse order
     in which they were loaded. That is, last-loaded files are
     searched first.

Examples

     See $Examples in CKBSR.

Restrictions

     None.

Literature_References

     None.

Author_and_Institution

     N.J. Bachman       (JPL)
     J. Diaz del Rio    (ODC Space)
     J.M. Lynch         (JPL)
     W.L. Taber         (JPL)
     R.E. Thurman       (JPL)
     I.M. Underwood     (JPL)

Version

    SPICELIB Version 5.0.2, 25-OCT-2021 (JDR)

        Updated the header to comply with NAIF standard. Extended
        $Particulars section.

    SPICELIB Version 5.0.1, 30-JAN-2017 (NJB)

        Corrected various spelling errors within comments.

    SPICELIB Version 5.0.0, 17-MAR-2014 (NJB)

        Updated segment pool initialization condition in entry
        point CKLPF so that the pool is initialized only if the file
        table is empty.

    SPICELIB Version 4.1.0, 20-NOV-2001 (NJB)

        Bug fixes:

        1) When an already loaded kernel is opened with DAFOPR,
           it now has its link count reset to 1 via a call to
           DAFCLS.

        2) This routine now resets all file numbers when
           the next file number reaches INTMAX()-1, thereby avoiding
           arithmetic overflow. The numbers in the file table
           are replaced with consecutive integers in the range
           1 : NFT, such that the ordering of the numbers is not
           changed. The HFS and LFS arrays are updated accordingly.

        Also, the flags indicating validity of the re-use intervals
        are set to .FALSE. here.

    SPICELIB Version 4.0.0, 17-FEB-2000 (WLT)

        Added the Entry point CKHAVE

    SPICELIB Version 3.0.0, 03-MAR-1999 (WLT)

        The parameter STSIZE was increased from 1000 to 4000 to
        avoid the buffering error that exists in the CKBSR.

    SPICELIB Version 2.0.0, 25-NOV-1992 (JML)

        When loading a file, CKLPF now checks if the file table is
        full only after determining that the file is not currently
        loaded. Previously, if the file table was full and an attempt
        was made to reload a file, an error was signaled. A new
        exception was added as a result of this change.

        A bug in the way that CKLPF and CKUPF clean up the instrument
        tables after a file is unloaded was fixed.

    SPICELIB Version 1.0.1, 10-MAR-1992 (WLT)

        Comment section for permuted index source lines was added
        following the header.

    SPICELIB Version 1.0.0, 07-SEP-1990 (RET) (IMU)
Fri Dec 31 18:36:02 2021