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
ekntab_c

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

Procedure

   ekntab_c ( EK, return number of loaded tables ) 

   void ekntab_c ( SpiceInt   * n )

Abstract

   Return the number of loaded EK tables.

Required_Reading

   EK

Keywords

   EK
   FILES


Brief_I/O

   VARIABLE  I/O  DESCRIPTION
   --------  ---  --------------------------------------------------
   n          O   Number of loaded tables.

Detailed_Input

   None.

Detailed_Output

   n           is the number of loaded tables. The count refers
               to the number of logical tables; if multiple
               segments contain data for the same table, these
               segments collectively contribute only one table
               to the count.

Parameters

   None.

Exceptions

   None.

Files

   The returned count is based on the currently loaded EK files.

Particulars

   This routine is a utility that provides the caller with the
   number of loaded tables. Callers of ektnam_c can use this count
   as the upper bound on set of table indices when looking up table
   names.

Examples

   The numerical results shown for this example may differ across
   platforms. The results depend on the SPICE kernels used as
   input, the compiler and supporting libraries, and the machine
   specific arithmetic implementation.

   1) Suppose we have several EK files. Load one at a time and
      display, right after, the number of loaded EK tables in the
      system.

      Use the EK kernel below to load the Cassini Science Plan
      SPICE E-Kernel File based upon integrated science plan. This
      kernel contains 3 tables.

         S79_CIMSSSUPa.bep

      Use the EK kernel below to load the Cassini Spacecraft
      Sequence Status SPICE E-Kernel File based upon integrated
      Predicted Events File. This kernel contains 1 table.

         S79_status_pf.bes


      Example code begins here.


      /.
         Program ekntab_ex1
      ./
      #include <stdio.h>
      #include "SpiceUsr.h"

      int main( )
      {

         /.
         Local variables
         ./
         SpiceInt             n;

         /.
         Load the first EK.
         ./
         furnsh_c ( "S79_CIMSSSUPa.bep" );

         /.
         Display the number of EK tables in the system after
         the first EK file is loaded.
         ./
         ekntab_c ( &n );
         printf( "EK tables in the system (1 EK): %2d\n", n );

         /.
         Load the second EK.
         ./
         furnsh_c ( "S79_status_pf.bes" );

         /.
         Display the number of EK tables in the system after
         the second EK file is loaded.
         ./
         ekntab_c ( &n );
         printf( "EK tables in the system (2 EK): %2d\n", n );

         return ( 0 );
      }


      When this program was executed on a Mac/Intel/cc/64-bit
      platform, the output was:


      EK tables in the system (1 EK):  3
      EK tables in the system (2 EK):  4

Restrictions

   None.

Literature_References

   None.

Author_and_Institution

   N.J. Bachman        (JPL)
   J. Diaz del Rio     (ODC Space)

Version

   -CSPICE Version 1.0.1, 19-APR-2021 (JDR)

       Edited the header to comply with NAIF standard. Added complete
       code example based on existing fragments.

   -CSPICE Version 1.0.0, 14-OCT-2001 (NJB)

Index_Entries

   return number of loaded tables
Fri Dec 31 18:41:06 2021