AdsClient.InvokeRpcMethodAsync Method (IRpcCallableInstance, IRpcMethod, .Object., .AnyTypeSpecifier., AnyTypeSpecifier, CancellationToken)

invoke RPC method as an asynchronous operation.

Namespace:  TwinCAT.Ads
Assembly:  TwinCAT.Ads (in TwinCAT.Ads.dll) Version: 6.0.328+39e3229

Syntax

C#

public Task<ResultRpcMethod> InvokeRpcMethodAsync(
    IRpcCallableInstance symbol,
    IRpcMethod rpcMethod,
    Object[]? inParameters,
    AnyTypeSpecifier[]? outSpec,
    AnyTypeSpecifier? returnSpec,
    CancellationToken cancel
)

Parameters

symbol

Type: TwinCAT.TypeSystem.IRpcCallableInstance
The symbol.

rpcMethod

Type: TwinCAT.TypeSystem.IRpcMethod
The RPC method.

inParameters

Type: .System.Object.
The in parameters.

outSpec

Type: .TwinCAT.TypeSystem.AnyTypeSpecifier.
The out spec.

returnSpec

Type: TwinCAT.TypeSystem.AnyTypeSpecifier
The return spec.

cancel

Type: System.Threading.CancellationToken
The cancellation token.

Return Value

Type: Task.ResultRpcMethod.
Task<ResultRpcMethod>.

Implements

IAdsRpcInvoke.InvokeRpcMethodAsync(IRpcCallableInstance, IRpcMethod, .Object., .AnyTypeSpecifier., AnyTypeSpecifier, CancellationToken)

Exceptions

Exception

Condition

ObjectDisposedException

ClientNotConnectedException

ArgumentNullException

symbol

ArgumentNullException

rpcMethod

Reference

AdsClient Class

InvokeRpcMethodAsync Overload

TwinCAT.Ads Namespace