UDF PROGRAMMERS MANUAL

file_pos (1) UDF PROGRAMMERS MANUAL file_pos (1)
NAME file_pos

SYNOPSIS

#include "libbase_udf.h"
ByTe_2 file_pos (u_ByTe_4 Key, ByTe_1 *Ext, u_ByTe_2 Ver, void *UDF, ByTe_2 Byear, ByTe_2 Bday, ByTe_4 Bsec, ByTe_4 Bnsec, ByTe_2 Eyear, ByTe_2 Eday, ByTe_4 Esec, ByTe_4 Ensec);

INPUT DEFINITIONS

Key - UDF data key
Ext - UDF file extension
Ver - Version number
UDF - General data structure
Byear - Beginning year of requested data
Bday - Beginning day of year of requested data
Bsec - Beginning second of day of requested data
Bnsec - Beginning nanosecond of second of requested data
Eyear - Ending year of requested data
Eday - Ending day of year of requested data
Esec - Ending second of day of requested data
Ensec - Ending nanosecond of second of requested data

DESCRIPTION file_pos() sets the file pointer within the UDF file identified with Key and Ver to the time closest to the requested start time. The routine will parse through the individual sensor sets in the UDF data record and if they contain scalar measurements, the individual measurements when positioning the file pointer.

Under normal conditions Ext should be set to a NULL string. Setting Ext to a non-NULL string will cause the file_pos routine to attempt to use the appropriate named UDF header and data files but with the string .Ext appended to it. The file must exist in the current working directory.

RETURN VALUE On success, ALL_OKAY is returned, otherwise an error code is returned.

ERRORS POS_NOT_FOUND No opened file (file_open not called?) POS_DATA_READ_ERROR Data read error POS_HDR_READ_ERROR Header read error PBACK_LOS No more data in data file PBACK_NEXT FILE Need to advance to next UDF file POS_HDR_MALLOC Error in mallocing memory for header data POS_HDR_REALLOC Error in increasing memory for header data FILE_POS_MODE Error in setting up mode structures FILE_POS_PA Error in positioning for pitch angle data

APPLICABLE FORMATS UDF V2.2, IDFS V2.1

RESTRICTIONS None

SEE ALSO ret_codes (1H) file_open (1)

UDF V2.2 July 31,1999 UDF V2.2

TOC HOME