ADTF Launcher

This guide covers the ADTF Launcher commandline tool. After reading this guide, you will know:


The ADTF Launcher starts the ADTF Runtime and therefore the main processing loop of the ADTF System. Typically the ADTF 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:

  1. RL_System
  2. RL_Session
  3. RL_StreamingGraph
  4. RL_FilterGraph
  5. RL_Running
Without any optional arguments the default runlevel after the launch ist RL_System, which means each ADTF Service specified at this runlevel is instantiated. To bring the ADTF System to a different runlevel, have a look at the available options described in the following sections.

The runtime provides several default ADTF Components in the RL_System runlevel the programmer can use:

Remote API

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.

Getting help

Running adtf_launcher.exe --help displays this list of command line parameters:

Load and start an ADTF Session

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.

Keep an ADTF Session running if an error occurs

The following command loads the ADTF Session as the command from above did, but keeps the ADTF Runtime from shutting down if an error occurs. This is accomplished by staying in the runlevel one level below the runlevel where the error occurred. If, in the example command, the ADTFDAT File Player from the Demo Playback session is missing the ADTFDAT file, the corresponding error would appear in runlevel RL_Running and the runtime would fallback to the runlevel RL_FilterGraph. If an error occurs already in runlevel RL_System, there is no lower runlevel to fallback to, and the system shuts down as it normally would.

Logging to File

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].

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.

UI Support

Basically the ADTF Launcher is just a headless process starting a headless ADTF System. With the Qt5 ADTF XSystem UI Service the functionality of the ADTF System will be extended with a window manager as base for further delivered or custom adtfplugins containing UI widgets for runtime interaction and visualization. Since ADTF version 3.10.0 the Qt5 ADTF XSystem UI Service itself provides options to control a running Session regarding its state/runlevel, since ADTF version 3.12.0 this has been extended as toolbar with additional access for playback and recording.

Where to go next?

Have a look at the Control guide to learn how to send commands to the ADTF Launcher.