my server loads types and instances from a XML-Nodeset-File created by UaModeller. This Nodeset contains several Types (VariableType/ObjectTypes/EventTypes) which is are subtypes of ns=0-Types, e.g. a subtype of ConditionType.
The load failes with these errors, because some nodes from ns=0 are not available:
Code: Select all
13:35:26.576Z|1|4EA8* Error: NodeManagerUaNode::createNodeManagerAliasNode [ret=0x803c0000] - Read config for NodeId = NS0|Numeric|2915
13:35:26.576Z|1|4EA8* Error: NodeManagerUaNode::addUaReference [ret=OpcUa_BadNodeIdUnknown] - Source node not available NS0|Numeric|2915
13:35:26.576Z|1|4EA8* Error UaNodeSetXmlParserUaNode::startUp - cannot add reference from NodeId i=2915 to NodeId ns=2;i=1042
13:35:26.579Z|1|4EA8* Error: UaCoreServerApplication::start - can not start up module [ret=0x80340000]
e.g.
Code: Select all
/// Create AnalogItemType in ns=0
UaVariant defaultValue;
auto pAnalogItem = new OpcUa::AnalogItemType(
UaNodeId(60000, getNameSpaceIndex()),
"Dummy",
getNameSpaceIndex(),
UaVariant(),
Ua_AccessLevel_CurrentRead,
this);
pAnalogItem->releaseReference();
/// Create AlarmConditionType in ns=0
OpcUa::OffNormalAlarmType* pOffNormalAlarm = new OpcUa::OffNormalAlarmType(
UaNodeId(60001, getNameSpaceIndex()), // NodeId of the node
"Dummy", // Name of the node used for browse name and display name
getNameSpaceIndex(), // Namespace index of the browse name
this, // Node manager responsible for this node
UaNodeId(), // NodeId of the source node
"DummyName"
); // Name of the source node
pOffNormalAlarm->releaseReference();
Greetings
cva
SDK-Version 1.6.3 32bit (binary)
Windows 10, Visual Studio 2015