A simulation program built with Tkenv accepts the following command line switches:
-h
: The program prints a help message and exits.
-u Tkenv
: Causes the program to start with Tkenv. (This is the default, unless the program
hasn't been linked with Tkenv, or has another, custom environment library with a higher priority
than Tkenv.)
-f fileName
: Specifies the name of the configuration file. The default is omnetpp.ini
. Multiple -f
switches can be given; this allows you to partition your configuration file. For example, one file can
contain your general settings, another one most of the module parameters, and a third one the module
parameters you change frequently. The -f
switch is optional and can be omitted.
-l fileName
: Loads a shared library (.so
file on Unix, .dll
on Windows,
and .dylib
on Mac OS X). Multiple -l
switches are accepted. Shared libraries
may contain simple modules and other, arbitrary code. File names may be specified without
the file extension and the lib
name prefix (i.e. foo
instead of libfoo.so
).
-n filePath
: When present, overrides the NEDPATH
environment variable and sets
the source locations for simulation NED files.
-c configname
: Selects an INI configuration for execution.
-r run-number
: It has the same effect as (but takes priority over) the tkenv-default-run=
INI file configuration option.
OMNETPP_TKENV_DIR
: In case of nonstandard installation, it may be necessary to
set this environment variable to point to <omnetpp>/src/tkenv
so that Tkenv can find its parts written in Tcl.OMNETPP_IMAGE_PATH
: It controls where Tkenv will load images for network
graphics (modules, background, etc.) from. The value should be a semicolon-separated
list of directories, but on non-Windows systems, the colon is also accepted as separator.
The default is <omnetpp>/images;./images
, that is, by default Tkenv looks
into the images
folder of your installation, and images
folder
in the working directory of the simulation. The directories will be scanned recursively,
and subdirectory names become part of the icon name; for example, if an images/
directory
is listed, the file images/misc/foo.png
will be registered as icon misc/foo
.
PNG an GIF files are accepted.OMNETPP_PLUGIN_PATH
: Certain aspects of Tkenv can be extended with plugins written in Tcl.
The path where such plugins are looked for is taken from this environment variable.
It is expected to contain a semicolon-separated list of directories, and defaults to ./plugins
.
(Again, colon is also accepted as separator on non-Windows systems.)Tkenv accepts the following configuration options in the INI file.
tkenv-extra-stack
: Specifies the extra amount of stack (in kilobytes) that is reserved for each
activity()
simple module when the simulation is run under Tkenv. This value is significantly
higher than the similar one for Cmdenv (handling GUI events requires a large amount of stack space).
tkenv-default-config
: Specifies which INI file configuration Tkenv should set up automatically after
startup. If there is no such option, Tkenv will ask which configuration to set up.
tkenv-default-run
: Specifies which run of the selected configuration Tkenv should set up
after startup. If there is no such option, Tkenv will ask.
tkenv-plugin-path
: Tkenv will append this value to the value of the OMNETPP_PLUGIN_PATH
or its built-in default value to get the list of directories to be scanned for plugins written in Tcl.
All other Tkenv settings can be changed via the GUI, and are saved into the .tkenvrc
file
in the user's home directory or in the current directory.