PIDF MODE DEFINITION BLOCK

The PIDF Mode Block contains descriptions of measurements defined under the the VIDF mode data class. The PIDF Mode definitions are used by most GUI applications to present a list of the available mode class measurements to a user. The mode definition structure provides the location of the measurement in the UDF definition as well as its defined units and descriptive labels.

A PIDF mode definition block consists of a single field which gives the number of mode definition structures followed by the individual structures themselves, each of which contains one measurement definition. A PIDF mode definition block has the generalized form:

int num_modes = ENTRY;
struct ModeN {
   string name = "Entry";
   string short_name = "Entry";
   int    pidf_mode_num = N
   int    vidf_mode_num = Entry;
   int    num_units = Entry;
   int    unit_number = Entry;
};
where N is a structure counter which begins at 0 and runs through the number of defined Mode structures less 1. The fields within the structure can be entered in any order.

Not all of the above structure fields need be present in a structure definition. Only those which are applicable to the measurement being defined need be included. Default values are supplied for any unspecified field.

KEYWORD: num_modes

The number of defined Mode structures in the PIDF. If there are no defined Mode structures listed in the PIDF then this field should be set to 0. The num_modes field can be placed anywhere within the overall PIDF file above the first Mode structure definition and external to any internal PIDF structures. It is an int field.

KEYWORD: name

A descriptive label for the measurement. The provided label should be reasonably short and should not contain any reference to units. This is a string field which if not included in the Mode structure is defaulted to a NULL.

KEYWORD: short_name

A short descriptive label for the measurement. This label is generally a decimated version of what is given in the name field.

This is a string field which if not included in the Mode structure is defaulted to a NULL.

KEYWORD: pidf_mode_num

The number of the Mode structure. This is an int field which must be present in the structure.

KEYWORD: vidf_mode_num

The VIDF mode number of the measurement. This is an int field which must be present in the structure.

KEYWORD: num_units

The number of unit definitions included in the structure. There should always be at least one unit definition even if does no conversion and returns the UDF data in its raw or stored format.

This is an int field which must be present in the structure.

KEYWORD: unit_number

The structure number of one of the PIDF unit definitions. This provides the information to take the raw measurement into one of the unit definitions provided for it. There are num_units instances of this field within the Mode structure.

This is an int field of which at least one instance must be present in the structure.

EXAMPLES

The following are examples of fully functional PIDF mode data blocks. The entries are shown within the overall PIDF definition braces which would occur only once within the PIDF file.

EXAMPLE 1

pidf v2_IMRSSD {
$*********************************************************************
    int num_modes = 2;                                $$ no. of modes
    struct Mode0 {
$---------------------MODE 00-----------------------------------------
        string name = "Freq Scaling";                 $$ mode name
        string short_name = "FqSca";                  $$ mode name
        int pidf_mode_num = 0;                        $$ struct num
        int vidf_mode_num = 0;                        $$ mode no.
        int num_units = 1;                            $$ no. of units
        int unit_number = 1;                          $$ unit numbers
    };
    struct Mode1 {
$---------------------MODE 01-----------------------------------------
        string name = "Log2(Repetitions)";            $$ mode name
        string short_name = "LogRep";                 $$ mode name
        int pidf_mode_num = 1;                        $$ struct num
        int vidf_mode_num = 1;                        $$ mode no.
        int num_units = 1;                            $$ no. of units
        int unit_number = 1;                          $$ unit numbers
    };
}

EXAMPLE 2

pidf v2_IMHIMCPH {
$*********************************************************************
    int num_modes = 4;                                $$ no. of modes
    struct Mode0 {
$---------------------MODE 00-----------------------------------------
        string name = "Charge State";                 $$ mode name
        string short_name = "Q";                      $$ mode name
        int pidf_mode_num = 0;                        $$ struct num
        int vidf_mode_num = 0;                        $$ mode no.
        int num_units = 1;                            $$ no. of units
        int unit_number = 3;                          $$ unit number
    };
    struct Mode1 {
$---------------------MODE 01-----------------------------------------
        string name = "Event Acceptance State";       $$ mode name
        string short_name = "Evt";                    $$ mode name
        int pidf_mode_num = 1;                        $$ struct num
        int vidf_mode_num = 1;                        $$ mode no.
        int num_units = 1;                            $$ no. of units
        int unit_number = 3;                          $$ unit number
    };
    struct Mode2 {
$---------------------MODE 02-----------------------------------------
        string name = "High Voltage State";           $$ mode name
        string short_name = "HV";                     $$ mode name
        int pidf_mode_num = 2;                        $$ struct num
        int vidf_mode_num = 2;                        $$ mode no.
        int num_units = 1;                            $$ no. of units
        int unit_number = 3;                          $$ unit number
    };
    struct Mode3 {
$---------------------MODE 03-----------------------------------------
        string name = "Shutter State";                $$ mode name
        string short_name = "Shut";                   $$ mode name
        int pidf_mode_num = 3;                        $$ struct num
        int vidf_mode_num = 3;                        $$ mode no.
        int num_units = 1;                            $$ no. of units
        int unit_number = 3;                          $$ unit number
    };
};

&larr Previous TOC HOME Next &rarr
Ancillary Data Block Data Quality Structure