<application name="Aircraft" id="1"> <deployment> <lib url="aircraft.jar" /> </deployment> ... </application>Then it means that the code of the Module is in the aircraft.jar library.
Version
manifest property.Version: 12.1If the
showLibVersion
property is set in the framework properties, this version String will be shown in the logger.
initEntryPoint
: defines the method which will be called at the end of the framework initializationpreConfigureEntryPoint
: defines the method which will be called when the framework is preconfiguredstartEntryPoint
: defines the method which will be called at the start of the frameworkfinishInvokeEntryPoint
: defines the method which will be called after a service has been invoked from this module, when all the notified modules have finished their operationsdefaultReceiveEntryPoint
: defines the default method which will be called by default when receiving the result from a ServicedefaultSendEntryPoint
: defines the default method which will be called by default when invoking automatically a Service[1]
cyclicMethod
: Additionally, it is possible to declare methods which will be called cyclically without invoking any Service (see Declaring cyclic methods)defaultTriggerEntryPoint
: defines the default method which will be called by default if the service is triggering an event serviceendEntryPoint
: defines the method which will be called at the shutdown of the framework<method_name>(Module module)
. The method will be called once after the framework has been initialized. It can be used to get the Services which are accessible to the Module.<module name="theModule"> <implementation path="org.da.MyModule" > <initEntryPoint method="init" /> </implementation> <interfaces> <eventSend service="sendService" /> </interfaces> </module>You can perform the following code:
public class MyModule() { private ServiceInstance sendService = null; public init(Module module) { this.sendService = module.getService("sendService"); } }
<method_name>()
. The method will be called once after the framework has been started.<module name="theModule"> <implementation path="org.da.MyModule" > <startEntryPoint method="start" /> </implementation> <interfaces> <eventSend service="sendService" /> </interfaces> </module>
<method_name>()
. The method will be called once after the framework has been shutdown.<module name="theModule"> <implementation path="org.da.MyModule" > <endEntryPoint method="init" /> </implementation> <interfaces> <eventSend service="sendService" /> </interfaces> </module>
<method_name>(Module module)
. The method will be called when the framework is preconfigured. Defining this method can be useful if you want to define module properties programmatically.<module name="theModule"> <implementation path="org.da.MyModule" > <preConfigureEntryPoint method="configure" /> </implementation> <interfaces> <eventReceived service="sendService" /> </interfaces> </module>
<method_name>(ServiceInstance service)
. The method will be called each time a Service result is received by the Module. It can be used to perform computations after the Module has been notified from the Service result.<module name="theModule"> <implementation path="org.da.MyModule" > <defaultReceiveEntryPoint method="subscribe" /> </implementation> <interfaces> <eventReceived service="sendService" /> </interfaces> </module>
<method_name>(ServiceInstance service)
. The method will be called after a service has been invoked from this module, when all the notified modules have finished their operations.<module name="theModule"> <implementation path="org.da.MyModule" > <finishInvokeEntryPoint method="finish" /> </implementation> <interfaces> <eventSend service="sendService" /> </interfaces> </module>
<method_name>(ServiceInstance service, ServiceInstance service)
. The method will be called after the notification if the service is triggering another one. The first argument is the triggering service (which must be a subscribed event service), the second is the triggered service (which must be a provided event service).<module name="theModule"> <implementation path="org.da.MyModule" > <defaultTriggerEntryPoint method="trigger" /> </implementation> <interfaces> <eventReceived service="triggeringService" /> <eventSend service="triggeredService" /> </interfaces> </module>
<method_name>(ServiceInstance service)
. The method will be called each time a Service invoked automatically is invoked (just before sending its result).<module name="theModule"> <implementation path="org.da.MyModule" > <defaultSendEntryPoint method="publish" /> </implementation> <interfaces> <eventSend service="sendService" /> </interfaces> </module>
<module name="FlightManagementSystem" id="1" > <implementation path="org.da.aircraft.fms.FMS" > <initEntryPoint method="init" /> <startEntryPoint method="start" /> <defaultReceiveEntryPoint method="receive" /> <defaultSendEntryPoint method="send" /> </implementation> </module>We will have the following signature for the methods:
public class FMS { public FMS() { } public init(Module module) { } public start() { } public receive(ServiceInstance service) { } public send(ServiceInstance service) { } }
implementation
to declare methods which will be called cyclically without invoking any Service. This is useful if you want to call one or several methods cyclically without invoking automatically any Service.
<module name="HUD" > <implementation path="org.da.aircraft.cockpit.HUD" > <initEntryPoint method="init" /> <startEntryPoint method="start" /> <defaultReceiveEntryPoint method="receive" /> <cyclicMethod method="myMethod" frequency="100ms" /> </implementation> </module>In this example,
myMethod()
method of the org.da.aircraft.cockpit.HUD
class will be called every 100 ms.
FlightManagementSystem
module:position
publish servicedirectTo
event servicecomputeFlightPlan
request-response service<module name="FlightManagementSystem" id="1" > <implementation path="org.da.aircraft.fms.FMS" > <initEntryPoint method="init" /> <startEntryPoint method="start" /> <defaultReceiveEntryPoint method="receive" /> <defaultSendEntryPoint method="send" /> </implementation> <interfaces> <subscribe service="position" /> <eventReceived service="directTo"/> <requestReceived service="computeFlightPlan"/> </interfaces> </module>
Copyright 2017-2020 Dassault Aviation. All Rights Reserved. Documentation and source under the LGPL v3 licence