18:45, EEST
December 20, 2021
Hello,
I generated the Euromap 82.1 java class (thermal regulator) with Prosys Code Generator.
In my OPC UA tree I have 7 TCDs. Each TCD_\Operation node has the SwitchOn method which has the same NodeId “ns=5;i=7051” and this method node has 8 references of type ComponentOf. The first refere to the type OperationType, while the other references point to: TCD_1\Operation, TCD_2\Operation, TCD_3\Operation, TCD_4\Operation, etc.
In my opinion it should contain only one ComponentOf of the parent Operation node of a specific TCD.
Is it right to have more than one?
Best regards,
Francesco
8:32, EEST
Moderators
February 11, 2020
Hello,
It is normal for a Method Node to have multiple ComponentOf References, this just means that the Method is shared between multiple Nodes. When calling a Method in OPC UA, the caller will specify the NodeId of the Method and the NodeId of the Object or the ObjectType that References the Method with a HasComponent Reference. Therefore, there is no need for each instance of an ObjectType, such as OperationType, to have its unique instance of a Method since the combination of the NodeIds provided allows identifying which Method was called for which Object or ObjectType.
However, if you do want to create unique Methods for each instance of OperationType, you can set the NodeBuilderConfiguration of your NodeManagerUaNode to do that. This can be done by calling
nodeManagerUaNode.setNodeBuilderConfiguration(TypeDefinitionBasedNodeBuilderConfiguration.builder(new DefaultInstantiationStrategy(MethodInstantiationLogic.UNIQUE)).build());
where nodeManagerUaNode is your NodeManagerUaNode. You need to call this method before creating the OperationType instances. If you are already setting a NodeBuilderConfiguration to the NodeManagerUaNode, you will need to modify that part to use the DefaultInstantiationStrategy with UNIQUE MethodInstantiationLogic.
Most Users Ever Online: 1919
Currently Online:
34 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: 734
Moderators: 7
Admins: 1
Forum Stats:
Groups: 3
Forums: 15
Topics: 1523
Posts: 6449
Newest Members:
christamcdowall, redaahern07571, nigelbdhmp, travistimmons, AnnelCib, dalenegettinger, howardkennerley, Thomassnism, biancacraft16, edgardo3518Moderators: Jouni Aro: 1026, Pyry: 1, Petri: 0, Bjarne Boström: 1026, Jimmy Ni: 26, Matti Siponen: 346, Lusetti: 0
Administrators: admin: 1