Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to create an OPC UA View? #5556

Open
2 of 7 tasks
tboeckel opened this issue Jan 11, 2023 · 3 comments
Open
2 of 7 tasks

How to create an OPC UA View? #5556

tboeckel opened this issue Jan 11, 2023 · 3 comments

Comments

@tboeckel
Copy link

Hi!

Description

There are lots of examples how to create variables within the Objects folder of an OPC-UA server. But there is no example of how to populate the Views folder? In principe it should just contain references to variables in the Objects folder. Correct?

Background Information / Reproduction Steps

We have several OPC-UA servers, each with its specific structure in the Objects folder. As usual in software development, things are changing day by day, stuff is added or deleted or moved around for more consistency. Although it is easy for us to change this structure, our customers often cannot replicate these changes themselves, because their software is developed by other facilities and each changes requires lots of time (and involves paying money aswell). They just want to access the same NodeIds to keep their software unchanged, no matter how much had to be changed on our side.

So our idea is to use OPC-UA views to work around this issue. This way we could modify our variable tree in the Objects folder as we require it. The entries in the View folder on the other hand will be kept the same all the time and only the references to the Objects folder are changed. That way a customer will always access a "constant" View, while the Objects folder can be rearranged and modified without any visible changes in the View.

Some examples programs on how to setup a View would be highly appreciated.

Checklist

Please provide the following information:

  • open62541 Version (release number or git tag): 1.3.4
  • Other OPC UA SDKs used (client or server):
  • Operating system: Linux, Windows, any
  • Logs (with UA_LOGLEVEL set as low as necessary) attached
  • Wireshark network dump attached
  • Self-contained code example attached
  • Critical issue
@jpfr
Copy link
Member

jpfr commented Jan 17, 2023

We currently don't support views.
It would be cool to have. But frankly we haven't seen a lot of users asking for it.

I added this to the wishlist in #5075.

@daniel-schmidt
Copy link

We use Views with open62541 to organize our whole data model into sub-parts for results with and without errors. There is UA_Server_addViewNode which seems to work fine. You can definitively add nodes with this function to the top-level Views folder and they show up correctly in clients like UaExpert.

Unfortunately, you cannot raise Events from View nodes, i.e. in our case to get notified when there was a non-successful result. When you try it, you hit this TODO:

/* Make sure the origin is in the ObjectsFolder (TODO: or in the ViewsFolder) */

So official support for Views with Events would be appreciated on my side!

@GoetzGoerisch
Copy link
Contributor

From my experience Views are basically deprecated, as they do not satisfy the use case they where thought out for.

One can reference Nodes always in other hierarchies.
NodeIds are not to be considered static anyway. Only the Entry point and the browsepath shall stay the same.

Therefore Companion Specifications are available to define Types to support this.

@jpfr jpfr changed the title How to create an OPC-UA View? How to create an OPC UA View? Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants