Avatar

Please consider registering
guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed Topic RSS sp_TopicIcon
Help Code gen Method - ComponentOf references
October 18, 2023
18:45, EEST
Avatar
Francesco Zambon
Member
Members
Forum Posts: 81
Member Since:
December 20, 2021
sp_UserOfflineSmall Offline

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

October 19, 2023
8:32, EEST
Avatar
Matti Siponen
Moderator
Members

Moderators
Forum Posts: 321
Member Since:
February 11, 2020
sp_UserOfflineSmall Offline

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.

October 20, 2023
15:55, EEST
Avatar
Francesco Zambon
Member
Members
Forum Posts: 81
Member Since:
December 20, 2021
sp_UserOfflineSmall Offline

Hi Matti,

thanks for the explanation.

Best regards,
Francesco

Forum Timezone: Europe/Helsinki

Most Users Ever Online: 518

Currently Online:
15 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

hbrackel: 135

pramanj: 86

Francesco Zambon: 81

rocket science: 77

Ibrahim: 76

Sabari: 62

kapsl: 57

gjevremovic: 49

Xavier: 43

fred: 41

Member Stats:

Guest Posters: 0

Members: 684

Moderators: 16

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1467

Posts: 6261

Newest Members:

digitechroshni, LouieWreve, Kickbiche, karrimacvitie5, graciela2073, sagarchau, elviralangwell4, Donnavek, Eddiefauth, DonaldPooma

Moderators: Jouni Aro: 1010, Otso Palonen: 32, Tuomas Hiltunen: 5, Pyry: 1, Petri: 0, Bjarne Boström: 983, Heikki Tahvanainen: 402, Jukka Asikainen: 1, moldzh08: 0, Jimmy Ni: 26, Teppo Uimonen: 21, Markus Johansson: 42, Niklas Nurminen: 0, Matti Siponen: 321, Lusetti: 0, Ari-Pekka Soikkeli: 5

Administrators: admin: 1