<elekdra.scripting>
Declaration of some scripts.
With this tag you can include user implemented scripts that can be referenced by Elekdra, for example by a<elekdra.signal>
.
See also this web site for general information about the Elekdra scripting concepts.
JavaScript is the only script language that is already included in a Java Runtime Environment from Oracle, so we use it here.
<elekdra.scripting> <engine>JavaScript</engine> <script> <name>hugo</name> <code> <![CDATA[ println("hello world"); ]]> </code> </script> </elekdra.scripting>
Tag Description <engine>
Type: String
Cardinality: onceName of script engine
This is the name of the script engine or one of its aliases that Java uses to identify the script language. The only script engine that is included in the Oracle JRE is identified with the name JavaScript. Other script engines should be possible if the script engine can be found in the 'classpath'.<script>
Type: ScriptImplementation[]
Cardinality: at least once [1..N]One or more scripts
One entry for one script. A single script serves a single type of signalsExample
Here we have two scripts. One is used for the entry signals, the other is used by all exit signals.<elekdra.scripting> <engine>JavaScript</engine> <script> <name>entrysignals</name> <code>...</code> </script> <script> <name>exitsignals</name> <code>...</code> </script> </elekdra.scripting>