Sunday 27 February 2011

j661: creating a simple User Application

As you may already know, the ARINC 661 standard is defined around an architecture where:

  • An ARINC 661 Server (also called ARINC 661 Kernel), which is a part of the Cockpit Display System (CDS) is initialized with a set a ARINC 661 Definition Files, and is responsible for the the User Interface

  • System Applications (called user Applications or UA in the standard) handle the logic, and are able to communicate to the Server to change widget parameters that were created at initialization. From the other side, the Server send to the User Application user events on widgets (such as clicks on buttons, change of text fields, etc...)



The ARINC 661 standard makes the UI definition very simple, but there is still the burden of developing the User Application part. The j661 project already provides a generic API which simplifies greatly the User Application / ARINC 661 Server communication, but you still need to develop the User Application code itself.

The Embedded Client framework provided in the project further simplifies this process, at least for prototyping User Applications. This framework is built under the following architecture:

The Embedded Client is a generic User Application with, contrary to the Client provided in the j661 project, has a minimal Graphical user interface, and is much more configurable.

The Embedded Client has the following features:

  • It is possible to start only a User Application, without any associated Server. Note that in this case the arincServer.jar and all associated libraries don't need to be provided

  • It is possible to start a User Application, and it's associated Server, sharing the same configuration properties

  • It is possible to add any list of Scripts to the User Application, to code the logic. Note that as it is the case for an ARINC 661 library embedded in a Java application, the scripts will use the Client java API

  • It is possible to add a list of DataProviders to the User Application, and wire the datas returned by the DataProviders to ARINC 661 parameters



A DataProvider is a source of data that can be plugged to an Embedded Client. To the DataProvider is attached an XML configuration file which defined the correspondence between the datas and the ARINC 661 properties. This way, it is possible to define the communication from the System Datas to the Client (User Application) by only defining a XML configuration file. No more code to write, you only need to wire the system datas to the ARINC 661 properties.

An example of this is provided in the j661 project: The FGPlayback contrib allows to read a FlightGear playback scenario by only defining an XML configuration file wiring the FlightGear variables to the ARINC 661 properties. For example:

<dataProvider provider="FGPlayback">
<context name="testLayer" layerID="1" appliID="1" />
<inputs>
<input context="testLayer" widgetID="1" paramID="A661_STRING"
equ="$1">
<data name="latitude-deg" />
</input>
<input context="testLayer" widgetID="5" paramID="A661_STRING"
equ="$1">
<data name="longitude-deg" />
</input>
<input context="testLayer" widgetID="3" paramID="A661_ROTATION_ANGLE"
equ="$1">
<data name="heading-deg" />
</input>
<input context="testLayer" widgetID="10" paramID="A661_ROTATION_ANGLE"
equ="$1">
<data name="roll-deg" />
</input>
</inputs>
</dataProvider>

No comments: