Home
Categories
Dictionary
Glossary
Download
Project Details
Changes Log
What Links Here
FAQ
License

tacticalRules actions



This article describes the specification of tacticalRules actions.

List of supported actions

The rule conditions specify the actions a trigger is received and its associated conditions are true. There are several possible actions types:
  • event: an internal data value is set
  • service: the datas for a provider service are set and the service is invoked
  • copyService: the content of the service trigger is copied to an output service, and this service is invoked
  • copyValue: the value of a data of the service trigger is copied to an internal data
  • startTimer: starts a timer. At the end of the timer a value will be set

event

The event action sets the value of an internal data.

If the data does not exists, it will be created, else its value will change.

For example:
      <event name="myData" value="10" type="int" />

service

The service action sets the value of datas for a provided service.

Note that it is not required to set the values for all the service datas.

For example:
      <service name="triggeredEvent">
         <data name="boolData" value="true" />
      </service>

copyService


The copyService action copies the content of the service trigger (or another specified service) to an output service, and this service is invoked.

In the following example the service trigger content is copied to the triggeredEvent service:
      <copyService name="triggeredEvent"/>
In this other example the fromService content is copied to the triggeredEvent service:
      <copyService name="triggeredEvent">
          <fromService name="inputService" />
      </copyService>
The strict attribute specifies if the copies of the services are strict (the default is false). For example:
      <copyService name="triggeredEvent" strict="true"/>

copyValue

The copyValue action copy the value of a data of the service trigger to an internal data.

If the data does not exists, it will be created, else its value will change.

For example:
      <rule>
         <trigger name="nextWaypoint">
            <data name="waypointID" value="WP10" />
         </trigger>
         <copyValue name="myData" data="waypointID" />
      </rule>
In this case the rule will be triggered if the "nextWaypoint" is notified, and the value for the "waypointID" data is "WP10". When triggered, the "myData" data will have the value of "waypointID" (so "WP10").

or even:
      <rule>
         <trigger name="nextWaypoint"/>
         <copyValue name="myData" data="waypointID" />
      </rule>
In this case the rule will be triggered if the "nextWaypoint" is notified, for any value of the "waypointID" data. When triggered, the "myData" data will have the value of "waypointID".

startTimer

The startTimer action starts a timer. After the elapsed time specified in ms, the value of an internal data will be set.

For example:
      <startTimer elapsedTime="500" name="myData" value="10" type="int">

See also


Categories: builtin-applis

Copyright 2017-2020 Dassault Aviation. All Rights Reserved. Documentation and source under the LGPL v3 licence