The ADTF Control

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

Some basics

ADTF Control can be used in two ways:

Establish a connection

You can imagine the control as a kind of generic remote control, like the one you are using for your TV but instead of controlling a TV you control an ADTF System by sending specific commands. Depending on where the ADTF Launcher was started, this may be a real remote communication over a network. Type adtf_control.exe --help into a console to get an idea how to invoke the ADTF Control:

To connect the control with an already running ADTF System use this command:

To start an ADTF System implicitly and connect to it, supply the --launch "path\to\session\file" parameter with an ADTF Session file to load. To get the started ADTF System into runlevel Running add the --run parameter. To see log messages in the console use the --console parameter.

As you can see, this call is very similar to the launcher call that starts an ADTF System from the previous chapter.

Available commands

As soon as you are connected, type help to see an overview of all commands you can send to the ADTF System. ADTF Control also provides auto-completion for available commands and arguments.

For more details about a certain command type help <command>, for example:

Configuring different Launchers

The ADTF Control has support to configure different launcher commands that can be used either with the launch command or the --launcher command line argument. Let's say you want to do some profiling, you can enable it by using a different ADTF Launcher: adtf_control.exe --launcher adtf_profiling_enabled. All available launchers are defined in the configuration file adtf_control.adtfsettings.

The ADTF Control returns the following exit codes:

Scripting Mode

The ADTF Control supports very basic scripting. You can create a file (e.g. commands.txt) where each line contains a command:

After that try to run adtf_control.exe -e exec commands.txt. For advanced scripting please use the scripting language of your choice and execute commands via the -e switch. For more information on how to do this, please have a look at our Playback Scripting Example.

Event Handling

Due to the asynchronous nature of the RPC communication, event handling can only be performed via polling. To do so, use the "createeventbuffer" and "createeventbufferraw" commands, that will create a buffer within the ADTF System where the specified events will be stored until you retrieve them via the "events" command. Since each event source uses its own event data structure, the structures have to be described via DDL. The "createeventbuffer" command provides a few predefined definitions for convinience, please take a look at the commands documentation within adtf_control. You can use the "waitevent" command to continuously poll for a specific event.

Report Command

There is one command which collects a set of useful commands, called createreport. It is very helpful to gather a bunch of information about a running ADTF System, for example systemstatus, listcomponents or automatic combinations like listprops for each item from sessionobjects.

This could be a good overview for yourself as well as as additional and required information for the support team in case of troubles during runtime.

Where to go next?

You need more convenience? Here you go: ADTF GUI Control - The user interface for the control.