CAPL Script

TestWaitForAnswer

Syntax

long TestWaitForAnswer(callContext cco, dword timeoutMs)

Function

Waits for the answer to a method call. The call must have been created throughconsumedMethodRef::CallAsyncon a consumed method. If the wait is successful, the call context properties for the return value and the out parameters can be read.

Parameters

cco Call context for a call.

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 (method was called)

long ret;callContext MirrorAdjustment.Adjust cco;cco = MirrorAdjustment[0,0].Adjust.CallAsync(50, 0);ret = TestWaitForAnswer(cco, 300);if (ret == 1){write("Call result: %d", cco.Result);}

TestWaitForValue | TestWaitForNextCall