<?xml version="1.0" encoding="UTF-8"?>

<!-- <!DOCTYPE sddlschema SYSTEM "sddlschema.xsd">-->

<sddl>

<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!-- -->
<!--  SDDL Name:    YURINTAB.SDDL            -->
<!-- -->
<!--  Purpose:      This SDDL file defines relation YURINTAB            -->
<!-- -->
<!--  Modification History:-->
<!-- -->
<!--    Date       OPR      Who                    Reason-->
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!--  19-JAN-96             PHyde          Original Implementaton -->
<!--  22-JAN-96             Rose           Added descriptions -->
<!--  31-JUL-96    31905    MARose         Fixed syntax so SDDLCOMP will work -->
<!--  06-FEB-03    47215    LGardner       Make index unique -->
<!--  06-FEB-03    47507    MSwam          Rename description (reserved word) -->
<lm>  07/03/03     48821     CTB   Converted to XML format </lm> <!-- last mod -->
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->

    <record name="YURINT_TYPE">

        <description>This SDDL file defines relation YURINTAB which, in turn,
             defines the location of parameters in the telemetry.</description>


        <field name="field_name">
            <type>C20</type>
            <description>Name of the telemetry parameter</description>
        </field>

        <field name="field_format">
            <type>C8</type>
            <description>Printing format of the telemetry parameter</description>
        </field>

        <field name="long_description">
            <type>C30</type>
            <description>Longer description of the telemetry parameter</description>
        </field>

        <field name="initial_byt">
            <type>I2</type>
            <description>First byte in the telemetry stream which contains
                    this parameter</description>
        </field>

        <field name="terminal_byt">
            <type>I2</type>
            <description>Last byte in the telemetry stream which contains
                    this parameter</description>
        </field>

        <field name="start_bit">
           <type>I2</type>
           <description>First bit of the last byte in the telemetry stream
                       which contains this parameter</description>
           <range>0..7</range>
        </field>

        <field name="end_bit">
            <type>I2</type>
            <description>Last bit of the last byte in the telemetry stream
                       which contains this parameter</description>
            <range>0..7</range>
        </field>

        <field name="data_type">
            <type>C6</type>
            <description>Which type of telemetry packet contains the parameter.
                       Possible values and their meanings are:
                         DP3SHF (standard header packet)
                         DP4ULF (unique data log)
                         DP5SDF (science packet)
                         PKTHDR (packet header)</description>
            <discrete>DP3SHF</discrete>
            <discrete>DP4ULF</discrete>
            <discrete>DP5SDF</discrete>
            <discrete>PKTHDR</discrete>
        </field>

        <field name="instrument">
            <type>C1</type>
            <description>Specifies which science instrument (if any) defines
                       this parameter.</description>
            <discrete>A</discrete>
            <discrete>N</discrete>
            <discrete>O</discrete>
            <discrete>U</discrete>
            <discrete>V</discrete>
            <discrete>W</discrete>
            <discrete>X</discrete>
            <discrete>Y</discrete>
            <discrete>Z</discrete>
        </field>

        <field name="mnemonic">
            <type>C8</type>
            <description>Eight character name of this parameter.</description>
        </field>

        <field name="eval_index">
            <type>I2</type>
            <description>FORTRAN common block index of the variable containing
                       the current value of this parameter.</description>
        </field>

        <field name="log_frame">
            <type>I2</type>
            <description>Logical frame which contains this parameter. E.g.
                   which WFPC CCD.</description>
        </field>

        <field name="line_count">
            <type>I2</type>
            <description>Which line (or packet) contains this parameter.</description>
        </field>

        <field name="calb_index">
            <type>I2</type>
            <description>FORTRAN common block index of the variable containing
                   the current value of this parameter.</description>
        </field>

        <field name="dp_index">
            <type>I2</type>
            <description>FORTRAN common block index of the variable containing
                   the current value of this parameter.</description>
        </field>

        <field name="cnv_type">
            <type>C1</type>
            <description>Which type of conversion to be applied to the raw
                   value of this parameter to convert it to engineering
                   units.  Values are D (discrete), L (linear), 
                   P (polynomial).</description>
            <discrete>D</discrete>
            <discrete>L</discrete>
            <discrete>P</discrete>
        </field>

    </record>


    <relation name="yurintab">

        <type>YURINT_TYPE</type>

        <description>info for deciphering telemetry data</description>

        <subsystem_using>OPUS</subsystem_using>

        <index name="yurintab_1">
            <type>unique clustered</type>
            <field name="instrument"/>
            <field name="mnemonic"/>
            <field name="data_type"/>
            <field name="field_name"/>
            <field name="field_format"/>
            <field name="log_frame"/>
        </index>

        <index name="yurintab_2">
            <type>nonclustered</type>
            <field name="data_type"/>
            <field name="instrument"/>
            <field name="cnv_type"/>
            <field name="mnemonic"/>
        </index>

    </relation>


    <instance  name="yurintab" scope="global" type="YURINT_TYPE" />

</sddl>
