dataStruct
element declares that the data you specify is a structure and that you look for something inside this structuredataArray
element declares that the data you specify is an array and that you look for something inside this arrayfield
element declares a field in a structureindex
element declares an index in an array<event name="trigger"> <data name="boolData" type="bool" /> <data name="structData" type="struct" /> </event>and the following types declaration:
<types> <simpleType name="bool" baseType="boolean" /> <simpleType name="int" baseType="int" /> <structType name="struct"> <field name="structField" type="struct2" /> <field name="boolField" type="bool" /> </structType> <structType name="struct2"> <field name="intField" type="int" /> <field name="boolField" type="bool" /> </structType> </types>The following example checks the value of the
intField
field in the structField
field in the structData
data:<rules> <rule> <trigger name="trigger"> <dataStruct name="structData"> <field name="structField"> <field name="intField" value="2" > </field> </dataStruct> </trigger> <service name="triggeredEvent"> <data name="boolData" value="true" /> </service> </rule> </rules>
triggeredEvent
service if the structData
structure in the trigger
service has the value 2 for its field named intField
:<rules> <rule> <trigger name="trigger"> <dataStruct name="structData"> <field name="intField" value="2" /> </dataStruct> </trigger> <service name="triggeredEvent"> <data name="boolData" value="true" /> </service> </rule> </rules>The following example will trigger the
triggeredEvent
service if the structData
structure in the trigger
service has the value 2 for its field named intField
, and the value true for its field named boolField
:<rules> <rule> <trigger name="trigger"> <dataStruct name="structData"> <field name="intField" value="2" /> <field name="boolField" value="true" /> </dataStruct> </trigger> <service name="triggeredEvent"> <data name="boolData" value="true" /> </service> </rule> </rules>
dataStruct
element declares that the data you specify is a structure and that you look for something inside this structuredataArray
element declares that the data you specify is an array and that you look for something inside this arrayfield
element declares a field in a structureindex
element declares an index in an array<rules> <rule> <trigger name="trigger"> <data name="boolData" value="true" /> </trigger> <service name="triggeredEvent"> <field name="structField"> <field name="boolField" value="true" /> </field> </service> </rule> </rules>
triggeredEvent
service with the value 10 for its field named intField
of its structure named structData
structData
structure in the trigger
service has the value 2 for its field named intField
<rules> <rule> <trigger name="trigger"> <dataStruct name="structData"> <field name="intField" value="2" /> </dataStruct> </trigger> <service name="triggeredEvent"> <dataStruct name="structData"> <field name="intField" value="10" /> </dataStruct> </service> </rule> </rules>The following example will:
triggeredEvent
service with the value 10 for its field named intField
and the value true for its field named boolField
of its structure named structData
structData
structure in the trigger
service has the value 2 for its field named intField
<rules> <rule> <trigger name="trigger"> <dataStruct name="structData"> <field name="intField" value="2" /> </dataStruct> </trigger> <service name="triggeredEvent"> <dataStruct name="structData"> <field name="intField" value="10" /> <field name="boolField" value="true" /> </dataStruct> </service> </rule> </rules>
Copyright 2017-2020 Dassault Aviation. All Rights Reserved. Documentation and source under the LGPL v3 licence