-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Nodeset resolver Tool (for generating custom tailored namespace-zero nodesets) #4647
base: master
Are you sure you want to change the base?
Conversation
This pull request introduces 2 alerts when merging 91f28c9 into ee9d90d - view on LGTM.com new alerts:
|
This pull request introduces 1 alert when merging 391ee1e into ee9d90d - view on LGTM.com new alerts:
|
Nice functionality! But to my knowledge a compliant UA 1.04 server must provide all nodes defined by Part 3 -> NS0 Reference ConformanceUnit Address Space Base This requirement is going away with UA 1.05. (See https://youtu.be/P-FQOhvBOBU?t=688) |
Thanks for your reply! The |
Wow. This looks amazing!
Looking forward to this! |
This pull request introduces 1 alert when merging cb4e45c into ee9d90d - view on LGTM.com new alerts:
|
I am glad you find this tool useful! Thanks for your input.
In the beginning I had support for multiple reference files (to be loaded into the
I changed the output format of node ids (when not using
I needed to think about that for a while.. You are totally right. So the reason the
NodeIds from EDIT: Had some more time, to think about it and I think I am mistaken in that there is an "official" namespace index in the specification. The namespace index of a node id used in XML files is only valid inside the XML file and references a (unique) namespace uri, as defined by the Thus, I assume with Now that I think about it, the task of resolving dependencies is not easy, when the reference |
|
This pull request introduces 1 alert when merging b74ccc8 into ee9d90d - view on LGTM.com new alerts:
|
…t node comparison (for namespaces other than namespace-zero)
…hout any arguments
This pull request introduces 1 alert when merging a411a10 into ee9d90d - view on LGTM.com new alerts:
|
…t may contain more namespace references than the original nodeset
This pull request introduces 1 alert when merging 70229fc into 13212bd - view on LGTM.com new alerts:
|
This pull request introduces 1 alert when merging 7858b49 into 13212bd - view on LGTM.com new alerts:
|
From the certified server: Lines 152 to 154 in 1135945
Therefore for UA 1.04 compliance a server product need to have a full NS0 for "Micro Embedded Server Profile" and above. As mentioned earlier, this is a great feature for the upcoming UA 1.05 release, which is currently in review. As Julius said, looking forward to this feature. |
Thanks for the infos! I guess you are right, although the "problem" with non-conformity is not necessarily introduced by the PS: For someone with a heavy embedded background, it is kind of... interesting, that for something called a "micro embedded device profile", a full namespace-zero is required, comprising several megabytes of RAM. This is more RAM, than almost all non-application microcontrollers actually have on-chip.. by a multiple. :-) |
Hello, |
Sorry for the late reply, thanks for the kind words. We recently used the tool again for the designed purpose after an update and noticed a few problems where (apparently new) Aliases were not pulled into the final XML resulting in compile errors. I implemented the changes required for this problem. Sorry about the force push :-X Looks like it destroyed the pull request history... EDIT: Restored |
This pull request introduces 1 alert when merging 7d020fe into 370b5f7 - view on LGTM.com new alerts:
|
This pull request introduces 1 alert when merging 1177732 into c1f605a - view on LGTM.com new alerts:
|
Hey there, we had another look at this. This is really cool. If we add a "whitelist" argument to the nodeset compiler, then we could use your If we move that internally to the nodeset compiler, that would forgeo the XML import-export intermediate step. |
Hey Julius (former Fraunhofer Gesellschaft Colleague ;-)), However, your (and other peoples) comments give me the impression that this is not the way open62541 was designed to operate. It looks like you are using the Our use-case was, that we wanted to use the PADIM device information model, how would I find out, what nodes to whitelist to include anything to do with this particular information model? I think it would require a way of extracting all (?) nodes from the corresponding Also another question I have is, do you suggest to implement I have to admit, I am not that deeply invested into the OPC UA/open62541 development and I am not familiar with certain ways to do or ways, that things were designed to be done (Which is why I never thought about integrating this into the nodeset_compiler). Please excuse my ignorance in some of the points above. Feel free to use the code! If you need me to do something (sourcecode or organizational stuff) let me know. |
Hi @skuep2 , the node set compiler can also be used standalone, not only within cmake. If you just write out the xml to read it back into the node set compiler, then we can reduce the complexity and omit the intermediate xml representation. The whitelisiting could be done for a list of nodes. Or, since every companion spec has its own namespace (uri), on the level of namespaces. thanks for giving the go-ahead for working with your code. I think this will become a new feature rather soon. |
I think it would be perfectly reasonable to bind the tool to the open62541 ecosystem. The reason I chose XML as the exchange format was, that there was/is no other way to use a customized nodeset-zero than giving But yeah, during cmake/build this XML will be read again by the nodeset compiler, you are totally right. Best Regards |
We are using the open62541 stack in an embedded environment, where RAM is scarce. When implementing a PA-DIM nodeset, I noticed that there are a lot of dependencies, that can thus far only be satisfied by including the full namespace-zero.
However, because this is a heavy burden on the on-chip memory I was looking for a way to produce a custom tailored namespace-zero that included only the hard dependencies.
I could not find a way to programatically produce such a custom XML file, which is why I created the
nodeset_resolver
tool. It heavily reuses the nodeset libraries used by the exquisitenodeset_compiler
, which is why I put it into the same folder. Although this is a bit messy, this may be something a folder rename might fix in the future.It works by loading the given XML files into a nodeset representation and then searches the tree for missing nodeIds. Then, the tool can look up those nodeIds from a reference XML, that is loaded into a separate nodeset representation. All (child-) dependencies are gathered and output. Lastly, it can automagically create an XML nodeset file for the required nodes from the reference XML or even splice it into the existing XML.
What do you think of this idea? It was a bit fiddly to get it working to really get all dependencies from the supplied nodeset files (especially if you don't know a lot about OPC UA yet) but the examples I have written into the README file work very well for our embedded setup. Comments are welcome!
EDIT: Should I include an affiliation in the README (similar to the one for the
nodeset_compiler
) in case you are interested in this PR?EDIT2: Also a license should be included in the Python script, right?