Download Software User Manual

Transcript
NLR-EFO-SUM-2
SUM
iss: 6 rev: 3
Chapter 21
Mission Definition Language
reference
The Mission Definition Language MDL is a simple yet versatile language for real-time simulation scripting. It allows users to write simulator control scripts in a “C-type”, or—alternatively—in a limited
“free-text” language. The language has all the facilities one can expect of a programming language,
including if-statements, for-loops, global and local variables. Besides that, the user has full access to the
variables in the EuroSim data dictionary. Direct simulation control commands can also be used in the
language.
This appendix first starts with a primer in MDL, followed by a number of sections providing detailed
information on the various language elements. A description of the built-in functions and a concise
formal definition of the MDL language can be found in the last two sections of this appendix.
Note that the majority of MDL scripts in EuroSim will/can be made via the GUIs, for which the user
doesn’t need to know much about the MDL language. So this appendix is primarily intended for EuroSim
users who want to do ‘advanced’ things, not supported via the predefined GUIs. Throughout this section,
it is assumed that the reader has programming experience.
21.1
MDL primer
An MDL script (or “scenario”) is normally created with EuroSim’s Simulation Controller and interpreted
during simulation by EuroSim’s Action Manager (ACTION_MGR). An MDL script contains (amongst other
things) a collection of actions. An MDL action consists of four parts:
1. Action name.
2. Action attributes (optional).
3. Action body.
4. Action condition (optional).
Each action in the MDL script is represented by an icon on the Simulation Controller’s tree or icon view.
The four parts of each action can be edited via the Simulation Controller (Section 12.10.3).
A simple example which prints a message 10 seconds into the simulation:
#
# action name and attributes
action "Primer" ["description",bitmap="script_stub",show+active+Executing
, 50 50, 1]
#
# action body
{
print "Hello at t=10"
c Airbus Defence and Space
251