UDF_VIDF UDF IDL INTERFACE MANUAL UDF_VIDF
NAME
UDF_VIDF
USAGE
vS UDF_VIDF ( fh, Item, dN, mN, sV )
INPUT DEFINITIONS
fh - Index into the information array to the UDF from which VIDF information is to be read. fh is the return value obtained from the call to UDF_OPEN for this UDF source.
Item - String input which specifies what's to be returned. The valid options are:
BODY - Returns all VIDF fields with exception of Table Definitions and Constant Definitions.
TABLERAW - Returns the dNth table definition in the VIDF file. All table fields are returned as found in the VIDF.
TABLECOOKED - Returns the scaled table information in the dNth table definition in the VIDF file for the UDF measurement mN. If the table for the measurement is also a function of a status definition, the table values associated with the status value sV are returned.
CONSTANTRAW - Returns the dNth constant defined in the VIDF file. All table fields are returned as found in the VIDF.
CONSTANTCOOKED - Returns the scaled constant values in the dNth constant definition in the VIDF file.
dN - The table or constant definition number to use when returning VIDF TABLE or CONSTANT information. This value is not used when Item is set to BODY and need not be included in the call in that instance.
mN - The VIDF sensor or status number associated with the portion of the table being retrieved when Item is set to TABLECOOKED. This input is not used in any other Item definitions and need not be included in the call in those instances.
sV - associated with the portion of the table being retrieved when Item is set to TABLECOOKED. This input is not used in any other Item definitions and need not be included in the call in those instances.
RETURN DEFINITION
vS - IDL structure of VIDF information being returned
DESCRIPTION
UDF_VIDF() reads information from the VIDF file associated with the UDF linked to the fh value established in a call to UDF_OPEN. If Item to set to 'BODY' the routine will return all of the VIDF contents less the table and constant blocks if any are defined. The dnth table definition can be obtained by setting Item to either 'TABLERAW' or 'TABLECOOKED' With 'TABLERAW' the entire VIDF table is returned as it is laid down in the VIDF. 'TABLECOOKED' returns just the portion of table definition for for the VIDF sensor or status definition bN, depending on what type of table it is. The table entries come back scaled and not all of the entries are returned (only the description, the table type and input settings, the table format, and the scaled table values). If the table has a status dependence then the table returned is that for the status value sV. If not status value is passed in it is assumed to be 0. The dnth constant definition can be obtained by setting Item to either 'CONSTANTRAW' or 'CONSTANTCOOKED' With 'CONSTANTRAW' the entire VIDF table is returned as it is laid down in the VIDF. 'CONSTANTCOOKED' returns the same information but the constants are scaled and the scaling factors are not returned.

The VIDF information varies in size with the UDF definition. The routine mallocs memory to hold the information and will remalloc should it need more memory in a later call. Reallocing appears at times to trash part or previously returned structures unless they are copied into a another structure. Strings are even worse as it appears that the structures keep pointers to them only. Memory for VIDF strings is malloced per UDF definition so that they are always held in memory. If you are doing a lot of work with a number of VIDF's this can turn into a memory hog. You can use UDF_VFREE to free up any portion of all of the malloced memory associated with a UDF VIDF definition.

ERRORS
UDF_VIDF : malloc(fh->vA) failed!
APPLICABLE FORMATS
UDF V2.2, V2.1, IDFS V2.1
RESTRICTIONS
None.
SEE ALSO
UDF_VFREE
Mar 11, 2007

&larr Previous TOC HOME &rarr Next
UDF_TIMES UDF_VFREE