This guide covers the launcher commandline tool. After reading this guide, you will know:
The launcher starts the ADTF Runtime and therefore the main processing loop of the ADTF System. Typically
the launcher is given an ADTF Session file (*.adtfsession
) at startup time. The ADTF Session
file contains references to the data flow configuration, consisting of different types of ADTF Components like Streaming Sources, Filers and Streaming Sinks
get bootstraped by the ADTF Runtime. The ADTF Runtime supports several runlevels
where ADTF Components can be started:
The runtime provides several default ADTF Components in the RL_System runlevel the programmer can use:
The functionality of the ADTF Launcher is made available through a remote API. By default the ADTF Launcher opens up a RPC Port through which this API can be accessed. The default URL to reach the ADTF System is http://localhost:8000. The ADTF Control is able to control one instance of the ADTF Launcher. If you prefer an alternate UI solution or want to control more instances at once, please refer to the ADTF GUI Control.
adtf_launcher.exe --help
displays this list of command line parameters:
ADTF Launcher
adtf_launcher
Usage:
adtf_launcher -h
adtf_launcher -v
adtf_launcher ((-s <adtfsessionfile>) | (--system <adtfsystemfile>)) [--environment
<adtfenvironmentfile>] [--adtf-core-plugin <adtfcorepluginfile>]
[--system-properties <adtfpropertiesfile>] [--graph <adtfgraphfile>]
[--graph-properties <adtfpropertiesfile>] [--active-streaming-graph
<graphname>] [--active-filter-graph <graphname>] [--control-url <url>] [-i]
[-r] [-q] [--quit-timeout <seconds>] [--profiler] [--profiler-port <port>]
[--profiler-dump-file <filename>] [--log-file <filename>]
[--log-processing-interval <microseconds>] [--log-level-stdout <level>]
[--log-level-stderr <level>] [--console] [-- [<argument>]...]
Options:
-h, --help Print the usage info and quit.
-v, --version
Print the version information and quit.
-s, --session <adtfsessionfile>
Specify the ADTF Session.
--system <adtfsystemfile>
Specify the ADTF System.
--environment <adtfenvironmentfile>
Specify an ADTF environment file that should be loaded. This can be used to
resolve macros/dependencies in the session. Default is
$(ADTF_DIR)/adtf.adtfenvironment.
--adtf-core-plugin <adtfcorepluginfile>
Specify a dedicated adtf-core-plugin to load. (default is adtf_core.adtfplugin).
--system-properties <adtfpropertiesfile>
Specify the ADTF system properties file.
--graph <adtfgraphfile>
Specify the ADTF graph file. (requires --system).
--graph-properties <adtfpropertiesfile>
Specify the ADTF graph properties file.
--active-streaming-graph <graphname>
Specify the active streaminggraph.
--active-filter-graph <graphname>
Specify the active filtergraph.
--control-url <url>
URL to connect to this system (defaults to 'http://localhost:8000').
-i, --init Initialize current session (change to RL_FilterGraph if filtergraph exists,
otherwise RL_StreamingGraph). This means the application is ready.
-r, --run Start current session (change to RL_Running). This means the application is
running. Note: This is the only valid runlevel where samples can be transmitted!
-q, --quit Shutdown application after reaching the end of file, the end of a script or
after stopping the configuration.
--quit-timeout <seconds>
Shutdown the application after the specified amount of time.
--profiler Enables the profiler.
--profiler-port <port>
Sets the port for the remote connection to the profiler. 0 = no remote
profiling, default = 28077.
--profiler-dump-file <filename>
Enables profiling right from the start. When ADTF shuts down, profiling data
will be dumped to the given file.
--log-file <filename>
Writes all stdout output to the given logfile. The stderr output will be written
to "<LOGFILE>_stderr.txt". To get both outputs in one file use: "adtf_launcher >
logfile.txt 2>&1"
--log-processing-interval <microseconds>
If not equal zero, log messages will be processed asynchronously at the given
interval.
--log-level-stdout <level>
The log level limit for writing log entries to stdout (none, error, warning,
info, dump, all). default=all.
--log-level-stderr <level>
The log level limit for writing log entries to stderr (none, error, warning,
info, dump, all). default=none.
--console Windows only: Redirects stdout and stderr to a (new if needed) console window.
This does not affect whether log messages are written to stdout or not. If you
pipe the output, do not use this flag. Suppresses a dump file creation dialog.
-- <argument>
Ignore all following arguments.
The following command starts the runtime, loads an ADTF Graph from the given ADTF Session file and brings the runtime into state RL_Running. The last parameter makes the log messages appear inside the console.
adtf_launcher.exe --session "../src/examples/projects/adtf_example_project/adtfsessions/demo_playback.adtfsession" --run --console
By default, ADTF Launcher starts as a background process.
This implies that no console output can be displayed to the user.
When stdout or stderr streams are needed for some reason, you have to
specify the output target as a redirection on command line.
If you want to redirect all standard outputs to logfile.txt use:
adtf_launcher ... > logfile.txt
When standard error stream is also needed in the same file use:
adtf_launcher ... > logfile.txt 2>&1
To limit the number of (debug) output data you can specify the minimal
log level for stdout, stderr and debug(Visual Studio only) by parameter.
Valid values for log levels are [none, error, warning, info, dump, all].
--log-level-stdout=info
--log-level-stderr=error
--log-level-debug=none
In time-sensitive use cases it might be helpful to write log files asynchronously
e.g. every 1000 miliseconds, which you could achieve by supplying
the --log-processing-interval 1000
parameter.
Use the –-console
parameters to write all output to the current console.
When no console is open a new one is generated.
–-console
parameter is only available on Windows systems. It does not work in combination with redirection.
Have a look at the Control guide to learn how to send commands to the launcher.