XTCE 1.3 RTF Avatar
  1. OMG Issue

XTCE13 — Discrete lookup list has no default (or i don't get it)

  • Key: XTCE13-110
  • Status: closed  
  • Source: NASA ( Mr. James Kevin Rice)
  • Summary:

    The discrete lookup list, also sprinkled about the syntax tree retrieves the specified numeric value if its condition evaluates to true. for particular discrete in the list. there are several kinds of conditions. The text isn't completely clear but it seems the first discrete lookup in the list that evaluates to true – returns that value. But what happens if none eval to true? it seems that default value is warrented.

    Note: the value is a long. Therefore it does not have same problem as dynamic lookups double data types for integer syntax items.

  • Reported: XTCE 1.2 — Thu, 9 Jul 2020 19:31 GMT
  • Disposition: Resolved — XTCE 1.3
  • Disposition Summary:

    Discrete Lookups Require a "false" Condition Value

    It is not clear what to do with an XTCE DiscreteLookupList element in the event that all the child DiscreteLookup elements never evaluate to "true". As a result, no value can be determined.

    The DiscreteLookupList element should have a "defaultValue" attribute that takes effect when no conditions in the child element evaluate to "true".

    In order to make this happen, both the DiscreteLookupListType and the ArgumentDiscreteLookupListType need to have this new attribute added.

    Original DiscreteLookupListType:

    <complexType name="DiscreteLookupListType">
    <annotation>
    <documentation xml:lang="en">Describe an ordered table of integer values and associated conditions, forming a lookup table. The list may have duplicates. The table is evaluated from first to last, the first condition to be true returns the value associated with it. See DiscreteLookupType.</documentation>
    </annotation>
    <sequence>
    <element name="DiscreteLookup" type="xtce:DiscreteLookupType" maxOccurs="unbounded">
    <annotation>
    <documentation xml:lang="en">Describe a lookup condition set using discrete values from parameters.</documentation>
    </annotation>
    </element>
    </sequence>
    </complexType>

    Revised DiscreteLookupListType:

    <complexType name="DiscreteLookupListType">
    <annotation>
    <documentation xml:lang="en">Describe an ordered table of integer values and associated conditions, forming a lookup table. The list may have duplicates. The table is evaluated from first to last, the first condition to be true returns the value associated with it. See DiscreteLookupType.</documentation>
    </annotation>
    <sequence>
    <element name="DiscreteLookup" type="xtce:DiscreteLookupType" maxOccurs="unbounded">
    <annotation>
    <documentation xml:lang="en">Describe a lookup condition set using discrete values from parameters.</documentation>
    </annotation>
    </element>
    </sequence>
    <attribute name="defaultValue" type="long" use="required">
    <annotation>
    <documentation xml:lang="en">In the event that no lookup condition evaluates to true, then this value will be used.</documentation>
    </annotation>
    </attribute>
    </complexType>

    Original ArgumentDiscreteLookupListType:

    <complexType name="ArgumentDiscreteLookupListType">
    <annotation>
    <documentation xml:lang="en">Identical to DiscreteLookupListType but supports argument instance references.</documentation>
    </annotation>
    <sequence>
    <element name="DiscreteLookup" type="xtce:ArgumentDiscreteLookupType" maxOccurs="unbounded">
    <annotation>
    <documentation xml:lang="en">Describe a lookup condition set using discrete values from arguments and/or parameters.</documentation>
    </annotation>
    </element>
    </sequence>
    </complexType>

    Revised ArgumentDiscreteLookupListType:

    <complexType name="ArgumentDiscreteLookupListType">
    <annotation>
    <documentation xml:lang="en">Identical to DiscreteLookupListType but supports argument instance references.</documentation>
    </annotation>
    <sequence>
    <element name="DiscreteLookup" type="xtce:ArgumentDiscreteLookupType" maxOccurs="unbounded">
    <annotation>
    <documentation xml:lang="en">Describe a lookup condition set using discrete values from arguments and/or parameters.</documentation>
    </annotation>
    </element>
    </sequence>
    <attribute name="defaultValue" type="long" use="required">
    <annotation>
    <documentation xml:lang="en">In the event that no lookup condition evaluates to true, then this value will be used.</documentation>
    </annotation>
    </attribute>
    </complexType>

    Note that the change above is the addition of the "attribute" schema element.

  • Updated: Tue, 1 Jul 2025 15:05 GMT