How to signal a client that node creation is in progress

Unified Architecture topics related to OPC UA Specification, compliant behavior and any technical issues of OPC UA, like Security, Information Model, Companion Specs DI, PLCopen, ADI, ...

Moderator: Support Team

Post Reply
manuel.bliemel
Sr. Member
Sr. Member
Posts: 10
Joined: 23 Mar 2016, 13:17

How to signal a client that node creation is in progress

Post by manuel.bliemel »

I'm wondering if there is a standard way how to signal a client from the server that node creation during bootup is in progress.

When a client connects to a server it may expect certain nodes to exist.
If the server has been started but is still in progress adding nodes to the address space the client may receive status code
BadNodeIdUnknown when invoking services on the server.

I thought about rejecting client session connect calls until the server is ready.

Is there maybe a more standard and proper way to do this?

Thanks for your advice!

Sincerely,
Manuel

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

Re: How to signal a client that node creation is in progress

Post by Support Team »

Hi Manuel,

There is no simple answer to this question, there is at least no 'standard' way to solve this issue.

In general a client must be prepared for the case that 'expected' OPC UA nodes are temporarily not available. A client should retry later if a needed node is currently not available.

Nevertheless a server should try to complete the setup of the address space before it opens the endpoints for client connections. This avoids an overload of the server with clients that do retries of create monitored item attempts after server startup.

As long as the endpoint of the server is not open, clients are not able to connect. The way to delay this depends on the SDK.

In the C++ SDK, first the startUp() for all registered NodeManagers is called. Then startUp() of all registered modules is called. After these calls, the endpoint is opened. A simple solution would be to block on startUp() until the address space is available. If the creation of the address space is done asynchronous and in parallel for several NodeManagers and modules, you can register an additional module as last module that waits for the completion event from all other NodeManagers and modules and blocks it's startUp() call until it receives these completion events.
Best regards
Unified Automation Support Team

Post Reply