Function | get parameters from a Joystick |
Distribution | UAAppli-bin- |
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 |
<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.
<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()); } } });
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 informationuaConfig
, or uaImpl
and uaPath
, or script
: the path for the UAs hosted by the UA Applicationa661Config
property (and optionally the a661ServerConfig
property ), 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.
uaImpl
and uaPath
: used when there is only one Java UA hosted by the UA Application. See Using the uaImpl and uaPath propertiesscript
: used when there is only one Groovy scripted UA hosted by the UA Application. See Using the script propertyuaConfig
: used when there are more than one UA hosted by the UA Application. See Using the uaConfig propertya661ServerConfig
: the file specifying the separate ARINC 661 configuration for the ServerincludeServer
: (default is true) true if the Server must also be started with the UA ApplicationdefaultSubscribeService
: the name of the default subscribed servicedefaultProvideService
: the name of the default provided serviceconnectionDelay
: the delay to all the FunctionalUA.connected() method for the UAdebug
: boolean which allows to print additional messages if there is an error when using the Functional UA runtime APIconnected()
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.<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> <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>
api
instance which is the ARINC 661 client API allowing to communicate with the ARINC661 serverruntimeAPIHelper
instance provided in the FunctionalUA which simplify the usage of the API (see Functional UA runtime API for more information)UAAppliHelper.jar
library contains a ProjectionHelper class allowing to:UAAppliHelper.jar
library contains a WindowHelper class allowing to get the native Windows on the machine on which the framework is running.
Copyright 2017-2020 Dassault Aviation. All Rights Reserved. Documentation and source under the LGPL v3 licence