I have been trying to create a custom reference, HasPart. As I have understood custom references are not supported yet. While the method is not ideal I have added a reference to the SDK by pretending it is a standard OPC UA reference defined by the specification.
The steps I have done:
1) Add an identifier to opcua_identififers.h
2) Add another case to the addUaReference function in nodemanageruanode, which creates the reference.
3) Added a class and functions in uabasereferences for my custom reference which inherits from UaReference.
4) Add and identifier to opcua_browsenames.h.
5) Add the reference type to nodemanagerroot createpart5_referencetypes.
6) Add a case to checkreferencetypematch in uabasenodes.
7) Add a case to issubtypeof in uareferencetypesns0.
By doing this I can connect AirConditioner1 to Humidity in lesson02 and Humidity shows up in the address space with a HasPart reference.
1) Might there be an easier way to do this?
Thank you.
Custom Reference Type
Moderator: uasdkcpp
-
- Jr. Member
- Posts: 2
- Joined: 17 Aug 2011, 14:25
Custom Reference Type
Last edited by kristianmo on 07 Feb 2013, 10:48, edited 1 time in total.
- Support Team
- Hero Member
- Posts: 3064
- Joined: 18 Mar 2011, 15:09
Re:Custom Reference Type
Hello,
There are two problems with your solution
The release is planned after the European IOP (Interoperability Workshop). The IOP is in two weeks.
Can you wait for this release?
Best Regards,
Unified Automation Support Team
There are two problems with your solution
- It is complicated
- The reference type is in the wrong namespace. You are not allowed to add types to the OPC Foundation namespace
The release is planned after the European IOP (Interoperability Workshop). The IOP is in two weeks.
Can you wait for this release?
Best Regards,
Unified Automation Support Team
Best regards
Unified Automation Support Team
Unified Automation Support Team