15:38, EEST
October 9, 2020
16:35, EEST
April 3, 2012
Hi,
An example of the output code would help/clarify, but yes it comes from the models (unless I misunderstood something here)
See the codegen manual section 4.5.4 “Excluding sub-nodes under a Type node from generation”. The quote below is that section (though note that since it is XML, it is best to read it from the manual since this forum is not exactly best suited to display it):
“
4.5.4. Excluding sub-nodes under a Type node from generation
Some models might result in generated code that conflicts the base API the SDK provides with UaNodes or name clashes because of one or more models, and thus might not compile. Currently the only workaround (outside of editing the model itself) is to exclude those nodes when generating get/set/getXXXNode methods for the type. An excluded sub-node behaves in the context of the generation as-if it were never present in the Type under which it is.
In the both versions they can be excluded:
<instanceDeclarations>
<instanceDeclaration>namespace_uri:name_part_of_BrowseName</instanceDeclaration>
</instanceDeclarations>
</excludes>
For example, in order to exclude the PowerInput subnode (that is used in ValveObjectType in the SampleTypes model), you would use the following configuration:
<instanceDeclarations>
<instanceDeclaration>http://ua.prosysopc.com/Sample…..on>
</instanceDeclarations>
</excludes>
NOTE: Excluding a component does not remove it from the AddressSpace of the server, it just means that the generated accessor for it wont be available. The equivalent operation can be done “manually” by getting the component node (UaNode.getComponent) and reading/writing values to that directly. Excluded Methods do not create the handling logic, and must be done via a listener (see MyMethodManagerListener in the samples).
NOTE: Currently the exclude excludes it from all types, as the main use case is to avoid name clashes with the SDK core API.
“
I would also doublecheck for any modeling errors just in case. It should also be noted that generated code doesn’t care about namespaces (so this can happen if you used the same component name from a different namespace). However this could also happen if you made 2 subnodes that have the completely same BrowseName (including the namespaceindex in the QualifiedName value), that is however not allowed in OPC UA (in types part of the address space, and instance can have more than one sub-node with the same exact BrowseName): https://reference.opcfoundation.org/v104/Core/docs/Part3/6.2.5/.
Most Users Ever Online: 1919
Currently Online:
31 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Heikki Tahvanainen: 402
hbrackel: 144
rocket science: 88
pramanj: 86
Francesco Zambon: 83
Ibrahim: 78
Sabari: 62
kapsl: 57
gjevremovic: 49
Xavier: 43
Member Stats:
Guest Posters: 0
Members: 727
Moderators: 7
Admins: 1
Forum Stats:
Groups: 3
Forums: 15
Topics: 1529
Posts: 6471
Newest Members:
kourtneyquisenbe, ellis87832073466, zkxwilliemae, gabriellabachus, Deakin, KTP25Zof, Wojciech Kubala, efrennowell431, wilfredostuart, caitlynfajardoModerators: Jouni Aro: 1026, Pyry: 1, Petri: 0, Bjarne Boström: 1032, Jimmy Ni: 26, Matti Siponen: 349, Lusetti: 0
Administrators: admin: 1