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

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

<sddl>

<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!-- -->
<!--  SDDL Name:    CONV_DISCRETE2.SDDL-->
<!-- -->
<!--  Purpose:      This SDDL file defines the CONV_DISCRETE2 relation.-->
<!--  The PDB cannot hold numbers larger than 999 for the low or high range.-->
<!--  In addition, the PDB cannot hold TEXT values greater than 8 characters.-->
<!--  With this delivery we have the option to have range values which are -->
<!--  INTEGE! INTEGER*4 and TEXT values which are up to 18 characters (including spaces).-->
<!--  Since standard FITS string keyword values are limited to 18 characters,-->
<!--  we thought we should be able to specify conversions which used the whole-->
<!--  space.-->
<!-- -->
<!--  Modification History:-->
<!-- -->
<!--    Date       OPR      Who                       Reason-->
<!--  - - - -    - - - -    - -   - - - - - - - - - - - - - - - - - - - - - -->
<!--  12/04/96    31745     Rose  Original implementation-->
<lm>  07/03/03   48821     CTB   Converted to XML format </lm> <!-- last mod -->
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->


    <record name="CONV_DISCRETE2">

        <description>This relation specifies the discrete conversions which
		are to be applied to certain telemetry mnemonics.

		In the past PODPS used a wide relation: one which had a
		single tuple for each mnemonic, and 16 groups of fields
		specifying up to 16 conversion ranges.  Not only is this
		a poor design limit on the number of possible ranges, but
		if a mnemonic only used 2 fields (a majority of cases) 
		there would be a significant amount of unused space reserved
		in the database.

		The current design allows a mnemonic to have any number of
		tuples, each one of which only specifies a single conversion
		range.  See OPR.29389. </description>

            <field name="mnemonic">
                    <type>C8</type>
                    <description>The name of the telemetry mnemonic</description>
            </field>

            <field name="low_value">
                    <type>I4</type>
                    <description>The low value of the range</description>
            </field>

            <field name="high_value">
                    <type>I4</type>
                    <description>The high value of the range</description>
            </field>

            <field name="text">
                    <type>C18</type>
                    <description>Return this text if the mnemonic value lies between 
			 the low_value and the high_value (inclusive)</description>
            </field>

    </record>



    <relation name="conv_discrete2">

        <type>CONV_DISCRETE2</type>

        <description>Discrete conversion coefficients</description>

        <subsystem_using>OPUS</subsystem_using>

        <index name="conv_discrete_1">
            <type>unique clustered</type>
            <field name="mnemonic"/>
            <field name="low_value"/>
        </index>

    </relation>


    <instance  name="conv_discrete" scope="global" type="CONV_DISCRETE" />

</sddl>
