Skip to main content

TestWaitForUpdateCountGreater

Valid for: CANoe DE • CANoe:lite DE • CANoe4SW DE • CANoe4SW:lite DE

Function Syntax

long TestWaitForUpdateCountGreater(valueHandle * value, qword count, dword timeoutMs);

Description

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

Parameters

  • value: Value handle of a communication object or distributed object.
  • count: Update count to be reached.
  • timeoutMS: Maximum time that should be waited [ms]. Transmission of 0: no timeout controlling.

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)

Example

long ret;
consumedEventRef * anEvent;
anEvent = lookupConsumedEvent(path);
// ...
ret = testWaitForUpdateCountGreater(anEvent, anEvent.GetUpdateCount() + 3, 200);
Programming with the Communication Concept (C#, Python and CAPL)TestWaitForUpdateFlagTestWaitForUpdateTestWaitForChange