CommandLineInterface - lms-org/lms GitHub Wiki

Help

Get an overview over all command line interface options with

./lms --help

Load XML config

Load the specified xml file (without .xml suffix) as the main configuration file. Defaults to framework_conf

# Load the config file at {CONFIGS}/camera.xml
./lms -c camera

Flags

Flags allow conditional includes of XML fragments. The flags are checked in <if> tags.

Example:

./lms --flags norender,fun

Now the flags norender and fun are set. In XML you can check them like this:

<if set="fun">
  <include src="fun.xml" />
</if>

<if notSet="norender">
  <module>image_renderer</module>
</if>

Overwrite user

Module <config> tags have an optional attribute user that specify a list of users. Only if the current user is member of this list, the config is loaded. The current user can be overwritten with the --user command line option.

./lms --user root

Run level

The framework runs in different states during initialization and execution:

  • CONFIG - Load and parse config files.
  • ENABLE - Enable (initialize) configured modules.
  • CYCLE - Infinite module cycling.

The --run-level command line option specifies until which state the framework shall be run before it exits. Defaults to CYCLE.

Profiling

Profiling is a framework feature that measures the execution time of all modules and the whole cycle and outputs the results in a file.

./lms --profiling path/to/file.csv

Multithreading

Multithreading creates a thread pool of the given size. The framework will execute modules in parallel if possible.

# Start framework with main thread + 4 extra threads
./lms --threads 4

# Start framework with main thread + 'No. of cores' threads
# This will be 4 on a quad core PC. Uses std::thread::hardware_concurrency()
./lms --threads auto

Export dependency graph and cycle list

The Datamanager's dependency graph and the Executionmanager's cycle list can be exported as a graphviz dot file. Use the dot command line programm to convert these into PNG or SVG.

./lms --dag

# This is done automatically on linux:
# dot -Tpng output.dot > output.png
# xdg-open output.png

Install the graphviz package for your system:

sudo apt-get install graphviz
⚠️ **GitHub.com Fallback** ⚠️