| file_open (1) | UDF PROGRAMMERS MANUAL | file_open (1) |
|---|
SYNOPSIS
| #include "libbase_udf.h" | ||
| ByTe_2 | file_open | (u_ByTe_4 Key, ByTe_1 *Ext, u_ByTe_2 Ver, ByTe_2 Byear, ByTe_2 Bday, ByTe_4 Bsec, ByTe_4 Bnsec, ByTe_2 Eyear, ByTe_2 Eday, ByTe_4 Esec, ByTe_4 Ensec ByTe_1 Status); |
INPUT DEFINITIONS
| Key | - | UDF data key | ||||||
| Ext | - | UDF file extension | ||||||
| Ver | - | Version number | ||||||
| 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 | ||||||
| Status | - | Status data requested flag | ||||||
|
DESCRIPTION file_open() attempts to a set of UDF header, data, and VIDF files. The UDF definition being accessed is identified by Key and the files to be opened are those files which contain the start time Byear, Bday, Bsec, and Bnsec. The last time to be accessed is also passed into the routine as Eyear, Eday, Esec, and Ensec. This time may or may not be included in the opened files. If the routine cannot find a file containing the beginning time then it will open the file which has the earliest possible time within the range requested,
If status data is to be retrieved from this UDF then Status must be set to 1, otherwise it should be set to 0. Under normal conditions Ext should be set to a NULL string. Setting Ext to a non-NULL string will cause the file_open routine to attempt to open 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. Ver identifies the version number to be assoicated with the open files. By calling file_open() for the same Key but with different values of Ver it is possible to multiply open the UDF definition.
The file_open routine can be made to just open the VIDF by setting the external variable plot_package to 0. This is useful in instances where the VIDF alone is being accessed. In most instances the VIDF will be online even when the Data and Header files arn't.
RETURN VALUE On success, ALL_OKAY is returned, otherwise an error code is returned.
ERRORS OPEN_EX_MALLOC Error in obtaining memeory for UDF definition OPEN_PTR_MALLOC Error in obtaining memeory for UDF pointers OPEN_EX_REALLOC Error in enlarging memoryg for UDF definition
APPLICABLE FORMATS UDF V2.2, IDFS V2.1
RESTRICTIONS The UDF database keeps file times only down to the millisecond level so that the nanosecond of beginning second only is used down a resolution of 1 millisecond.
SEE ALSO ret_codes (1H)
| UDF V2.2 | July 31, 1999 | UDF V2.2 |
|---|