Server does not automatically create child objects

Questions regarding the use of the .NET SDK 2.0 for Server or Client development or integration into customer products ...

Moderator: uasdknet

Post Reply
martenbyebye
Hero Member
Hero Member
Posts: 21
Joined: 03 Mar 2017, 16:08

Server does not automatically create child objects

Post by martenbyebye »

Hi,

when I create an object of type MyObjectType, and MyObjectType has itself a child object, then this child object is not automatically created. It works just fine with child variables, but not with child objects. Am I doing something wrong? In the UA Modeler it works as expected, but not when I start the OPC UA server.

martenbyebye
Hero Member
Hero Member
Posts: 21
Joined: 03 Mar 2017, 16:08

Re: Server does not automatically create child objects

Post by martenbyebye »

It was a namespace problem in the CreateObjectSettings.

Wrong code:

Code: Select all

ModellingRuleId = new NodeId(UnifiedAutomation.UaBase.Objects.ModellingRule_Mandatory, this.nodeManager.TypeNamespaceIndex)
Correct code:

Code: Select all

ModellingRuleId = UnifiedAutomation.UaBase.ObjectIds.ModellingRule_Mandatory,

Post Reply