The Virtual Instrument Definition File (VIDF) is the self-documenting portion of the Universal Data Format (UDF). As the general interface between a UDF data set definition and the UDF kernel software. It describes what measurements are contained within the UDF, where they have been placed within the UDF Data and Header structures, and all the necessary information on how to retrieve them. It also contains all necessary information to convert the raw UDF data into physical units. This exists in the form of lookup tables, polynomial expansions and constant values, all of which can be applied by the UDF kernel software to the retrieved, raw UDF data. It is the purpose of this document to fully describe the VIDF and its contents to the point where if it is needed, a VIDF could be created, or if one exists could be modified or extended.
The VIDF file itself is a rigidly formatted ASCII file which also exists in a binary format. The binary version of the file is used by the UDF kernel software and must be created before any of changes in the ASCII VIDF file take effect. The format of the ASCII file, which may seem cumbersome and archaic, holds to its original form in deference to the large number of defined VIDFs in the community today.
It is perhaps easiest to consider the VIDF as being as set of blocks of information. Each block consists of a number of fields, with each field consisting of one or more lines of information.
The VIDF is an assemblage of information, some of which occupy single lines, some which run over multiple lines. Each line of information is split into three sections, a line format character followed by the line input, and terminated by an optional comment field. Note: The comment field is not carried over into the binary version of the VIDF.
Each line of input in the VIDF begins with one of 8 line format characters. These are listed in the table below.
| LINE FORMAT IDENTIFIERS | |
|---|---|
| CHARACTER | DEFINITION |
| V | Version entry |
| n | Null Entry Line |
| m | Beginning Line Of An Array Entry |
| l | Information Field With 4 Byte Integer Values |
| s | Information Field With 2 Byte Integer Values |
| b | Information Field With 1 Byte Integer Values |
| t | Information Field With Strings of 79 Byte Length |
| T | Information Field With Strings of 20 Byte Length |
Line format characters are used by the program which converts the ASCII file into its binary form to parse the field entries. Most of the line formats just specify the storage to use when converting or acquiring the input data. The two that don't are n and m.
n is the null line indicator. The VIDF null field has no input information associated with it but may have an optional comment field attached. It is used when a VIDF entry contains no applicable information and has the form:
n /* Sample Null Line */
m is used when the VIDF field is an array of information. The array specification line is the first line in any array field. The input portion of the line contains two integer values. The first gives the total number of elements in the array and the second is the number of elements which will be given on each of the array input lines. The last input line in an array field need not contain the full number of entries. Each of the array input lines which follows the array specification begins with the line format appropriate for the data being listed. A VIDF array field looks like:
m 39 7 /* Example VIDF Array */ l 0 1 2 3 4 5 6 /* 00-06 */ l 7 8 9 10 11 12 13 /* 07-13 */ l 14 15 16 17 18 19 20 /* 14-20 */ l 21 22 23 24 25 26 27 /* 21-27 */ l 28 29 30 31 32 33 34 /* 28-34 */ l 35 36 37 38 /* 35-38 */This is an array of 39 elements with 7 elements given per input line with the last line containing just the number of elements necessary to complete the array.
Any line of information in the VIDF may be terminated by a comment field. Comments are defined as any output between the delimiters /*   */.
As mentioned above a VIDF file can be considered to consist of number of blocks of information laid down in a specified order. Simple information fields will consist of only a single line of data while array fields may consist of multiple lines. Groups of blocks may be put together to create a super-block of information which may occur in multiple repetitions. The two most common repetitive super-block definitions are those associated with VIDF Table and Constant definitions.
The VIDF will be presented in three sections The first will treat what will be called the VIDF Proper. This consists of the set of information blocks which are present in all VIDF definitions. The next two sections will treat the Table and Constant blocks.The following table shows a complete break-out of the VIDF proper. The information blocks within the this portion of the file are always specified and always specified in the order shown. A null line can be used for blocks which are not applicable to the UDF being defined. If present, Table and Constant super-blocks are added at the end of this set of entries.
The table divides each entry block into 6 columns of information. These are: the block type (A = array, S = single); the super-block with which the block is associated: a description of the entry block; the required line format id; the required number of elements in the block, and the block ID. Clicking on a super-block designation will bring up a description of the super-block while clicking on the block name will bring up an expanded definition of the block itself. The block ID in the last column is the UDF identifier which is passed into the UDF kernel read_idf routine to retrieve the information for that VIDF block. In the table the Block ID is also used in the ELEMENTS column to specify the array size of variable length fields. The field length has a length equal to the value associated with the identified block.
The following table is a complete break-out one VIDF table super-block. The blocks within the super-block are always specified in the order shown with a null line being used for blocks which are not applicable. The table has the same format at that used for displaying the VIDF proper blocks except that the super-block column has been removed.
| VIDF TABLE BLOCK | ||||
|---|---|---|---|---|
| TYPE | BLOCK NAME | LINE ID | ELEMENTS | IDENTIFIER |
| S | NUMBER OF SCALE VALUES | l | 1 | _TblScaSZ |
| S | NUMBER OF TABLE VALUES | l | 1 | _TblEleSZ |
| S | TABLE TYPE | b | 1 | _TblTypE |
| S | NUMBER OF COMMENT LINES | s | 1 | _TblDescLeN |
| A | COMMENTS | t | 1 | _TblDesC |
| S | APPLICATION | b | 1 | _TblVaR |
| S | EXPAND | b | 1 | _TblExpanD |
| S | NUMBER OF CRITICAL ACTION VALUES | l | 1 | _CritActSZ |
| A | CRITICAL STATUS BYTES | b | _SeN or _StatuS | _CritStatuS |
| A | SENSOR CRITICAL OFFSETS | s | _SeN or _StatuS | _CritOfF |
| A | TABLE CRITICAL OFFSETS | l | _CritActSZ | _CritActioN |
| A | TABLE FORMAT | b | _SeN | _TblFmT |
| A | TABLE OFFSETS | l | _SeN | _TblOfF |
| A | TABLE VALUE SCALES | b | abs(_TblScaSZ) | _TblScA |
| A | TABLE VALUES | l | _TblEleSz | _TbL |
The following table is a complete break-out one VIDF constant super-block. The blocks within the super-block are always specified in the order shown with a null line being used for blocks which are not applicable. The table has the same format at that used for displaying the VIDF proper fields except that the block column has been removed.
| VIDF CONSTANT BLOCK | ||||
|---|---|---|---|---|
| TYPE | BLOCK NAME | LINE ID | ELEMENTS | IDENTIFIER |
| S | CONSTANT IDENTIFIER | b | 1 | _ConstID |
| S | NUMBER OF COMMENT LINES | s | 1 | _ConstDescLeN |
| A | COMMENTS | t | 1 | _ConstDesC |
| A | TABLE VALUE SCALES | b | _SeN | _ConstScA |
| A | TABLE VALUES | l | _SeN | _ConsT |