launcher optional property for the ExternalComm module allows to specify the path to an external executable to launch and its launch arguments. The property specifies an XML file which defines:<properties> <application name="externalComm" > <module name="externalComm" > <moduleProperty key="network" value="network.xml" /> <moduleProperty key="endianness" value="littleEndian" /> <moduleProperty key="charAs8Bits" value="true" /> <moduleProperty key="launcher" value="launcher.xml" /> </module> </application> </properties>
launcher elementexecutable or shell child representing the executable to startexecutable or shell element has the following attributes:path (the only mandatory attribute): the path of the executable to startredirectIO: true if the IO of the process must be redirected to the Framework logger (will be false by default)wait: the time to wait before starting communcating with the process after starting it (no wait by default)processDir: the working directory for the process (by default the working directory of the framework JVM process will be used)useGlobalEnvVariables: true if the environment variables defined for the framework should be used. See also environment variables declarations for the specification of environment variables for the frameworkexecutable or shell element. The element can have several of the following children elements:argument for an argument valueenv for an environment variable valuepropertyArgument for an argument whose value is one property value for the ExternalComm moduleportArgument for an argument whose value is a port for the External Communication network propertyhostArgument for an argument whose value is a host for the External Communication network property<name>=<value>
argument element specifies the value for an argument and has two attributes:key specifies the argument namevalue specifies the argument value<launcher> <executable path="PublishAppli.exe"> <argument key="prop" value="20" /> </executable/> </launcher>will start the executable with:
PublishAppli.exe prop=20
env element specifies the value for an argument whose value is coming from an environment variable, and has two attributes:key specifies the environment variable namevalue specifies the environment variable value<launcher> <executable path="PublishAppli.exe"> <env key="PROP" value="20" /> </executable/> </launcher>will start the executable with something having the same result as:
set PROP=20 PublishAppli.exe
propertyArgument element specifies the value for an argument whose value is coming from one of the module properties, and has two attributes:key specifies the argument nameproperty specifies the property name<properties> <application name="externalComm" > <module name="externalComm" > <moduleProperty key="network" value="network.xml" /> <moduleProperty key="launcher" value="launcher.xml" /> <moduleProperty key="theProp" value="20" /> </module> </application> </properties>And the launcher declaration:
<launcher> <executable path="PublishAppli.exe"> <propertyArgument key="prop" property="theProp" /> </executable/> </launcher>will start the executable with:
PublishAppli.exe prop=20
portArgument specifies the value for an argument whose value is coming from the port of one of the network property channels:key specifies the argument namechannel specifies the channel name<network> <channel name="event" type="input" port="8080" > <service name="published" /> </channel> </network>And the launcher declaration:
<launcher> <executable path="PublishAppli.exe"> <portArgument key="prop" channel="event" /> </executable/> </launcher>will start the executable with:
PublishAppli.exe prop=8080
hostArgument specifies the value for an argument whose value is coming from the host of one of the network property channels:key specifies the argument namechannel specifies the channel name<network> <channel name="event" type="input" port="8080" host="127.0.0.1" > <service name="published" /> </channel> </network>And the launcher declaration:
<launcher> <executable path="PublishAppli.exe"> <hostArgument key="prop" channel="event" /> </executable/> </launcher>will start the executable with:
PublishAppli.exe prop=127.0.0.1
publishAppli of the first tutorial in CSharp. We will have the following architecture:
<properties> <application name="externalComm" > <module name="externalComm" > <moduleProperty key="network" value="network.xml" /> <moduleProperty key="endianness" value="littleEndian" /> <moduleProperty key="charAs8Bits" value="true" /> <moduleProperty key="launcher" value="launcher.xml" /> </module> </application> </properties>
<launcher> <executable path="PublishAppli.exe" redirectIO="true" wait="500ms"/> </launcher>
Copyright 2017-2020 Dassault Aviation. All Rights Reserved. Documentation and source under the LGPL v3 licence