Key: XTCE12-464 Status: closed Source: Boeing ( Mr. David Overeem) Summary: After approval of all the changes so far for XTCE 1.2, there are 5 cases where binding code generation results in List<Object> returns. These cases exist when multiple elements can be returned from a choice/sequence that do not share a common ancestor type. Reported: XTCE 1.1 — Sun, 30 Jul 2017 15:32 GMT Disposition: Resolved — XTCE 1.2 Disposition Summary: Propose to correct the List<Object> cases in the triggers The triggers within the TriggerSet can be slightly refactored in the schema to avoid the List<Object> mapping from the JAXB code generator. Add this new type between AlgorithmTextType and ChecksumType: <complexType name="BaseTriggerType" abstract="true"> <annotation> <documentation xml:lang="en">A base type for the various triggers, purely to improve the mappings created by data binding compilers.</documentation> </annotation> </complexType> Modify existing trigger specific types to use extensions of the base type above on three of the complexType definitions. Replace the old definition (first) with the new one (second). Old: <complexType name="OnContainerUpdateTriggerType"> <attribute name="containerRef" type="xtce:NameReferenceType" use="required"/> </complexType> New: <complexType name="OnContainerUpdateTriggerType"> <annotation> <documentation xml:lang="en">Describe a reference to container that triggers an event when the telemetry container referred to is updated (processed). See TriggerSetType.</documentation> </annotation> <complexContent> <extension base="xtce:BaseTriggerType"> <attribute name="containerRef" type="xtce:NameReferenceType" use="required"> <annotation> <documentation xml:lang="en">Reference to the Container whose update/receipt triggers this algorithm to evaluate.</documentation> </annotation> </attribute> </extension> </complexContent> </complexType> Old: <complexType name="OnPeriodicRateTriggerType"> <attribute name="fireRateInSeconds" type="double" use="required"/> </complexType> New: <complexType name="OnPeriodicRateTriggerType"> <annotation> <documentation xml:lang="en">Describe a periodic time basis to trigger an event. See TriggerSetType.</documentation> </annotation> <complexContent> <extension base="xtce:BaseTriggerType"> <attribute name="fireRateInSeconds" type="double" use="required"> <annotation> <documentation xml:lang="en">The periodic rate in time in which this algorithm is triggered to evaluate.</documentation> </annotation> </attribute> </extension> </complexContent> </complexType> Old: <complexType name="OnParameterUpdateTriggerType"> <annotation> <documentation xml:lang="en">Names a parameter that upon change will start the execution of the algorithm. Holds a parameter reference name for a parameter that when it changes, will cause this algorithm to be executed.</documentation> </annotation> <attribute name="parameterRef" type="xtce:NameReferenceType" use="required"/> </complexType> New: <complexType name="OnParameterUpdateTriggerType"> <annotation> <documentation xml:lang="en">Describe a reference to parameter that triggers an event when the telemetry parameter referred to is updated (processed) with a new value. See TriggerSetType.</documentation> </annotation> <complexContent> <extension base="xtce:BaseTriggerType"> <attribute name="parameterRef" type="xtce:NameReferenceType" use="required"> <annotation> <documentation xml:lang="en">Reference to the Parameter whose update triggers this algorithm to evaluate.</documentation> </annotation> </attribute> </extension> </complexContent> </complexType> Next improve the annotations on the TriggerSet. Old: <complexType name="TriggerSetType"> <annotation> <documentation xml:lang="en">A trigger is used to initiate the processing of some algorithm. A trigger may be based on an update of a Parameter or on a time basis. Triggers may also have a rate that limits their firing to a 1/rate basis.</documentation> </annotation> <choice maxOccurs="unbounded"> <element name="OnParameterUpdateTrigger" type="xtce:OnParameterUpdateTriggerType"/> <element name="OnContainerUpdateTrigger" type="xtce:OnContainerUpdateTriggerType"/> <element name="OnPeriodicRateTrigger" type="xtce:OnPeriodicRateTriggerType"/> </choice> <attribute name="name" type="string" use="optional"/> <attribute name="triggerRate" type="xtce:NonNegativeLongType" use="optional" default="1"/> </complexType> New: <complexType name="TriggerSetType"> <annotation> <documentation xml:lang="en">A trigger is used to initiate the processing of some algorithm. A trigger may be based on an update of a Parameter, receipt of a Container, or on a time basis. Triggers may also have a maximum rate that limits how often the trigger can be invoked.</documentation> </annotation> <choice maxOccurs="unbounded"> <element name="OnParameterUpdateTrigger" type="xtce:OnParameterUpdateTriggerType"> <annotation> <documentation xml:lang="en">This element instructs the trigger to invoke the algorithm evaluation when a Parameter update is received.</documentation> </annotation> </element> <element name="OnContainerUpdateTrigger" type="xtce:OnContainerUpdateTriggerType"> <annotation> <documentation xml:lang="en">This element instructs the trigger to invoke the algorithm evaluation when a Container is received.</documentation> </annotation> </element> <element name="OnPeriodicRateTrigger" type="xtce:OnPeriodicRateTriggerType"> <annotation> <documentation xml:lang="en">This element instructs the trigger to invoke the algorithm evaluation using a timer.</documentation> </annotation> </element> </choice> <attribute name="name" type="string" use="optional"> <annotation> <documentation xml:lang="en">Triggers may optionally be named.</documentation> </annotation> </attribute> <attribute name="triggerRate" type="xtce:NonNegativeLongType" use="optional" default="1"> <annotation> <documentation xml:lang="en">This attribute is a maximum rate that constrains how quickly this trigger may evaluate the algorithm to avoid flooding the implementation. The default is once per second. Setting to 0 results in no maximum.</documentation> </annotation> </attribute> </complexType> Updated: Tue, 10 Jul 2018 14:23 GMT