CAPL Script

TriggerEx

This reference collection includes Vector documentation reproduced with permission. Snippets may require configuration-specific symbols and are not all standalone programs. Sources and validation limits.

Syntax

void triggerEx(char name[]);

Function

Sends a trigger event to aCANoeLogging or Trigger Block specified byname. For a Logging Block, the trigger event starts and stops logging, depending on set in theTrigger Configurationdialog of this block. For a Trigger Block, the trigger event starts and stops the data stream (like a filter) for the whole analysis branch or a single analysis window, depending also ontrigger modeandtrigger conditionsin theTrigger Configurationdialog. If you enter no name, the event will be sent to all Trigger and Logging Blocks that are located behind the CAPL node with the CAPL functiontriggerEx()in the Measurement Setup. If you want the CAPL node to have effect on all Trigger Blocks, the CAPL node has to be placed directly after the online/offline switch.

Parameters

name Name of the Logging or Trigger Block.

Return Values

—

Reference example from the CANoe 12 help. Check the required configuration, database objects and API availability in your installed version; this is not a recorded compiler or runtime test.

on key 't'
{
  write("Trigger requested for Logging block");
  triggerEx("Logging");
}

trigger | stop

This simplified example requires a block named Logging. The call emits a trigger; whether it starts or stops recording depends on that block's Trigger Configuration. Inspect the configured mode and resulting file before calling the operation successful. Repeated message arrivals must not be assumed to form a one-second recording window.