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

UA application



uaappli
Function get parameters from a Joystick
Distribution UAAppli-bin-.zip
Jar files UAApplication.jar
Modules uaappli
Provided services through module configuration
Required services through module configuration
Mandatory properties a661Config
uaConfig or uaImpl and uaPath or script

Optional properties includeServer
uaServerConfig
defaultSubscribeService
defaultSubscribeURI
defaultProvideService
defaultProvideURI
connectionDelay
debug

The built-in UA application allows to execute an ARINC 661 Client (and optionally its associated Server). Note that several UAs can be hosted in the UA application, all sharing the same API.

Note that the UA Application module is a wrapper around an ARINC 661 server and client, provided by the J661 project. Go to j661.sourceforge.net for more information.

About ARINC 661

Main Article: ARINC 661

ARINC 661 is a standard which aims to normalize the definition of a Cockpit Display System (CDS), and the communication between the CDS and User Applications (UA) which manage Aircraft avionics functions. The GUI definition is completely defined in binary Definition Files (DF). The CDS software is constituted of a kernel which is able to create the GUI hierarchy specified in the DF during initialization, thus not needing to be recompiled if the GUI definition changes.

Architecture

The built-in UA application host one or several UAs, and optionnally also manage a Server.
uaarchi
The UA application acts as a proxy for the UAs it hosts:
  • Notifications from subscribed framework services are passed on the UAs
  • Services invocations executed by UAs are send through the framework
  • Messages from / to the ARINC 661 Server are passed from the UA application to the UAs

uaarchi2

Services

Only the services for which the UA Application Module is a provider or subscriber will be taken into account[1]
There are no limitations on the types of services which can be provided or subscribed by the UA Application
. For example:
      <interfaces>
         <subscribe service="aircraft" />
         <subscribe service="scenario" />
         <subscribe service="caslist" />
         <eventSend service="casactions" />
      </interfaces>
Note that as it is allowed for a Module to be both a provider and a subscriber of a Service, it is possible to use this in the UA Application module to notify an UA from a Service invocation from another UA.

Declaring widget events

To avoid to have to declare one service for each widget event, you can use a union type to declare all the events for one Layer, and even specify the union type as an anonymous type. This way you will have only one service for all GUI widget events. For example:
      <services>
         <event name="guiEvent" >
            <data name="event">
              <unionType variant="int" >
                <member name="button1" type="nil" />
                <member name="button2" type="nil" />
                <member name="toggle1" type="bool" />
                <member name="toggle2" type="bool" />
              </structType>
            </data>
         </event>
      </services>
And the code to invoke the Service would be for a button:
      api.addWidgetEventListener(LAYER, PUSH_BUTTON, new ARINCEventListener() {
        public void eventReceived(ARINCEvent evt) {
          WidgetEvent widgetEvt = (WidgetEvent) evt;
          try {
            Data.Union data = (Data.Union)eventService.getData("event");
            data.setMemberValue("button1");
            eventService.invoke();
          } catch (ARINCRuntimeException ex) {
            logger.error(module, ex.getMessage());
          }
        }
      });
And for a toggle:
      api.addWidgetEventListener(LAYER, TOGGLE_BUTTON, new ARINCEventListener() {
        public void eventReceived(ARINCEvent evt) {
          WidgetEvent widgetEvt = (WidgetEvent) evt;
          try {
            Data.Union data = (Data.Union)eventService.getData("event");
            boolean isSelected = ((Boolean) widgetEvt.getValues().get(0));
            data.setMemberValue("toggle1", isSelected);
            eventService.invoke();
          } catch (ARINCRuntimeException ex) {
            logger.error(module, ex.getMessage());
          }
        }
      });

Properties

Main Article: UA configuration

The UA Application has several mandatory and optional properties.

Mandatory properties

  • a661Config: the file specifying the ARINC 661 configuration for the UA Client and the Server. Note that if the a661ServerConfig is specified, the Server will have a separate ARINC configuration from the UA. See a661Config for more information
  • uaConfig, or uaImpl and uaPath, or script: the path for the UAs hosted by the UA Application

A661 configuration

Main Article: a661Config

The ARINC 661 configuration file is specified by the a661Config property (and optionally the a661ServerConfigproperty ), and has the format specified in the ARINC 661 project. See the a661Config article of the J661 project documentation for more information on how to configure a J661 Server.

UA configuration

Main Article: UA configuration

There are several ways to define the UA configuration:

Optional properties

  • a661ServerConfig: the file specifying the separate ARINC 661 configuration for the Server
  • includeServer: (default is true) true if the Server must also be started with the UA Application
  • defaultSubscribeService: the name of the default subscribed service
  • defaultProvideService: the name of the default provided service
  • connectionDelay: the delay to all the FunctionalUA.connected() method for the UA
  • debug: boolean which allows to print additional messages if there is an error when using the Functional UA runtime API

ConnectionDelay property

By default the FunctionalUA.connected() method for each UA is called as soon as the module is started and the network connected.

If you want the connected() to be called after a delay, you can specigfy it by setting the connectionDelay property. This can be useful for UDP connections when you might have a server connected after the UA. THis peroperty can be defined globally for all your UAs or for each UA.

For example:
      <properties>
         <application name="uaappli" >
            <module name="uaappli" >
               <moduleProperty key="uaImpl" value="UATutorial.jar" />
               <moduleProperty key="uaPath" value="org.da.protoframework.tutorial.uaappli.UATutorial" />
               <moduleProperty key="a661Config" value="a661/tutorial.properties" />
               <moduleProperty key="includeServer" value="false" />
               <moduleProperty key="connectionDelay" value="2s" />
            </module>
         </application>
      </properties>

Properties file examples

Setting the User Application configuration

In the following case, we do not include the Server:
      <properties>
         <application name="uaappli" >
            <module name="uaappli" >
               <moduleProperty key="uaImpl" value="UATutorial.jar" />
               <moduleProperty key="uaPath" value="org.da.protoframework.tutorial.uaappli.UATutorial" />
               <moduleProperty key="a661Config" value="a661/tutorial.properties" />
               <moduleProperty key="includeServer" value="false" />
            </module>
         </application>
      </properties>
In this next case, we include the Server:
      <properties>
         <application name="uaappli" >
            <module name="uaappli" >
               <moduleProperty key="uaImpl" value="UATutorial.jar" />
               <moduleProperty key="uaPath" value="org.da.protoframework.tutorial.uaappli.UATutorial" />
               <moduleProperty key="a661Config" value="a661/tutorial.properties" />
               <moduleProperty key="includeServer" value="true" />
            </module>
         </application>
      </properties>
In this last case, we include the Server but we use a separate ARINC 661 configuration for the Client and the Server:
      <properties>
         <application name="uaappli" >
            <module name="uaappli" >
               <moduleProperty key="uaImpl" value="UATutorial.jar" />
               <moduleProperty key="uaPath" value="org.da.protoframework.tutorial.uaappli.UATutorial" />
               <moduleProperty key="a661Config" value="a661/tutorialClient.properties" />
               <moduleProperty key="a661ServerConfig" value="a661/tutorialServer.properties" />
               <moduleProperty key="includeServer" value="true" />
            </module>
         </application>
      </properties>

Developing the UAs

Main Article: Developing a UA

There are two ways to develop a UA: Note that as explained in the previous paragraph, you can define one or more UAs which can interact with the ARINC 661 Server[2]
And even interact between themselves through Services as any Module. It is allowed and it is not an error for a Module to be both a provider and subscriver of a Service. See also being both a provider and a subscriber of a Service
. Several tutorials explain step by step how to develop and configure UAs. See UA application tutorials for more information.

Using the ARINC 661 API


There are two ways to use the ARINC 661 API:
runtimeapi

Using the ARINC 661 API for Maps


Map widgets are widgets which allow to manage digital maps, with mission-specific runtime overlays such as Flight Plans, Radar plots and targets, etc...

The elements which are shown in Maps are called MapItems. They are not widgets whith a position defined in 100th of mm but are defined only at runtime in a real-world coordinate system (for example Latitude and Longitude).

ProjectionHelper

Main Article: UA ProjectionHelper

The UAAppliHelper.jar library contains a ProjectionHelper class allowing to:
  • get the bearing of the vector of two MapItems
  • get the East/North position of a MapItem knowing its Latitude/Longitude
  • get the Latitude/Longitude of a MapItem knowing its East/North position in nautical miles
  • get the Latitude/Longitude of a MapItem knowing its position in 100th of mm

To be able to use the UAAppliHelper.jar library, you will need to reference it in your application configuration[3]
See the UA ProjectionHelper or UA WindowHelper articles for more information
.

WindowHelper

Main Article: UA WindowHelper

The UAAppliHelper.jar library contains a WindowHelper class allowing to get the native Windows on the machine on which the framework is running.

Tutorials


Several tutorials explain step by step how to develop and configure UAs. See UA application tutorials.

Notes

  1. ^ There are no limitations on the types of services which can be provided or subscribed by the UA Application
  2. ^ And even interact between themselves through Services as any Module. It is allowed and it is not an error for a Module to be both a provider and subscriver of a Service. See also being both a provider and a subscriber of a Service

  3. ^ See the UA ProjectionHelper or UA WindowHelper articles for more information

See also


Categories: builtin-applis | uaappli

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