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: 83
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: 349
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: 83
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: 1919

Currently Online:
53 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: 726

Moderators: 7

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1529

Posts: 6471

Newest Members:

gabriellabachus, Deakin, KTP25Zof, Wojciech Kubala, efrennowell431, wilfredostuart, caitlynfajardo, jeromechubb7, franciscagrimwad, adult_gallery

Moderators: Jouni Aro: 1026, Pyry: 1, Petri: 0, Bjarne Boström: 1032, Jimmy Ni: 26, Matti Siponen: 349, Lusetti: 0

Administrators: admin: 1