IOpcMethodCommand Members

Namespace: Opc.UaFx
Assemblies: Opc.UaFx.Advanced.dll, Opc.UaFx.Advanced.dll
The IOpcMethodCommand interface defines the following members.

CanExecute(OpcContext)

Determines the value of the Executable attribute of the method (CanExecute) and therefore decides whether the Execute(OpcMethodContext, IList, IList) method can be called in general to execute the method implementation.

C#

bool CanExecute(OpcContext context)


Parameters

context OpcContext

The OpcReadAttributeValueContext in case there the Executable attribute is read or the OpcMethodContext in case there the method call is to be processed.


Returns

Boolean

The value true if the method can be called; otherwise the value false.

CanUserExecute(OpcContext)

Determines the value of the UserExecutable attribute of the method (CanUserExecute) and therefore decides wether the Execute(OpcMethodContext, IList, IList) method can be called by the current user to execute the method implementation.

C#

bool CanUserExecute(OpcContext context)


Parameters

context OpcContext

The OpcReadAttributeValueContext in case there the UserExecutable attribute is read or the OpcMethodContext in case there the method call is to be processed.


Returns

Boolean

The value true if the method can be called; otherwise the value false.

Execute(OpcMethodContext, IList<Object>, IList<Object>)

Performs the tasks necessary to implement the logic associated with a specific method using the context and inputArguments specified.

C#

void Execute(OpcMethodContext context, IList<object> inputArguments, IList<object> outputArguments)


Parameters

context OpcMethodContext

The OpcMethodContext which provides the contextual information required to execute the method.

inputArguments IList<Object>

The generic list of Object values to use / respect during the execution of the method.

outputArguments IList<Object>

The generic list of Object values to use for out, ref (in Visual Basic ByRef) and returned values.


Remarks

Any OPC UA related result information is to be set using the Result property of the context.

This method is (to be) only called after the call to CanExecute(OpcContext) and CanUserExecute(OpcContext) evaluates to the value true.