CAPL Script

TestWaitForUpdateCountGreater

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

long TestWaitForUpdateCountGreater(COValue value, qword count, dword timeoutMs)

Function

Waits for the update counter of a communication object value to reach a certain value. Each CO value contains an update counter which is reset to 0 at measurement start and with explicit calls tovalueEntity::ResetValueState. You can read out the counter withvalueEntity::GetUpdateCount.

Parameters

COValue Value of a communication object.

count

Update count to be reached.

timeoutMS

Timeout in milliseconds.

Return Values

-2: Resume due to constraint violation

-1: General error, for example, functionality is not available

0: Resume due to timeout

1: resume due to event occurred (value was updated)

Reference example from the CANoe 12 help. This is an incomplete context fragment: omitted surrounding code is shown as comments. Do not paste it as a complete program.

long ret;
consumedEventRef * anEvent;
anEvent = lookupConsumedEvent(path);
// // ... surrounding context omitted

ret = testWaitForUpdateCountGreater(anEvent, anEvent.GetUpdateCount() + 3, 200);

TestWaitForUpdateFlag | TestWaitForUpdate | TestWaitForChange