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

TacticalEnv tutorial



This tutorial explains how to use a tacticalEnv Application.

Overview

In this tutorial, we will use one tacticalEnv Application and one userInputs application to show the services sent by the application.
tacticalenvtuto1

Architecture

Services

We will only use the world service:
      <services>
         <namespace uri="http://dassault-aviation.com/tacticalenv">
            <event name="world">
               <data name="feba" type="feba" />
               <data name="targets" type="targetArray" />
               <data name="zones" type="zoneArray" />
               <data name="corridors" type="corridorArray" />
               <data name="bases" type="baseArray" />
               <data name="threats" type="threatArray" />
               <data name="elements" type="elementArray" />
            </event>
         </namespace>
      </services>

Types

We will use the types for our world service. See the types for this tutorial.

Architecture

We only have our two applications:
      <applications>
         <application name="tacticalenv">
            <deployment>
               <lib url="tacticalEnv.jar" />
            </deployment>
            <interfaces>
               <eventSend service="world" uri="http://dassault-aviation.com/tacticalenv"/>
            </interfaces>
         </application>
         <application name="userInputs">
            <deployment>
               <lib url="userInputs.jar" />
            </deployment>
            <interfaces>
               <eventReceived service="world" uri="http://dassault-aviation.com/tacticalenv"/>
            </interfaces>
         </application>
      </applications>
See the applications specification for this tutorial.

Alternative architecture declaration


You don't need to define explicitly the interfaces used by the two modules becausre by default all of the interfaces defined in the built-in modules will be used in your architecture. You can then simplify your atchitecture by:
      <applications>
         <application name="tacticalenv">
            <deployment>
               <lib url="tacticalEnv.jar" />
            </deployment>
         </application>
         <application name="userInputs">
            <deployment>
               <lib url="userInputs.jar" />
            </deployment>
            <interfaces>
               <eventReceived service="world" uri="http://dassault-aviation.com/tacticalenv"/>
            </interfaces>
         </application>
      </applications>

Properties

The properties file specifies the path of the scenario for the tacticalEnv Application:
      <properties>
         <application name="tacticalenv">
            <module name="tacticalenv">
               <moduleProperty key="scenario" value="config.xml" />
            </module>
         </application>
      </properties>

Scenario

The following file specifies the content of the scenario. It contains:
  • The definition for the FEBA
  • The definition for two Zones

Starting the framework

To start the framework, we must start the framework with our filelist.xml file for our configuration[1]
We can also forget the config argument and specify the filelist after the start
:
      java -jar protoframework.jar config=filelist.xml
One Window for the userInputs application will appear:
tactenvTuto1UserInputs
As you see, the http://dassault-aviation.com/tacticalenv:world service has already been received at start so you see the following log in the userInputs application GUI:
tactenvTuto1UserInputs2
If you click on the http://dassault-aviation.com/tacticalenv:world service in the userInputs GUI, you will see the content of the service:
tacticalenvtuto11

Notes

  1. ^ We can also forget the config argument and specify the filelist after the start

See also


Categories: tutorials

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