Timeline Filter Expressions

Timeline filter expressions are boolean expressions, using timeline attributes and various operators, to test whether a given timeline should be included in an operation. They are used in many places in the CLI and in workspace definition files.

# Features

A single timeline filter expression is a string containing a boolean expression. This expression is applied to timelines, so the attributes it references are the attributes on those timelines. It has the following features:

  • All attribute names must be prefixed with _..
  • You may use the following operators: -, +, *, /, =, !=, AND, OR.
  • Right hand values to = and != use glob matching. * matches any number of characters, ? matches any single character.
  • You may use exists(_.attribute) to require that a given attribute be present on the timeline.

# Examples

  • "_.name = 'debug'"
    This expression selects all timelines with the name debug.

  • "_.unit = 'drone2' AND _.mission = 'test-suite-*'"
    This expression selects all timelines whose unit attribute is drone2 and whose mission attribute begins with test-suite-. Glob matching here allows for selecting all test suites.

  • "exists(_.sensor-id)"
    This expression selects all timelines with an attribute named sensor-id, regardless of its value.

  • "_.name = 'error-stream' AND _.debug-level > 2"
    This expression selects all timelines named error-stream with a debug-level attribute whose value is larger than 2.