code snippet for asynchronous execution

Questions regarding the use of the Java SDK for Server or Client development or integration into customer products ...

Moderator: uasdkjava

Post Reply
h.k
Jr. Member
Jr. Member
Posts: 1
Joined: 17 Nov 2014, 12:44

code snippet for asynchronous execution

Post by h.k »

Hi,
currently we are evaluating your SDK for a global integration project. The handling of asynchronous tasks is crucial for us.

Could you please provide a code example of how to let a client create a node of program type on a server, let the program be executed on the server and then get notified asynchronously after the execution is finished?

In the OPC spec I read about commands and programs. As far as I understand, for longer lasting tasks, a program would be the correct way to handle things asynchronously. In the SDK I found your interfaces UaCallable as well as UaMethod. But how are they intended to be applied? Could you please give me some short examples in code to clarify this?

Thanks in advance,
Helge

User avatar
Support Team
Hero Member
Hero Member
Posts: 3064
Joined: 18 Mar 2011, 15:09

Re: code snippet for asynchronous execution

Post by Support Team »

Hello Helge,

unfortunately there are no examples available that exactly showcase your issue. However, you can define methods and events to your own types. And you can define your own program type objects as necessary with UaModeler and use the Code Generator to generate the respective Java classes with skeleton implementations.

This is also described in the tutorial and codegen/Readme.md

Best Regards
Support Team

Post Reply