6.14 Monitors

Monitors in ASAM OpenSCENARIO are similar to variables (see Section 6.12, "Variables"). Monitors are Boolean variables that are used to monitor the desired execution of a scenario. Executing the same scenario on multiple simulators or testbenches could lead to different outcomes, due to differences in physics and behavior models, latencies, or misinterpretation of the scenario.

Monitors are initialized in the MonitorDeclaration. Monitors that are initialized as true can be set to false using any condition in combination with the SetMonitorAction to indicate an issue in the execution of the scenario. The opposite approach, initializing as false and setting to true can be applied to assess if specific required states are reached during the execution. This allows scenario modelers to specify the execution behavior that the scenario must meet to fulfil its original intent. Combining monitors with a StoryboardElementStateCondition is the recommended way to determine if actions are started or completed as intended.

Dedicated monitors allow tool creators to indicate the monitoring results via dedicated user interfaces. This is not possible with Boolean variables alone. Similar to variables, monitors should also be accessible from external tools via an interface.