Skip to main content

consumedMethodRef::CallAsync (obsolete)

Valid for: CANoe DE

Method Syntax

  • callcontext <MethodType> consumedMethodRef::CallAsync(params ...); // form 1
  • void consumedMethodRef::CallAsync(params ..., Callback); // form 2

Description

Calls the method from the specified consumer at the specified provider. The function call is made asynchronously, i.e., the call does not wait for the function to be called and the return to be received. In test procedures, you can wait for the answer with TestWaitForAnswer; in simulation programs, you can use the handler on fct_Returned. In form 2, the callback function is called when the return is received.

Parameters

  • The in and inout parameters of the method. The function expects the values in impl encoding.
  • Form 2 takes as last parameter a callback function which in turn must have a single parameter of type callContext <MethodType> and return type void. You can also use a delegate for the callback.

Return Values

  • Form 1: A call context object for the call. You can e.g. use it to wait for the return or to retrieve a unique request ID which you can match in a on fct_Returned handler.

Example

Programming with the Communication Concept (C#, Python and CAPL) • consumedMethodRef::CallAsyncPhys • TestWaitForAnswer