Using UaSrv_MethodOperate in a different task

Hello,

is it possible to use UaSrv_MethodOperate in a different task than the task in which the OPC UA method was originally created?

For task‑local usage the MethodName would simply be "Methodname", but how can I operate on a method that belongs to another task?

I already tried "::Taskname:Methodname", but that resulted in error 2952790033 (UA_Bad_MethodNameInvalid).

Does anyone have experience with this scenario?

Best regards,
Jonas Wrachtrup

To be fair, I have to state that I’m only guessing based on the help description.

After some investigation, it turns out the error UA_Bad_MethodNameInvalid (0xB0000011) is simply caused by invalid characters in the MethodName input — colons are not permitted. Only a-z, A-Z, 0-9, and _ are allowed, so any path-style syntax like ::Taskname:Methodname will always fail.

So if only MethodName does not work, then I guess it is not possible. But could we use inter-task communication to delegate the work instead?

Thanks for your reply.

My intention was to create a service that handles all OPC UA methods.
The task should only call a function and receive an indication that the method was invoked.
This way, the task (running with a slow cycle time) would detect the call, execute the required work, and then hand the cyclic management of the method back to the service (running with a fast cycle time).

However, this is not possible if I cannot perform the cyclic part of the work in another task.