PublishModule
module increments or decrements a value cyclicallyEventModule
module allows to click on a toggle to set if the first module should increment or decrement the value, and shows the value. There are two instances of this module<files> <file url="applications.xml" /> <file url="services.xml" /> <file url="types.xml" /> </files>We will add a user-defined property in the configuration:
<files> <file url="applications.xml" /> <file url="services.xml" /> <file url="types.xml" /> <confProperty key="twoGUI" value="false" /> </files>
applications.xml
XML file, by adding a condition to one of the EventModule
s:<application name="eventAppli"> <deployment> <lib url="samples1Event.jar" /> </deployment> <modules> <module name="EventModule1" id="1" > <implementation path="org.da.samples.protoframework.event.EventModule" > <initEntryPoint method="init" /> <defaultReceiveEntryPoint method="subscribe" /> </implementation> <interfaces> <eventSend service="event" attach="attach"/> <subscribe service="published" /> </interfaces> </module> </modules> <modules> <module name="EventModule2" condition="${twoGUI}" > <implementation path="org.da.samples.protoframework.event.EventModule" > <initEntryPoint method="init" /> <defaultReceiveEntryPoint method="subscribe" /> </implementation> <interfaces> <eventSend service="event" attach="attach"/> <subscribe service="published" /> </interfaces> </module> </modules> </application>The "EventModule2" module will exist only if the value of the "twoGUI" property is true.
java -jar protoframework.jar config=filelist.xml starterGUI
We will have the following window Popup at start:true
, the two instances of the event modules will be created. It will work exactly as the second tutorialCopyright 2017-2020 Dassault Aviation. All Rights Reserved. Documentation and source under the LGPL v3 licence