Search tips

apple banana
Find rows that contain at least one of the two words.

+apple +juice
Find rows that contain both words.

+apple macintosh
Find rows that contain the word 'apple', but rank rows higher if they also contain 'macintosh'.

+apple -macintosh
Find rows that contain the word 'apple' but not 'macintosh'.

+apple ~macintosh
Find rows that contain the word 'apple', but if the row also contains the word 'macintosh', rate it lower than if row does not. This is "softer" than a search for '+apple -macintosh', for which the presence of 'macintosh' causes the row not to be returned at all.

+apple +(>turnover >strudel)
Find rows that contain the words 'apple' and 'turnover', or 'apple' and 'strudel' (in any order), but rank 'apple turnover' higher than 'apple strudel'.

Find rows that contain words such as 'apple', 'apples', 'applesauce', or 'applet'.

"some words"
Find rows that contain the exact phrase 'some words' (for example, rows that contain 'some words of wisdom' but not "some noise words").

By continuing to use this site you agree to the use of cookies. For more information and to find out how to change this click here. Accept Cookies
Please enable cookies in your browser for this website.
Advanced search

How to Query the Current State of a Replay Block via COM API

Last updated: 2019-12-19

How can I trigger a COM event with the Replay Block in CANoe/CANalyzer?


In general you can control the Replay Block by using the COM object ReplayBlock. However it does not contain any events that can signal the COM client, that the replay was started or stopped.

Such an event can be useful for the COM client so that it knows when to load and start a new replay, stop the measurement, etc.


CAPL programs have the ability to query the current state of a Replay Block. This is achieved by using the CAPL function replayState. Information about the replay state is conveyed via its return value.

Using this function together with a timer, it is possible to periodically query the state of the Replay Block and keep track of it.

Since the return value is a simple unsigned integer, you can just write it to a system variable of the same type.

The following CAPL code example queries the replay state every second and writes the value to the system variable ComVariables::sysState:

  const long lPeriod = 1000; //1 second period
  dword state;
  msTimer tTimer;

on start
  setTimerCyclic(tTimer, lPeriod);

on timer tTimer
  //write currenty reply state to the system variable
  state = replayState("ReplayBlock 1");  
  sysSetVariableDWord(sysvar::ComVariables::sysState, state);

Whenever the state of the Replay Block changes, a different value will be written to the system variable causing it to trigger an OnChange event. This event can trigger in both the CAPL program and in the COM client.

You can use the COM object Variable to access the value of the system variable from your COM client…

… and use its OnChange event to trigger a callback function in the COM client.

The state of the Replay Block can now be processed in your COM application.

Article Options
Views: 417
Rate this article: