dafgh_c |
Table of contents
Proceduredafgh_c ( DAF, get handle ) void dafgh_c ( SpiceInt * handle ) AbstractReturn (get) the handle of the DAF currently being searched. Required_ReadingDAF KeywordsFILES Brief_I/OVARIABLE I/O DESCRIPTION -------- --- -------------------------------------------------- handle O Handle for current DAF. Detailed_InputNone. Detailed_Outputhandle is the handle for the current DAF (the handle connected to the DAF that is currently being actively searched). ParametersNone. Exceptions1) If this routine is called when no search is in progress in the current DAF, the error SPICE(DAFNOSEARCH) is signaled by a routine in the call tree of this routine. 2) If the DAF whose handle is to be returned has actually been closed, an error is signaled by a routine in the call tree of this routine. FilesThis routine returns the handle of a DAF that is currently being searched. ParticularsUnder rare circumstances, it may be necessary to identify the particular DAF that is being searched (such as when the search is begun by one module and continued by another). ExamplesConsider a program like the following, which examines the individual arrays in a DAF and examines the contents of those meeting certain criteria. #include "SpiceUsr.h" ... dafopw_c ( fname, &handle ); dafbfs_c ( handle ); daffna_c ( &found ); while ( found ) { check_segment ( status ); if ( eqstr_c( status, "EXAMINE" ) ) { examine_segment(); } daffna_c ( &found ); } The function check_segment, which assumes that a search is in progress, gets the summary and name for the current array, and uses them to decide whether the data in the array merit further consideration. void check_segment ( status ) ... dafgs_c ( sum ); dafgn_c ( name ); dafus_c ( sum, nd, ni, dc, ic ); ... [ set status ] ... The function examine_segment examines the data in the array itself. In order to do do, it needs to have access not only to the summary, but to the handle of the file containing the array. This is provided by dafgh_c. void examine_segment() ... dafgs_c ( sum ); dafus_c ( sum, nd, ni, dc, ic ); dafgh_c ( &handle ); dafgda_c ( handle, begin, end, data ); ... RestrictionsNone. Literature_ReferencesNone. Author_and_InstitutionN.J. Bachman (JPL) J. Diaz del Rio (ODC Space) W.L. Taber (JPL) I.M. Underwood (JPL) Version-CSPICE Version 1.0.1, 13-APR-2021 (JDR) Edited the header to comply with NAIF standard. Moved DAF required reading from -Literature_References to -Required_Reading section. -CSPICE Version 1.0.0, 19-JUL-2011 (NJB) (WLT) (IMU) Index_Entriesget DAF handle |
Fri Dec 31 18:41:03 2021