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

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

<sddl>

<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!-- -->
<!--  SDDL Name:    CONV_DISCRETE.SDDL-->
<!-- -->
<!--  Purpose:      This SDDL file defines the CONV_DISCRETE relation.-->
<!-- -->
<!--  Modification History:-->
<!-- -->
<!--    Date       OPR      Who                       Reason-->
<!--  - - - -    - - - -    - -   - - - - - - - - - - - - - - - - - - - - - -->
<!--  06/28/96    29389     Rose  Original implementation-->
<lm>  07/03/03   48821     CTB   Converted to XML format </lm> <!-- last mod -->
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->


    <record name="CONV_DISCRETE">

        <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>C8</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_discrete">

        <type>CONV_DISCRETE</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>
