|
@@ -6,10 +6,7 @@ UA_Int32 UA_Server_deleteMembers(UA_Server *server) {
|
|
UA_ApplicationDescription_delete(&server->description);
|
|
UA_ApplicationDescription_delete(&server->description);
|
|
UA_SecureChannelManager_delete(server->secureChannelManager);
|
|
UA_SecureChannelManager_delete(server->secureChannelManager);
|
|
UA_SessionManager_delete(server->sessionManager);
|
|
UA_SessionManager_delete(server->sessionManager);
|
|
- for(UA_UInt32 i = 0;i < server->namespacesSize;i++)
|
|
|
|
- UA_Namespace_delete(server->namespaces[i].namespace);
|
|
|
|
-
|
|
|
|
- UA_free(server->namespaces);
|
|
|
|
|
|
+ UA_NodeStore_delete(server->nodestore);
|
|
UA_free(server);
|
|
UA_free(server);
|
|
return UA_SUCCESS;
|
|
return UA_SUCCESS;
|
|
}
|
|
}
|
|
@@ -37,109 +34,98 @@ void UA_Server_init(UA_Server *server, UA_String *endpointUrl) {
|
|
UA_borrowed_.types[i].deleteMembers = (UA_Int32 (*)(void *))phantom_delete;
|
|
UA_borrowed_.types[i].deleteMembers = (UA_Int32 (*)(void *))phantom_delete;
|
|
}
|
|
}
|
|
|
|
|
|
- // create namespaces
|
|
|
|
- server->namespacesSize = 2;
|
|
|
|
- UA_alloc((void **)&server->namespaces, sizeof(UA_IndexedNamespace)*2);
|
|
|
|
-
|
|
|
|
- UA_Namespace_new(&server->namespaces[0].namespace);
|
|
|
|
- server->namespaces[0].namespaceIndex = 0;
|
|
|
|
- UA_Namespace *ns0 = server->namespaces[0].namespace;
|
|
|
|
- //C2UA_STRING("http://opcfoundation.org/UA/"));
|
|
|
|
-
|
|
|
|
- UA_Namespace_new(&server->namespaces[1].namespace);
|
|
|
|
- server->namespaces[1].namespaceIndex = 1;
|
|
|
|
- //UA_Namespace *ns1 = server->namespaces[1].namespace;
|
|
|
|
- //C2UA_STRING("http://localhost:16664/open62541/"));
|
|
|
|
|
|
+ UA_NodeStore_new(&server->nodestore);
|
|
|
|
+ //ns0: C2UA_STRING("http://opcfoundation.org/UA/"));
|
|
|
|
+ //ns1: C2UA_STRING("http://localhost:16664/open62541/"));
|
|
|
|
|
|
/**************/
|
|
/**************/
|
|
/* References */
|
|
/* References */
|
|
/**************/
|
|
/**************/
|
|
|
|
|
|
// ReferenceType Ids
|
|
// ReferenceType Ids
|
|
- UA_NodeId RefTypeId_References = NS0NODEID(31);
|
|
|
|
- UA_NodeId RefTypeId_NonHierarchicalReferences = NS0NODEID(32);
|
|
|
|
- UA_NodeId RefTypeId_HierarchicalReferences = NS0NODEID(33);
|
|
|
|
- UA_NodeId RefTypeId_HasChild = NS0NODEID(34);
|
|
|
|
- UA_NodeId RefTypeId_Organizes = NS0NODEID(35);
|
|
|
|
- UA_NodeId RefTypeId_HasEventSource = NS0NODEID(36);
|
|
|
|
- UA_NodeId RefTypeId_HasModellingRule = NS0NODEID(37);
|
|
|
|
- UA_NodeId RefTypeId_HasEncoding = NS0NODEID(38);
|
|
|
|
- UA_NodeId RefTypeId_HasDescription = NS0NODEID(39);
|
|
|
|
- UA_NodeId RefTypeId_HasTypeDefinition = NS0NODEID(40);
|
|
|
|
- UA_NodeId RefTypeId_GeneratesEvent = NS0NODEID(41);
|
|
|
|
- UA_NodeId RefTypeId_Aggregates = NS0NODEID(44);
|
|
|
|
- UA_NodeId RefTypeId_HasSubtype = NS0NODEID(45);
|
|
|
|
- UA_NodeId RefTypeId_HasProperty = NS0NODEID(46);
|
|
|
|
- UA_NodeId RefTypeId_HasComponent = NS0NODEID(47);
|
|
|
|
- UA_NodeId RefTypeId_HasNotifier = NS0NODEID(48);
|
|
|
|
- UA_NodeId RefTypeId_HasOrderedComponent = NS0NODEID(49);
|
|
|
|
- UA_NodeId RefTypeId_HasModelParent = NS0NODEID(50);
|
|
|
|
- UA_NodeId RefTypeId_FromState = NS0NODEID(51);
|
|
|
|
- UA_NodeId RefTypeId_ToState = NS0NODEID(52);
|
|
|
|
- UA_NodeId RefTypeId_HasCause = NS0NODEID(53);
|
|
|
|
- UA_NodeId RefTypeId_HasEffect = NS0NODEID(54);
|
|
|
|
- UA_NodeId RefTypeId_HasHistoricalConfiguration = NS0NODEID(56);
|
|
|
|
-
|
|
|
|
-#define ADDINVERSEREFERENCE(NODE, REFTYPE, TARGET_NODEID) \
|
|
|
|
- static struct UA_ReferenceNode NODE##ReferenceNode; \
|
|
|
|
- UA_ReferenceNode_init(&NODE##ReferenceNode); \
|
|
|
|
- NODE##ReferenceNode.referenceTypeId = REFTYPE; \
|
|
|
|
- NODE##ReferenceNode.isInverse = UA_TRUE; \
|
|
|
|
- NODE##ReferenceNode.targetId.nodeId = TARGET_NODEID; \
|
|
|
|
- NODE##ReferenceNode.targetId.namespaceUri = UA_STRING_NULL; \
|
|
|
|
- NODE##ReferenceNode.targetId.serverIndex = 0; \
|
|
|
|
- AddReference((UA_Node *)NODE, &NODE##ReferenceNode, ns0)
|
|
|
|
-
|
|
|
|
|
|
+ UA_ExpandedNodeId RefTypeId_References; NS0EXPANDEDNODEID(RefTypeId_References, 31);
|
|
|
|
+ UA_ExpandedNodeId RefTypeId_NonHierarchicalReferences; NS0EXPANDEDNODEID(RefTypeId_NonHierarchicalReferences, 32);
|
|
|
|
+ UA_ExpandedNodeId RefTypeId_HierarchicalReferences; NS0EXPANDEDNODEID(RefTypeId_HierarchicalReferences, 33);
|
|
|
|
+ UA_ExpandedNodeId RefTypeId_HasChild; NS0EXPANDEDNODEID(RefTypeId_HasChild, 34);
|
|
|
|
+ UA_ExpandedNodeId RefTypeId_Organizes; NS0EXPANDEDNODEID(RefTypeId_Organizes, 35);
|
|
|
|
+ UA_ExpandedNodeId RefTypeId_HasEventSource; NS0EXPANDEDNODEID(RefTypeId_HasEventSource, 36);
|
|
|
|
+ UA_ExpandedNodeId RefTypeId_HasModellingRule; NS0EXPANDEDNODEID(RefTypeId_HasModellingRule, 37);
|
|
|
|
+ UA_ExpandedNodeId RefTypeId_HasEncoding; NS0EXPANDEDNODEID(RefTypeId_HasEncoding, 38);
|
|
|
|
+ UA_ExpandedNodeId RefTypeId_HasDescription; NS0EXPANDEDNODEID(RefTypeId_HasDescription, 39);
|
|
|
|
+ UA_ExpandedNodeId RefTypeId_HasTypeDefinition; NS0EXPANDEDNODEID(RefTypeId_HasTypeDefinition, 40);
|
|
|
|
+ UA_ExpandedNodeId RefTypeId_GeneratesEvent; NS0EXPANDEDNODEID(RefTypeId_GeneratesEvent, 41);
|
|
|
|
+ UA_ExpandedNodeId RefTypeId_Aggregates; NS0EXPANDEDNODEID(RefTypeId_Aggregates, 44);
|
|
|
|
+ UA_ExpandedNodeId RefTypeId_HasSubtype; NS0EXPANDEDNODEID(RefTypeId_HasSubtype, 45);
|
|
|
|
+ UA_ExpandedNodeId RefTypeId_HasProperty; NS0EXPANDEDNODEID(RefTypeId_HasProperty, 46);
|
|
|
|
+ UA_ExpandedNodeId RefTypeId_HasComponent; NS0EXPANDEDNODEID(RefTypeId_HasComponent, 47);
|
|
|
|
+ UA_ExpandedNodeId RefTypeId_HasNotifier; NS0EXPANDEDNODEID(RefTypeId_HasNotifier, 48);
|
|
|
|
+ UA_ExpandedNodeId RefTypeId_HasOrderedComponent; NS0EXPANDEDNODEID(RefTypeId_HasOrderedComponent, 49);
|
|
|
|
+ UA_ExpandedNodeId RefTypeId_HasModelParent; NS0EXPANDEDNODEID(RefTypeId_HasModelParent, 50);
|
|
|
|
+ UA_ExpandedNodeId RefTypeId_FromState; NS0EXPANDEDNODEID(RefTypeId_FromState, 51);
|
|
|
|
+ UA_ExpandedNodeId RefTypeId_ToState; NS0EXPANDEDNODEID(RefTypeId_ToState, 52);
|
|
|
|
+ UA_ExpandedNodeId RefTypeId_HasCause; NS0EXPANDEDNODEID(RefTypeId_HasCause, 53);
|
|
|
|
+ UA_ExpandedNodeId RefTypeId_HasEffect; NS0EXPANDEDNODEID(RefTypeId_HasEffect, 54);
|
|
|
|
+ UA_ExpandedNodeId RefTypeId_HasHistoricalConfiguration; NS0EXPANDEDNODEID(RefTypeId_HasHistoricalConfiguration, 56);
|
|
|
|
+
|
|
|
|
+#define ADDREFERENCE(NODE, REFTYPE, INVERSE, TARGET_NODEID) do { \
|
|
|
|
+ static struct UA_ReferenceNode NODE##REFTYPE##TARGET_NODEID; \
|
|
|
|
+ UA_ReferenceNode_init(&NODE##REFTYPE##TARGET_NODEID); \
|
|
|
|
+ NODE##REFTYPE##TARGET_NODEID.referenceTypeId = REFTYPE.nodeId; \
|
|
|
|
+ NODE##REFTYPE##TARGET_NODEID.isInverse = INVERSE; \
|
|
|
|
+ NODE##REFTYPE##TARGET_NODEID.targetId = TARGET_NODEID; \
|
|
|
|
+ AddReference(server->nodestore, (UA_Node *)NODE, &NODE##REFTYPE##TARGET_NODEID); \
|
|
|
|
+ } while(0)
|
|
|
|
+
|
|
UA_ReferenceTypeNode *references;
|
|
UA_ReferenceTypeNode *references;
|
|
UA_ReferenceTypeNode_new(&references);
|
|
UA_ReferenceTypeNode_new(&references);
|
|
- references->nodeId = RefTypeId_References;
|
|
|
|
|
|
+ references->nodeId = RefTypeId_References.nodeId;
|
|
references->nodeClass = UA_NODECLASS_REFERENCETYPE;
|
|
references->nodeClass = UA_NODECLASS_REFERENCETYPE;
|
|
UA_QUALIFIEDNAME_STATIC(references->browseName, "References");
|
|
UA_QUALIFIEDNAME_STATIC(references->browseName, "References");
|
|
UA_LOCALIZEDTEXT_STATIC(references->displayName, "References");
|
|
UA_LOCALIZEDTEXT_STATIC(references->displayName, "References");
|
|
UA_LOCALIZEDTEXT_STATIC(references->description, "References");
|
|
UA_LOCALIZEDTEXT_STATIC(references->description, "References");
|
|
references->isAbstract = UA_TRUE;
|
|
references->isAbstract = UA_TRUE;
|
|
references->symmetric = UA_TRUE;
|
|
references->symmetric = UA_TRUE;
|
|
- UA_Namespace_insert(ns0, (UA_Node**)&references, UA_NAMESPACE_INSERT_UNIQUE);
|
|
|
|
|
|
+ UA_NodeStore_insert(server->nodestore, (UA_Node**)&references, UA_NODESTORE_INSERT_UNIQUE);
|
|
|
|
|
|
UA_ReferenceTypeNode *hierarchicalreferences;
|
|
UA_ReferenceTypeNode *hierarchicalreferences;
|
|
UA_ReferenceTypeNode_new(&hierarchicalreferences);
|
|
UA_ReferenceTypeNode_new(&hierarchicalreferences);
|
|
- hierarchicalreferences->nodeId = RefTypeId_HierarchicalReferences;
|
|
|
|
|
|
+ hierarchicalreferences->nodeId = RefTypeId_HierarchicalReferences.nodeId;
|
|
hierarchicalreferences->nodeClass = UA_NODECLASS_REFERENCETYPE;
|
|
hierarchicalreferences->nodeClass = UA_NODECLASS_REFERENCETYPE;
|
|
UA_QUALIFIEDNAME_STATIC(hierarchicalreferences->browseName, "HierarchicalReferences");
|
|
UA_QUALIFIEDNAME_STATIC(hierarchicalreferences->browseName, "HierarchicalReferences");
|
|
UA_LOCALIZEDTEXT_STATIC(hierarchicalreferences->displayName, "HierarchicalReferences");
|
|
UA_LOCALIZEDTEXT_STATIC(hierarchicalreferences->displayName, "HierarchicalReferences");
|
|
UA_LOCALIZEDTEXT_STATIC(hierarchicalreferences->description, "HierarchicalReferences");
|
|
UA_LOCALIZEDTEXT_STATIC(hierarchicalreferences->description, "HierarchicalReferences");
|
|
hierarchicalreferences->isAbstract = UA_TRUE;
|
|
hierarchicalreferences->isAbstract = UA_TRUE;
|
|
hierarchicalreferences->symmetric = UA_FALSE;
|
|
hierarchicalreferences->symmetric = UA_FALSE;
|
|
- ADDINVERSEREFERENCE(hierarchicalreferences, RefTypeId_HasSubtype, RefTypeId_References);
|
|
|
|
- UA_Namespace_insert(ns0, (UA_Node**)&hierarchicalreferences, UA_NAMESPACE_INSERT_UNIQUE);
|
|
|
|
|
|
+ ADDREFERENCE(hierarchicalreferences, RefTypeId_HasSubtype, UA_TRUE, RefTypeId_References);
|
|
|
|
+ UA_NodeStore_insert(server->nodestore, (UA_Node**)&hierarchicalreferences, UA_NODESTORE_INSERT_UNIQUE);
|
|
|
|
|
|
UA_ReferenceTypeNode *nonhierarchicalreferences;
|
|
UA_ReferenceTypeNode *nonhierarchicalreferences;
|
|
UA_ReferenceTypeNode_new(&nonhierarchicalreferences);
|
|
UA_ReferenceTypeNode_new(&nonhierarchicalreferences);
|
|
- nonhierarchicalreferences->nodeId = RefTypeId_NonHierarchicalReferences;
|
|
|
|
|
|
+ nonhierarchicalreferences->nodeId = RefTypeId_NonHierarchicalReferences.nodeId;
|
|
nonhierarchicalreferences->nodeClass = UA_NODECLASS_REFERENCETYPE;
|
|
nonhierarchicalreferences->nodeClass = UA_NODECLASS_REFERENCETYPE;
|
|
UA_QUALIFIEDNAME_STATIC(nonhierarchicalreferences->browseName, "NonHierarchicalReferences");
|
|
UA_QUALIFIEDNAME_STATIC(nonhierarchicalreferences->browseName, "NonHierarchicalReferences");
|
|
UA_LOCALIZEDTEXT_STATIC(nonhierarchicalreferences->displayName, "NonHierarchicalReferences");
|
|
UA_LOCALIZEDTEXT_STATIC(nonhierarchicalreferences->displayName, "NonHierarchicalReferences");
|
|
UA_LOCALIZEDTEXT_STATIC(nonhierarchicalreferences->description, "NonHierarchicalReferences");
|
|
UA_LOCALIZEDTEXT_STATIC(nonhierarchicalreferences->description, "NonHierarchicalReferences");
|
|
nonhierarchicalreferences->isAbstract = UA_TRUE;
|
|
nonhierarchicalreferences->isAbstract = UA_TRUE;
|
|
nonhierarchicalreferences->symmetric = UA_FALSE;
|
|
nonhierarchicalreferences->symmetric = UA_FALSE;
|
|
- ADDINVERSEREFERENCE(nonhierarchicalreferences, RefTypeId_HasSubtype, RefTypeId_References);
|
|
|
|
- UA_Namespace_insert(ns0, (UA_Node**)&nonhierarchicalreferences, UA_NAMESPACE_INSERT_UNIQUE);
|
|
|
|
|
|
+ ADDREFERENCE(nonhierarchicalreferences, RefTypeId_HasSubtype, UA_TRUE, RefTypeId_References);
|
|
|
|
+ UA_NodeStore_insert(server->nodestore, (UA_Node**)&nonhierarchicalreferences, UA_NODESTORE_INSERT_UNIQUE);
|
|
|
|
|
|
UA_ReferenceTypeNode *haschild;
|
|
UA_ReferenceTypeNode *haschild;
|
|
UA_ReferenceTypeNode_new(&haschild);
|
|
UA_ReferenceTypeNode_new(&haschild);
|
|
- haschild->nodeId = RefTypeId_HasChild;
|
|
|
|
|
|
+ haschild->nodeId = RefTypeId_HasChild.nodeId;
|
|
haschild->nodeClass = UA_NODECLASS_REFERENCETYPE;
|
|
haschild->nodeClass = UA_NODECLASS_REFERENCETYPE;
|
|
UA_QUALIFIEDNAME_STATIC(haschild->browseName, "HasChild");
|
|
UA_QUALIFIEDNAME_STATIC(haschild->browseName, "HasChild");
|
|
UA_LOCALIZEDTEXT_STATIC(haschild->displayName, "HasChild");
|
|
UA_LOCALIZEDTEXT_STATIC(haschild->displayName, "HasChild");
|
|
UA_LOCALIZEDTEXT_STATIC(haschild->description, "HasChild");
|
|
UA_LOCALIZEDTEXT_STATIC(haschild->description, "HasChild");
|
|
haschild->isAbstract = UA_TRUE;
|
|
haschild->isAbstract = UA_TRUE;
|
|
haschild->symmetric = UA_FALSE;
|
|
haschild->symmetric = UA_FALSE;
|
|
- ADDINVERSEREFERENCE(haschild, RefTypeId_HasSubtype, RefTypeId_HierarchicalReferences);
|
|
|
|
- UA_Namespace_insert(ns0, (UA_Node**)&haschild, UA_NAMESPACE_INSERT_UNIQUE);
|
|
|
|
|
|
+ ADDREFERENCE(haschild, RefTypeId_HasSubtype, UA_TRUE, RefTypeId_HierarchicalReferences);
|
|
|
|
+ UA_NodeStore_insert(server->nodestore, (UA_Node**)&haschild, UA_NODESTORE_INSERT_UNIQUE);
|
|
|
|
|
|
UA_ReferenceTypeNode *organizes;
|
|
UA_ReferenceTypeNode *organizes;
|
|
UA_ReferenceTypeNode_new(&organizes);
|
|
UA_ReferenceTypeNode_new(&organizes);
|
|
- organizes->nodeId = RefTypeId_Organizes;
|
|
|
|
|
|
+ organizes->nodeId = RefTypeId_Organizes.nodeId;
|
|
organizes->nodeClass = UA_NODECLASS_REFERENCETYPE;
|
|
organizes->nodeClass = UA_NODECLASS_REFERENCETYPE;
|
|
UA_QUALIFIEDNAME_STATIC(organizes->browseName, "Organizes");
|
|
UA_QUALIFIEDNAME_STATIC(organizes->browseName, "Organizes");
|
|
UA_LOCALIZEDTEXT_STATIC(organizes->displayName, "Organizes");
|
|
UA_LOCALIZEDTEXT_STATIC(organizes->displayName, "Organizes");
|
|
@@ -147,12 +133,12 @@ void UA_Server_init(UA_Server *server, UA_String *endpointUrl) {
|
|
organizes->isAbstract = UA_FALSE;
|
|
organizes->isAbstract = UA_FALSE;
|
|
organizes->symmetric = UA_FALSE;
|
|
organizes->symmetric = UA_FALSE;
|
|
UA_LOCALIZEDTEXT_STATIC(organizes->inverseName, "OrganizedBy");
|
|
UA_LOCALIZEDTEXT_STATIC(organizes->inverseName, "OrganizedBy");
|
|
- ADDINVERSEREFERENCE(organizes, RefTypeId_HasSubtype, RefTypeId_HierarchicalReferences);
|
|
|
|
- UA_Namespace_insert(ns0, (UA_Node**)&organizes, UA_NAMESPACE_INSERT_UNIQUE);
|
|
|
|
|
|
+ ADDREFERENCE(organizes, RefTypeId_HasSubtype, UA_TRUE, RefTypeId_HierarchicalReferences);
|
|
|
|
+ UA_NodeStore_insert(server->nodestore, (UA_Node**)&organizes, UA_NODESTORE_INSERT_UNIQUE);
|
|
|
|
|
|
UA_ReferenceTypeNode *haseventsource;
|
|
UA_ReferenceTypeNode *haseventsource;
|
|
UA_ReferenceTypeNode_new(&haseventsource);
|
|
UA_ReferenceTypeNode_new(&haseventsource);
|
|
- haseventsource->nodeId = RefTypeId_HasEventSource;
|
|
|
|
|
|
+ haseventsource->nodeId = RefTypeId_HasEventSource.nodeId;
|
|
haseventsource->nodeClass = UA_NODECLASS_REFERENCETYPE;
|
|
haseventsource->nodeClass = UA_NODECLASS_REFERENCETYPE;
|
|
UA_QUALIFIEDNAME_STATIC(haseventsource->browseName, "HasEventSource");
|
|
UA_QUALIFIEDNAME_STATIC(haseventsource->browseName, "HasEventSource");
|
|
UA_LOCALIZEDTEXT_STATIC(haseventsource->displayName, "HasEventSource");
|
|
UA_LOCALIZEDTEXT_STATIC(haseventsource->displayName, "HasEventSource");
|
|
@@ -160,12 +146,12 @@ void UA_Server_init(UA_Server *server, UA_String *endpointUrl) {
|
|
haseventsource->isAbstract = UA_FALSE;
|
|
haseventsource->isAbstract = UA_FALSE;
|
|
haseventsource->symmetric = UA_FALSE;
|
|
haseventsource->symmetric = UA_FALSE;
|
|
UA_LOCALIZEDTEXT_STATIC(haseventsource->inverseName, "EventSourceOf");
|
|
UA_LOCALIZEDTEXT_STATIC(haseventsource->inverseName, "EventSourceOf");
|
|
- ADDINVERSEREFERENCE(haseventsource, RefTypeId_HasSubtype, RefTypeId_HierarchicalReferences);
|
|
|
|
- UA_Namespace_insert(ns0, (UA_Node**)&haseventsource, UA_NAMESPACE_INSERT_UNIQUE);
|
|
|
|
|
|
+ ADDREFERENCE(haseventsource, RefTypeId_HasSubtype, UA_TRUE, RefTypeId_HierarchicalReferences);
|
|
|
|
+ UA_NodeStore_insert(server->nodestore, (UA_Node**)&haseventsource, UA_NODESTORE_INSERT_UNIQUE);
|
|
|
|
|
|
UA_ReferenceTypeNode *hasmodellingrule;
|
|
UA_ReferenceTypeNode *hasmodellingrule;
|
|
UA_ReferenceTypeNode_new(&hasmodellingrule);
|
|
UA_ReferenceTypeNode_new(&hasmodellingrule);
|
|
- hasmodellingrule->nodeId = RefTypeId_HasModellingRule;
|
|
|
|
|
|
+ hasmodellingrule->nodeId = RefTypeId_HasModellingRule.nodeId;
|
|
hasmodellingrule->nodeClass = UA_NODECLASS_REFERENCETYPE;
|
|
hasmodellingrule->nodeClass = UA_NODECLASS_REFERENCETYPE;
|
|
UA_QUALIFIEDNAME_STATIC(hasmodellingrule->browseName, "HasModellingRule");
|
|
UA_QUALIFIEDNAME_STATIC(hasmodellingrule->browseName, "HasModellingRule");
|
|
UA_LOCALIZEDTEXT_STATIC(hasmodellingrule->displayName, "HasModellingRule");
|
|
UA_LOCALIZEDTEXT_STATIC(hasmodellingrule->displayName, "HasModellingRule");
|
|
@@ -173,12 +159,12 @@ void UA_Server_init(UA_Server *server, UA_String *endpointUrl) {
|
|
hasmodellingrule->isAbstract = UA_FALSE;
|
|
hasmodellingrule->isAbstract = UA_FALSE;
|
|
hasmodellingrule->symmetric = UA_FALSE;
|
|
hasmodellingrule->symmetric = UA_FALSE;
|
|
UA_LOCALIZEDTEXT_STATIC(hasmodellingrule->inverseName, "ModellingRuleOf");
|
|
UA_LOCALIZEDTEXT_STATIC(hasmodellingrule->inverseName, "ModellingRuleOf");
|
|
- ADDINVERSEREFERENCE(hasmodellingrule, RefTypeId_HasSubtype, RefTypeId_NonHierarchicalReferences);
|
|
|
|
- UA_Namespace_insert(ns0, (UA_Node**)&hasmodellingrule, UA_NAMESPACE_INSERT_UNIQUE);
|
|
|
|
|
|
+ ADDREFERENCE(hasmodellingrule, RefTypeId_HasSubtype, UA_TRUE, RefTypeId_NonHierarchicalReferences);
|
|
|
|
+ UA_NodeStore_insert(server->nodestore, (UA_Node**)&hasmodellingrule, UA_NODESTORE_INSERT_UNIQUE);
|
|
|
|
|
|
UA_ReferenceTypeNode *hasencoding;
|
|
UA_ReferenceTypeNode *hasencoding;
|
|
UA_ReferenceTypeNode_new(&hasencoding);
|
|
UA_ReferenceTypeNode_new(&hasencoding);
|
|
- hasencoding->nodeId = RefTypeId_HasEncoding;
|
|
|
|
|
|
+ hasencoding->nodeId = RefTypeId_HasEncoding.nodeId;
|
|
hasencoding->nodeClass = UA_NODECLASS_REFERENCETYPE;
|
|
hasencoding->nodeClass = UA_NODECLASS_REFERENCETYPE;
|
|
UA_QUALIFIEDNAME_STATIC(hasencoding->browseName, "HasEncoding");
|
|
UA_QUALIFIEDNAME_STATIC(hasencoding->browseName, "HasEncoding");
|
|
UA_LOCALIZEDTEXT_STATIC(hasencoding->displayName, "HasEncoding");
|
|
UA_LOCALIZEDTEXT_STATIC(hasencoding->displayName, "HasEncoding");
|
|
@@ -186,12 +172,12 @@ void UA_Server_init(UA_Server *server, UA_String *endpointUrl) {
|
|
hasencoding->isAbstract = UA_FALSE;
|
|
hasencoding->isAbstract = UA_FALSE;
|
|
hasencoding->symmetric = UA_FALSE;
|
|
hasencoding->symmetric = UA_FALSE;
|
|
UA_LOCALIZEDTEXT_STATIC(hasencoding->inverseName, "EncodingOf");
|
|
UA_LOCALIZEDTEXT_STATIC(hasencoding->inverseName, "EncodingOf");
|
|
- ADDINVERSEREFERENCE(hasencoding, RefTypeId_HasSubtype, RefTypeId_NonHierarchicalReferences);
|
|
|
|
- UA_Namespace_insert(ns0, (UA_Node**)&hasencoding, UA_NAMESPACE_INSERT_UNIQUE);
|
|
|
|
|
|
+ ADDREFERENCE(hasencoding, RefTypeId_HasSubtype, UA_TRUE, RefTypeId_NonHierarchicalReferences);
|
|
|
|
+ UA_NodeStore_insert(server->nodestore, (UA_Node**)&hasencoding, UA_NODESTORE_INSERT_UNIQUE);
|
|
|
|
|
|
UA_ReferenceTypeNode *hasdescription;
|
|
UA_ReferenceTypeNode *hasdescription;
|
|
UA_ReferenceTypeNode_new(&hasdescription);
|
|
UA_ReferenceTypeNode_new(&hasdescription);
|
|
- hasdescription->nodeId = RefTypeId_HasDescription;
|
|
|
|
|
|
+ hasdescription->nodeId = RefTypeId_HasDescription.nodeId;
|
|
hasdescription->nodeClass = UA_NODECLASS_REFERENCETYPE;
|
|
hasdescription->nodeClass = UA_NODECLASS_REFERENCETYPE;
|
|
UA_QUALIFIEDNAME_STATIC(hasdescription->browseName, "HasDescription");
|
|
UA_QUALIFIEDNAME_STATIC(hasdescription->browseName, "HasDescription");
|
|
UA_LOCALIZEDTEXT_STATIC(hasdescription->displayName, "HasDescription");
|
|
UA_LOCALIZEDTEXT_STATIC(hasdescription->displayName, "HasDescription");
|
|
@@ -199,12 +185,12 @@ void UA_Server_init(UA_Server *server, UA_String *endpointUrl) {
|
|
hasdescription->isAbstract = UA_FALSE;
|
|
hasdescription->isAbstract = UA_FALSE;
|
|
hasdescription->symmetric = UA_FALSE;
|
|
hasdescription->symmetric = UA_FALSE;
|
|
UA_LOCALIZEDTEXT_STATIC(hasdescription->inverseName, "DescriptionOf");
|
|
UA_LOCALIZEDTEXT_STATIC(hasdescription->inverseName, "DescriptionOf");
|
|
- ADDINVERSEREFERENCE(hasdescription, RefTypeId_HasSubtype, RefTypeId_NonHierarchicalReferences);
|
|
|
|
- UA_Namespace_insert(ns0, (UA_Node**)&hasdescription, UA_NAMESPACE_INSERT_UNIQUE);
|
|
|
|
|
|
+ ADDREFERENCE(hasdescription, RefTypeId_HasSubtype, UA_TRUE, RefTypeId_NonHierarchicalReferences);
|
|
|
|
+ UA_NodeStore_insert(server->nodestore, (UA_Node**)&hasdescription, UA_NODESTORE_INSERT_UNIQUE);
|
|
|
|
|
|
UA_ReferenceTypeNode *hastypedefinition;
|
|
UA_ReferenceTypeNode *hastypedefinition;
|
|
UA_ReferenceTypeNode_new(&hastypedefinition);
|
|
UA_ReferenceTypeNode_new(&hastypedefinition);
|
|
- hastypedefinition->nodeId = RefTypeId_HasTypeDefinition;
|
|
|
|
|
|
+ hastypedefinition->nodeId = RefTypeId_HasTypeDefinition.nodeId;
|
|
hastypedefinition->nodeClass = UA_NODECLASS_REFERENCETYPE;
|
|
hastypedefinition->nodeClass = UA_NODECLASS_REFERENCETYPE;
|
|
UA_QUALIFIEDNAME_STATIC(hastypedefinition->browseName, "HasTypeDefinition");
|
|
UA_QUALIFIEDNAME_STATIC(hastypedefinition->browseName, "HasTypeDefinition");
|
|
UA_LOCALIZEDTEXT_STATIC(hastypedefinition->displayName, "HasTypeDefinition");
|
|
UA_LOCALIZEDTEXT_STATIC(hastypedefinition->displayName, "HasTypeDefinition");
|
|
@@ -212,12 +198,12 @@ void UA_Server_init(UA_Server *server, UA_String *endpointUrl) {
|
|
hastypedefinition->isAbstract = UA_FALSE;
|
|
hastypedefinition->isAbstract = UA_FALSE;
|
|
hastypedefinition->symmetric = UA_FALSE;
|
|
hastypedefinition->symmetric = UA_FALSE;
|
|
UA_LOCALIZEDTEXT_STATIC(hastypedefinition->inverseName, "TypeDefinitionOf");
|
|
UA_LOCALIZEDTEXT_STATIC(hastypedefinition->inverseName, "TypeDefinitionOf");
|
|
- ADDINVERSEREFERENCE(hastypedefinition, RefTypeId_HasSubtype, RefTypeId_NonHierarchicalReferences);
|
|
|
|
- UA_Namespace_insert(ns0, (UA_Node**)&hastypedefinition, UA_NAMESPACE_INSERT_UNIQUE);
|
|
|
|
|
|
+ ADDREFERENCE(hastypedefinition, RefTypeId_HasSubtype, UA_TRUE, RefTypeId_NonHierarchicalReferences);
|
|
|
|
+ UA_NodeStore_insert(server->nodestore, (UA_Node**)&hastypedefinition, UA_NODESTORE_INSERT_UNIQUE);
|
|
|
|
|
|
UA_ReferenceTypeNode *generatesevent;
|
|
UA_ReferenceTypeNode *generatesevent;
|
|
UA_ReferenceTypeNode_new(&generatesevent);
|
|
UA_ReferenceTypeNode_new(&generatesevent);
|
|
- generatesevent->nodeId = RefTypeId_GeneratesEvent;
|
|
|
|
|
|
+ generatesevent->nodeId = RefTypeId_GeneratesEvent.nodeId;
|
|
generatesevent->nodeClass = UA_NODECLASS_REFERENCETYPE;
|
|
generatesevent->nodeClass = UA_NODECLASS_REFERENCETYPE;
|
|
UA_QUALIFIEDNAME_STATIC(generatesevent->browseName, "GeneratesEvent");
|
|
UA_QUALIFIEDNAME_STATIC(generatesevent->browseName, "GeneratesEvent");
|
|
UA_LOCALIZEDTEXT_STATIC(generatesevent->displayName, "GeneratesEvent");
|
|
UA_LOCALIZEDTEXT_STATIC(generatesevent->displayName, "GeneratesEvent");
|
|
@@ -225,24 +211,24 @@ void UA_Server_init(UA_Server *server, UA_String *endpointUrl) {
|
|
generatesevent->isAbstract = UA_FALSE;
|
|
generatesevent->isAbstract = UA_FALSE;
|
|
generatesevent->symmetric = UA_FALSE;
|
|
generatesevent->symmetric = UA_FALSE;
|
|
UA_LOCALIZEDTEXT_STATIC(generatesevent->inverseName, "GeneratedBy");
|
|
UA_LOCALIZEDTEXT_STATIC(generatesevent->inverseName, "GeneratedBy");
|
|
- ADDINVERSEREFERENCE(generatesevent, RefTypeId_HasSubtype, RefTypeId_NonHierarchicalReferences);
|
|
|
|
- UA_Namespace_insert(ns0, (UA_Node**)&generatesevent, UA_NAMESPACE_INSERT_UNIQUE);
|
|
|
|
|
|
+ ADDREFERENCE(generatesevent, RefTypeId_HasSubtype, UA_TRUE, RefTypeId_NonHierarchicalReferences);
|
|
|
|
+ UA_NodeStore_insert(server->nodestore, (UA_Node**)&generatesevent, UA_NODESTORE_INSERT_UNIQUE);
|
|
|
|
|
|
UA_ReferenceTypeNode *aggregates;
|
|
UA_ReferenceTypeNode *aggregates;
|
|
UA_ReferenceTypeNode_new(&aggregates);
|
|
UA_ReferenceTypeNode_new(&aggregates);
|
|
- aggregates->nodeId = RefTypeId_Aggregates;
|
|
|
|
|
|
+ aggregates->nodeId = RefTypeId_Aggregates.nodeId;
|
|
aggregates->nodeClass = UA_NODECLASS_REFERENCETYPE;
|
|
aggregates->nodeClass = UA_NODECLASS_REFERENCETYPE;
|
|
UA_QUALIFIEDNAME_STATIC(aggregates->browseName, "Aggregates");
|
|
UA_QUALIFIEDNAME_STATIC(aggregates->browseName, "Aggregates");
|
|
UA_LOCALIZEDTEXT_STATIC(aggregates->displayName, "Aggregates");
|
|
UA_LOCALIZEDTEXT_STATIC(aggregates->displayName, "Aggregates");
|
|
UA_LOCALIZEDTEXT_STATIC(aggregates->description, "Aggregates");
|
|
UA_LOCALIZEDTEXT_STATIC(aggregates->description, "Aggregates");
|
|
aggregates->isAbstract = UA_TRUE;
|
|
aggregates->isAbstract = UA_TRUE;
|
|
aggregates->symmetric = UA_FALSE;
|
|
aggregates->symmetric = UA_FALSE;
|
|
- ADDINVERSEREFERENCE(aggregates, RefTypeId_HasSubtype, RefTypeId_HasChild);
|
|
|
|
- UA_Namespace_insert(ns0, (UA_Node**)&aggregates, UA_NAMESPACE_INSERT_UNIQUE);
|
|
|
|
|
|
+ ADDREFERENCE(aggregates, RefTypeId_HasSubtype, UA_TRUE, RefTypeId_HasChild);
|
|
|
|
+ UA_NodeStore_insert(server->nodestore, (UA_Node**)&aggregates, UA_NODESTORE_INSERT_UNIQUE);
|
|
|
|
|
|
UA_ReferenceTypeNode *hassubtype;
|
|
UA_ReferenceTypeNode *hassubtype;
|
|
UA_ReferenceTypeNode_new(&hassubtype);
|
|
UA_ReferenceTypeNode_new(&hassubtype);
|
|
- hassubtype->nodeId = RefTypeId_HasSubtype;
|
|
|
|
|
|
+ hassubtype->nodeId = RefTypeId_HasSubtype.nodeId;
|
|
hassubtype->nodeClass = UA_NODECLASS_REFERENCETYPE;
|
|
hassubtype->nodeClass = UA_NODECLASS_REFERENCETYPE;
|
|
UA_QUALIFIEDNAME_STATIC(hassubtype->browseName, "HasSubtype");
|
|
UA_QUALIFIEDNAME_STATIC(hassubtype->browseName, "HasSubtype");
|
|
UA_LOCALIZEDTEXT_STATIC(hassubtype->displayName, "HasSubtype");
|
|
UA_LOCALIZEDTEXT_STATIC(hassubtype->displayName, "HasSubtype");
|
|
@@ -250,12 +236,12 @@ void UA_Server_init(UA_Server *server, UA_String *endpointUrl) {
|
|
hassubtype->isAbstract = UA_FALSE;
|
|
hassubtype->isAbstract = UA_FALSE;
|
|
hassubtype->symmetric = UA_FALSE;
|
|
hassubtype->symmetric = UA_FALSE;
|
|
UA_LOCALIZEDTEXT_STATIC(hassubtype->inverseName, "SubtypeOf");
|
|
UA_LOCALIZEDTEXT_STATIC(hassubtype->inverseName, "SubtypeOf");
|
|
- ADDINVERSEREFERENCE(hassubtype, RefTypeId_HasSubtype, RefTypeId_HasChild);
|
|
|
|
- UA_Namespace_insert(ns0, (UA_Node**)&hassubtype, UA_NAMESPACE_INSERT_UNIQUE);
|
|
|
|
|
|
+ ADDREFERENCE(hassubtype, RefTypeId_HasSubtype, UA_TRUE, RefTypeId_HasChild);
|
|
|
|
+ UA_NodeStore_insert(server->nodestore, (UA_Node**)&hassubtype, UA_NODESTORE_INSERT_UNIQUE);
|
|
|
|
|
|
UA_ReferenceTypeNode *hasproperty;
|
|
UA_ReferenceTypeNode *hasproperty;
|
|
UA_ReferenceTypeNode_new(&hasproperty);
|
|
UA_ReferenceTypeNode_new(&hasproperty);
|
|
- hasproperty->nodeId = RefTypeId_HasProperty;
|
|
|
|
|
|
+ hasproperty->nodeId = RefTypeId_HasProperty.nodeId;
|
|
hasproperty->nodeClass = UA_NODECLASS_REFERENCETYPE;
|
|
hasproperty->nodeClass = UA_NODECLASS_REFERENCETYPE;
|
|
UA_QUALIFIEDNAME_STATIC(hasproperty->browseName, "HasProperty");
|
|
UA_QUALIFIEDNAME_STATIC(hasproperty->browseName, "HasProperty");
|
|
UA_LOCALIZEDTEXT_STATIC(hasproperty->displayName, "HasProperty");
|
|
UA_LOCALIZEDTEXT_STATIC(hasproperty->displayName, "HasProperty");
|
|
@@ -263,12 +249,12 @@ void UA_Server_init(UA_Server *server, UA_String *endpointUrl) {
|
|
hasproperty->isAbstract = UA_FALSE;
|
|
hasproperty->isAbstract = UA_FALSE;
|
|
hasproperty->symmetric = UA_FALSE;
|
|
hasproperty->symmetric = UA_FALSE;
|
|
UA_LOCALIZEDTEXT_STATIC(hasproperty->inverseName, "PropertyOf");
|
|
UA_LOCALIZEDTEXT_STATIC(hasproperty->inverseName, "PropertyOf");
|
|
- ADDINVERSEREFERENCE(hasproperty, RefTypeId_HasSubtype, RefTypeId_Aggregates);
|
|
|
|
- UA_Namespace_insert(ns0, (UA_Node**)&hasproperty, UA_NAMESPACE_INSERT_UNIQUE);
|
|
|
|
|
|
+ ADDREFERENCE(hasproperty, RefTypeId_HasSubtype, UA_TRUE, RefTypeId_Aggregates);
|
|
|
|
+ UA_NodeStore_insert(server->nodestore, (UA_Node**)&hasproperty, UA_NODESTORE_INSERT_UNIQUE);
|
|
|
|
|
|
UA_ReferenceTypeNode *hascomponent;
|
|
UA_ReferenceTypeNode *hascomponent;
|
|
UA_ReferenceTypeNode_new(&hascomponent);
|
|
UA_ReferenceTypeNode_new(&hascomponent);
|
|
- hascomponent->nodeId = RefTypeId_HasComponent;
|
|
|
|
|
|
+ hascomponent->nodeId = RefTypeId_HasComponent.nodeId;
|
|
hascomponent->nodeClass = UA_NODECLASS_REFERENCETYPE;
|
|
hascomponent->nodeClass = UA_NODECLASS_REFERENCETYPE;
|
|
UA_QUALIFIEDNAME_STATIC(hascomponent->browseName, "HasComponent");
|
|
UA_QUALIFIEDNAME_STATIC(hascomponent->browseName, "HasComponent");
|
|
UA_LOCALIZEDTEXT_STATIC(hascomponent->displayName, "HasComponent");
|
|
UA_LOCALIZEDTEXT_STATIC(hascomponent->displayName, "HasComponent");
|
|
@@ -276,12 +262,12 @@ void UA_Server_init(UA_Server *server, UA_String *endpointUrl) {
|
|
hascomponent->isAbstract = UA_FALSE;
|
|
hascomponent->isAbstract = UA_FALSE;
|
|
hascomponent->symmetric = UA_FALSE;
|
|
hascomponent->symmetric = UA_FALSE;
|
|
UA_LOCALIZEDTEXT_STATIC(hascomponent->inverseName, "ComponentOf");
|
|
UA_LOCALIZEDTEXT_STATIC(hascomponent->inverseName, "ComponentOf");
|
|
- ADDINVERSEREFERENCE(hascomponent, RefTypeId_HasSubtype, RefTypeId_Aggregates);
|
|
|
|
- UA_Namespace_insert(ns0, (UA_Node**)&hascomponent, UA_NAMESPACE_INSERT_UNIQUE);
|
|
|
|
|
|
+ ADDREFERENCE(hascomponent, RefTypeId_HasSubtype, UA_TRUE, RefTypeId_Aggregates);
|
|
|
|
+ UA_NodeStore_insert(server->nodestore, (UA_Node**)&hascomponent, UA_NODESTORE_INSERT_UNIQUE);
|
|
|
|
|
|
UA_ReferenceTypeNode *hasnotifier;
|
|
UA_ReferenceTypeNode *hasnotifier;
|
|
UA_ReferenceTypeNode_new(&hasnotifier);
|
|
UA_ReferenceTypeNode_new(&hasnotifier);
|
|
- hasnotifier->nodeId = RefTypeId_HasNotifier;
|
|
|
|
|
|
+ hasnotifier->nodeId = RefTypeId_HasNotifier.nodeId;
|
|
hasnotifier->nodeClass = UA_NODECLASS_REFERENCETYPE;
|
|
hasnotifier->nodeClass = UA_NODECLASS_REFERENCETYPE;
|
|
UA_QUALIFIEDNAME_STATIC(hasnotifier->browseName, "HasNotifier");
|
|
UA_QUALIFIEDNAME_STATIC(hasnotifier->browseName, "HasNotifier");
|
|
UA_LOCALIZEDTEXT_STATIC(hasnotifier->displayName, "HasNotifier");
|
|
UA_LOCALIZEDTEXT_STATIC(hasnotifier->displayName, "HasNotifier");
|
|
@@ -289,12 +275,12 @@ void UA_Server_init(UA_Server *server, UA_String *endpointUrl) {
|
|
hasnotifier->isAbstract = UA_FALSE;
|
|
hasnotifier->isAbstract = UA_FALSE;
|
|
hasnotifier->symmetric = UA_FALSE;
|
|
hasnotifier->symmetric = UA_FALSE;
|
|
UA_LOCALIZEDTEXT_STATIC(hasnotifier->inverseName, "NotifierOf");
|
|
UA_LOCALIZEDTEXT_STATIC(hasnotifier->inverseName, "NotifierOf");
|
|
- ADDINVERSEREFERENCE(hasnotifier, RefTypeId_HasSubtype, RefTypeId_HasEventSource);
|
|
|
|
- UA_Namespace_insert(ns0, (UA_Node**)&hasnotifier, UA_NAMESPACE_INSERT_UNIQUE);
|
|
|
|
|
|
+ ADDREFERENCE(hasnotifier, RefTypeId_HasSubtype, UA_TRUE, RefTypeId_HasEventSource);
|
|
|
|
+ UA_NodeStore_insert(server->nodestore, (UA_Node**)&hasnotifier, UA_NODESTORE_INSERT_UNIQUE);
|
|
|
|
|
|
UA_ReferenceTypeNode *hasorderedcomponent;
|
|
UA_ReferenceTypeNode *hasorderedcomponent;
|
|
UA_ReferenceTypeNode_new(&hasorderedcomponent);
|
|
UA_ReferenceTypeNode_new(&hasorderedcomponent);
|
|
- hasorderedcomponent->nodeId = RefTypeId_HasOrderedComponent;
|
|
|
|
|
|
+ hasorderedcomponent->nodeId = RefTypeId_HasOrderedComponent.nodeId;
|
|
hasorderedcomponent->nodeClass = UA_NODECLASS_REFERENCETYPE;
|
|
hasorderedcomponent->nodeClass = UA_NODECLASS_REFERENCETYPE;
|
|
UA_QUALIFIEDNAME_STATIC(hasorderedcomponent->browseName, "HasOrderedComponent");
|
|
UA_QUALIFIEDNAME_STATIC(hasorderedcomponent->browseName, "HasOrderedComponent");
|
|
UA_LOCALIZEDTEXT_STATIC(hasorderedcomponent->displayName, "HasOrderedComponent");
|
|
UA_LOCALIZEDTEXT_STATIC(hasorderedcomponent->displayName, "HasOrderedComponent");
|
|
@@ -302,12 +288,12 @@ void UA_Server_init(UA_Server *server, UA_String *endpointUrl) {
|
|
hasorderedcomponent->isAbstract = UA_FALSE;
|
|
hasorderedcomponent->isAbstract = UA_FALSE;
|
|
hasorderedcomponent->symmetric = UA_FALSE;
|
|
hasorderedcomponent->symmetric = UA_FALSE;
|
|
UA_LOCALIZEDTEXT_STATIC(hasorderedcomponent->inverseName, "OrderedComponentOf");
|
|
UA_LOCALIZEDTEXT_STATIC(hasorderedcomponent->inverseName, "OrderedComponentOf");
|
|
- ADDINVERSEREFERENCE(hasorderedcomponent, RefTypeId_HasSubtype, RefTypeId_HasComponent);
|
|
|
|
- UA_Namespace_insert(ns0, (UA_Node**)&hasorderedcomponent, UA_NAMESPACE_INSERT_UNIQUE);
|
|
|
|
|
|
+ ADDREFERENCE(hasorderedcomponent, RefTypeId_HasSubtype, UA_TRUE, RefTypeId_HasComponent);
|
|
|
|
+ UA_NodeStore_insert(server->nodestore, (UA_Node**)&hasorderedcomponent, UA_NODESTORE_INSERT_UNIQUE);
|
|
|
|
|
|
UA_ReferenceTypeNode *hasmodelparent;
|
|
UA_ReferenceTypeNode *hasmodelparent;
|
|
UA_ReferenceTypeNode_new(&hasmodelparent);
|
|
UA_ReferenceTypeNode_new(&hasmodelparent);
|
|
- hasmodelparent->nodeId = RefTypeId_HasModelParent;
|
|
|
|
|
|
+ hasmodelparent->nodeId = RefTypeId_HasModelParent.nodeId;
|
|
hasmodelparent->nodeClass = UA_NODECLASS_REFERENCETYPE;
|
|
hasmodelparent->nodeClass = UA_NODECLASS_REFERENCETYPE;
|
|
UA_QUALIFIEDNAME_STATIC(hasmodelparent->browseName, "HasModelParent");
|
|
UA_QUALIFIEDNAME_STATIC(hasmodelparent->browseName, "HasModelParent");
|
|
UA_LOCALIZEDTEXT_STATIC(hasmodelparent->displayName, "HasModelParent");
|
|
UA_LOCALIZEDTEXT_STATIC(hasmodelparent->displayName, "HasModelParent");
|
|
@@ -315,12 +301,12 @@ void UA_Server_init(UA_Server *server, UA_String *endpointUrl) {
|
|
hasmodelparent->isAbstract = UA_FALSE;
|
|
hasmodelparent->isAbstract = UA_FALSE;
|
|
hasmodelparent->symmetric = UA_FALSE;
|
|
hasmodelparent->symmetric = UA_FALSE;
|
|
UA_LOCALIZEDTEXT_STATIC(hasmodelparent->inverseName, "ModelParentOf");
|
|
UA_LOCALIZEDTEXT_STATIC(hasmodelparent->inverseName, "ModelParentOf");
|
|
- ADDINVERSEREFERENCE(hasmodelparent, RefTypeId_HasSubtype, RefTypeId_NonHierarchicalReferences);
|
|
|
|
- UA_Namespace_insert(ns0, (UA_Node**)&hasmodelparent, UA_NAMESPACE_INSERT_UNIQUE);
|
|
|
|
|
|
+ ADDREFERENCE(hasmodelparent, RefTypeId_HasSubtype, UA_TRUE, RefTypeId_NonHierarchicalReferences);
|
|
|
|
+ UA_NodeStore_insert(server->nodestore, (UA_Node**)&hasmodelparent, UA_NODESTORE_INSERT_UNIQUE);
|
|
|
|
|
|
UA_ReferenceTypeNode *fromstate;
|
|
UA_ReferenceTypeNode *fromstate;
|
|
UA_ReferenceTypeNode_new(&fromstate);
|
|
UA_ReferenceTypeNode_new(&fromstate);
|
|
- fromstate->nodeId = RefTypeId_FromState;
|
|
|
|
|
|
+ fromstate->nodeId = RefTypeId_FromState.nodeId;
|
|
fromstate->nodeClass = UA_NODECLASS_REFERENCETYPE;
|
|
fromstate->nodeClass = UA_NODECLASS_REFERENCETYPE;
|
|
UA_QUALIFIEDNAME_STATIC(fromstate->browseName, "FromState");
|
|
UA_QUALIFIEDNAME_STATIC(fromstate->browseName, "FromState");
|
|
UA_LOCALIZEDTEXT_STATIC(fromstate->displayName, "FromState");
|
|
UA_LOCALIZEDTEXT_STATIC(fromstate->displayName, "FromState");
|
|
@@ -328,12 +314,12 @@ void UA_Server_init(UA_Server *server, UA_String *endpointUrl) {
|
|
fromstate->isAbstract = UA_FALSE;
|
|
fromstate->isAbstract = UA_FALSE;
|
|
fromstate->symmetric = UA_FALSE;
|
|
fromstate->symmetric = UA_FALSE;
|
|
UA_LOCALIZEDTEXT_STATIC(fromstate->inverseName, "ToTransition");
|
|
UA_LOCALIZEDTEXT_STATIC(fromstate->inverseName, "ToTransition");
|
|
- ADDINVERSEREFERENCE(fromstate, RefTypeId_HasSubtype, RefTypeId_NonHierarchicalReferences);
|
|
|
|
- UA_Namespace_insert(ns0, (UA_Node**)&fromstate, UA_NAMESPACE_INSERT_UNIQUE);
|
|
|
|
|
|
+ ADDREFERENCE(fromstate, RefTypeId_HasSubtype, UA_TRUE, RefTypeId_NonHierarchicalReferences);
|
|
|
|
+ UA_NodeStore_insert(server->nodestore, (UA_Node**)&fromstate, UA_NODESTORE_INSERT_UNIQUE);
|
|
|
|
|
|
UA_ReferenceTypeNode *tostate;
|
|
UA_ReferenceTypeNode *tostate;
|
|
UA_ReferenceTypeNode_new(&tostate);
|
|
UA_ReferenceTypeNode_new(&tostate);
|
|
- tostate->nodeId = RefTypeId_ToState;
|
|
|
|
|
|
+ tostate->nodeId = RefTypeId_ToState.nodeId;
|
|
tostate->nodeClass = UA_NODECLASS_REFERENCETYPE;
|
|
tostate->nodeClass = UA_NODECLASS_REFERENCETYPE;
|
|
UA_QUALIFIEDNAME_STATIC(tostate->browseName, "ToState");
|
|
UA_QUALIFIEDNAME_STATIC(tostate->browseName, "ToState");
|
|
UA_LOCALIZEDTEXT_STATIC(tostate->displayName, "ToState");
|
|
UA_LOCALIZEDTEXT_STATIC(tostate->displayName, "ToState");
|
|
@@ -341,12 +327,12 @@ void UA_Server_init(UA_Server *server, UA_String *endpointUrl) {
|
|
tostate->isAbstract = UA_FALSE;
|
|
tostate->isAbstract = UA_FALSE;
|
|
tostate->symmetric = UA_FALSE;
|
|
tostate->symmetric = UA_FALSE;
|
|
UA_LOCALIZEDTEXT_STATIC(tostate->inverseName, "FromTransition");
|
|
UA_LOCALIZEDTEXT_STATIC(tostate->inverseName, "FromTransition");
|
|
- ADDINVERSEREFERENCE(tostate, RefTypeId_HasSubtype, RefTypeId_NonHierarchicalReferences);
|
|
|
|
- UA_Namespace_insert(ns0, (UA_Node**)&tostate, UA_NAMESPACE_INSERT_UNIQUE);
|
|
|
|
|
|
+ ADDREFERENCE(tostate, RefTypeId_HasSubtype, UA_TRUE, RefTypeId_NonHierarchicalReferences);
|
|
|
|
+ UA_NodeStore_insert(server->nodestore, (UA_Node**)&tostate, UA_NODESTORE_INSERT_UNIQUE);
|
|
|
|
|
|
UA_ReferenceTypeNode *hascause;
|
|
UA_ReferenceTypeNode *hascause;
|
|
UA_ReferenceTypeNode_new(&hascause);
|
|
UA_ReferenceTypeNode_new(&hascause);
|
|
- hascause->nodeId = RefTypeId_HasCause;
|
|
|
|
|
|
+ hascause->nodeId = RefTypeId_HasCause.nodeId;
|
|
hascause->nodeClass = UA_NODECLASS_REFERENCETYPE;
|
|
hascause->nodeClass = UA_NODECLASS_REFERENCETYPE;
|
|
UA_QUALIFIEDNAME_STATIC(hascause->browseName, "HasCause");
|
|
UA_QUALIFIEDNAME_STATIC(hascause->browseName, "HasCause");
|
|
UA_LOCALIZEDTEXT_STATIC(hascause->displayName, "HasCause");
|
|
UA_LOCALIZEDTEXT_STATIC(hascause->displayName, "HasCause");
|
|
@@ -354,12 +340,12 @@ void UA_Server_init(UA_Server *server, UA_String *endpointUrl) {
|
|
hascause->isAbstract = UA_FALSE;
|
|
hascause->isAbstract = UA_FALSE;
|
|
hascause->symmetric = UA_FALSE;
|
|
hascause->symmetric = UA_FALSE;
|
|
UA_LOCALIZEDTEXT_STATIC(hascause->inverseName, "MayBeCausedBy");
|
|
UA_LOCALIZEDTEXT_STATIC(hascause->inverseName, "MayBeCausedBy");
|
|
- ADDINVERSEREFERENCE(hascause, RefTypeId_HasSubtype, RefTypeId_NonHierarchicalReferences);
|
|
|
|
- UA_Namespace_insert(ns0, (UA_Node**)&hascause, UA_NAMESPACE_INSERT_UNIQUE);
|
|
|
|
|
|
+ ADDREFERENCE(hascause, RefTypeId_HasSubtype, UA_TRUE, RefTypeId_NonHierarchicalReferences);
|
|
|
|
+ UA_NodeStore_insert(server->nodestore, (UA_Node**)&hascause, UA_NODESTORE_INSERT_UNIQUE);
|
|
|
|
|
|
UA_ReferenceTypeNode *haseffect;
|
|
UA_ReferenceTypeNode *haseffect;
|
|
UA_ReferenceTypeNode_new(&haseffect);
|
|
UA_ReferenceTypeNode_new(&haseffect);
|
|
- haseffect->nodeId = RefTypeId_HasEffect;
|
|
|
|
|
|
+ haseffect->nodeId = RefTypeId_HasEffect.nodeId;
|
|
haseffect->nodeClass = UA_NODECLASS_REFERENCETYPE;
|
|
haseffect->nodeClass = UA_NODECLASS_REFERENCETYPE;
|
|
UA_QUALIFIEDNAME_STATIC(haseffect->browseName, "HasEffect");
|
|
UA_QUALIFIEDNAME_STATIC(haseffect->browseName, "HasEffect");
|
|
UA_LOCALIZEDTEXT_STATIC(haseffect->displayName, "HasEffect");
|
|
UA_LOCALIZEDTEXT_STATIC(haseffect->displayName, "HasEffect");
|
|
@@ -367,12 +353,12 @@ void UA_Server_init(UA_Server *server, UA_String *endpointUrl) {
|
|
haseffect->isAbstract = UA_FALSE;
|
|
haseffect->isAbstract = UA_FALSE;
|
|
haseffect->symmetric = UA_FALSE;
|
|
haseffect->symmetric = UA_FALSE;
|
|
UA_LOCALIZEDTEXT_STATIC(haseffect->inverseName, "MayBeEffectedBy");
|
|
UA_LOCALIZEDTEXT_STATIC(haseffect->inverseName, "MayBeEffectedBy");
|
|
- ADDINVERSEREFERENCE(haseffect, RefTypeId_HasSubtype, RefTypeId_NonHierarchicalReferences);
|
|
|
|
- UA_Namespace_insert(ns0, (UA_Node**)&haseffect, UA_NAMESPACE_INSERT_UNIQUE);
|
|
|
|
|
|
+ ADDREFERENCE(haseffect, RefTypeId_HasSubtype, UA_TRUE, RefTypeId_NonHierarchicalReferences);
|
|
|
|
+ UA_NodeStore_insert(server->nodestore, (UA_Node**)&haseffect, UA_NODESTORE_INSERT_UNIQUE);
|
|
|
|
|
|
UA_ReferenceTypeNode *hashistoricalconfiguration;
|
|
UA_ReferenceTypeNode *hashistoricalconfiguration;
|
|
UA_ReferenceTypeNode_new(&hashistoricalconfiguration);
|
|
UA_ReferenceTypeNode_new(&hashistoricalconfiguration);
|
|
- hashistoricalconfiguration->nodeId = RefTypeId_HasHistoricalConfiguration;
|
|
|
|
|
|
+ hashistoricalconfiguration->nodeId = RefTypeId_HasHistoricalConfiguration.nodeId;
|
|
hashistoricalconfiguration->nodeClass = UA_NODECLASS_REFERENCETYPE;
|
|
hashistoricalconfiguration->nodeClass = UA_NODECLASS_REFERENCETYPE;
|
|
UA_QUALIFIEDNAME_STATIC(hashistoricalconfiguration->browseName, "HasHistoricalConfiguration");
|
|
UA_QUALIFIEDNAME_STATIC(hashistoricalconfiguration->browseName, "HasHistoricalConfiguration");
|
|
UA_LOCALIZEDTEXT_STATIC(hashistoricalconfiguration->displayName, "HasHistoricalConfiguration");
|
|
UA_LOCALIZEDTEXT_STATIC(hashistoricalconfiguration->displayName, "HasHistoricalConfiguration");
|
|
@@ -380,8 +366,8 @@ void UA_Server_init(UA_Server *server, UA_String *endpointUrl) {
|
|
hashistoricalconfiguration->isAbstract = UA_FALSE;
|
|
hashistoricalconfiguration->isAbstract = UA_FALSE;
|
|
hashistoricalconfiguration->symmetric = UA_FALSE;
|
|
hashistoricalconfiguration->symmetric = UA_FALSE;
|
|
UA_LOCALIZEDTEXT_STATIC(hashistoricalconfiguration->inverseName, "HistoricalConfigurationOf");
|
|
UA_LOCALIZEDTEXT_STATIC(hashistoricalconfiguration->inverseName, "HistoricalConfigurationOf");
|
|
- ADDINVERSEREFERENCE(hashistoricalconfiguration, RefTypeId_HasSubtype, RefTypeId_Aggregates);
|
|
|
|
- UA_Namespace_insert(ns0, (UA_Node**)&hashistoricalconfiguration, UA_NAMESPACE_INSERT_UNIQUE);
|
|
|
|
|
|
+ ADDREFERENCE(hashistoricalconfiguration, RefTypeId_HasSubtype, UA_TRUE, RefTypeId_Aggregates);
|
|
|
|
+ UA_NodeStore_insert(server->nodestore, (UA_Node**)&hashistoricalconfiguration, UA_NODESTORE_INSERT_UNIQUE);
|
|
|
|
|
|
|
|
|
|
// ObjectTypes (Ids only)
|
|
// ObjectTypes (Ids only)
|
|
@@ -406,15 +392,7 @@ void UA_Server_init(UA_Server *server, UA_String *endpointUrl) {
|
|
UA_QUALIFIEDNAME_STATIC(folderType->browseName, "FolderType");
|
|
UA_QUALIFIEDNAME_STATIC(folderType->browseName, "FolderType");
|
|
UA_LOCALIZEDTEXT_STATIC(folderType->displayName, "FolderType");
|
|
UA_LOCALIZEDTEXT_STATIC(folderType->displayName, "FolderType");
|
|
UA_LOCALIZEDTEXT_STATIC(folderType->description, "FolderType");
|
|
UA_LOCALIZEDTEXT_STATIC(folderType->description, "FolderType");
|
|
- UA_Namespace_insert(ns0, (UA_Node**)&folderType, UA_NAMESPACE_INSERT_UNIQUE);
|
|
|
|
-
|
|
|
|
-#define ADDREFERENCE(NODE, REFTYPE, INVERSE, TARGET_NODEID) \
|
|
|
|
- static struct UA_ReferenceNode NODE##REFTYPE##TARGET_NODEID; \
|
|
|
|
- UA_ReferenceNode_init(&NODE##REFTYPE##TARGET_NODEID); \
|
|
|
|
- NODE##REFTYPE##TARGET_NODEID.referenceTypeId = REFTYPE; \
|
|
|
|
- NODE##REFTYPE##TARGET_NODEID.isInverse = INVERSE; \
|
|
|
|
- NODE##REFTYPE##TARGET_NODEID.targetId = TARGET_NODEID; \
|
|
|
|
- AddReference((UA_Node *)NODE, &NODE##REFTYPE##TARGET_NODEID, ns0)
|
|
|
|
|
|
+ UA_NodeStore_insert(server->nodestore, (UA_Node**)&folderType, UA_NODESTORE_INSERT_UNIQUE);
|
|
|
|
|
|
// Root
|
|
// Root
|
|
UA_ObjectNode *root;
|
|
UA_ObjectNode *root;
|
|
@@ -429,7 +407,7 @@ void UA_Server_init(UA_Server *server, UA_String *endpointUrl) {
|
|
ADDREFERENCE(root, RefTypeId_Organizes, UA_FALSE, ObjId_TypesFolder);
|
|
ADDREFERENCE(root, RefTypeId_Organizes, UA_FALSE, ObjId_TypesFolder);
|
|
ADDREFERENCE(root, RefTypeId_Organizes, UA_FALSE, ObjId_ViewsFolder);
|
|
ADDREFERENCE(root, RefTypeId_Organizes, UA_FALSE, ObjId_ViewsFolder);
|
|
/* root becomes a managed node. we need to release it at the end.*/
|
|
/* root becomes a managed node. we need to release it at the end.*/
|
|
- UA_Namespace_insert(ns0, (UA_Node**)&root, UA_NAMESPACE_INSERT_UNIQUE | UA_NAMESPACE_INSERT_GETMANAGED);
|
|
|
|
|
|
+ UA_NodeStore_insert(server->nodestore, (UA_Node**)&root, UA_NODESTORE_INSERT_UNIQUE | UA_NODESTORE_INSERT_GETMANAGED);
|
|
|
|
|
|
// Objects
|
|
// Objects
|
|
UA_ObjectNode *objects;
|
|
UA_ObjectNode *objects;
|
|
@@ -441,7 +419,7 @@ void UA_Server_init(UA_Server *server, UA_String *endpointUrl) {
|
|
UA_LOCALIZEDTEXT_STATIC(objects->description, "Objects");
|
|
UA_LOCALIZEDTEXT_STATIC(objects->description, "Objects");
|
|
ADDREFERENCE(objects, RefTypeId_HasTypeDefinition, UA_FALSE, ObjTypeId_FolderType);
|
|
ADDREFERENCE(objects, RefTypeId_HasTypeDefinition, UA_FALSE, ObjTypeId_FolderType);
|
|
ADDREFERENCE(objects, RefTypeId_Organizes, UA_FALSE, ObjId_Server);
|
|
ADDREFERENCE(objects, RefTypeId_Organizes, UA_FALSE, ObjId_Server);
|
|
- UA_Namespace_insert(ns0, (UA_Node**)&objects, UA_NAMESPACE_INSERT_UNIQUE);
|
|
|
|
|
|
+ UA_NodeStore_insert(server->nodestore, (UA_Node**)&objects, UA_NODESTORE_INSERT_UNIQUE);
|
|
|
|
|
|
// Types
|
|
// Types
|
|
UA_ObjectNode *types;
|
|
UA_ObjectNode *types;
|
|
@@ -452,7 +430,7 @@ void UA_Server_init(UA_Server *server, UA_String *endpointUrl) {
|
|
UA_LOCALIZEDTEXT_STATIC(types->displayName, "Types");
|
|
UA_LOCALIZEDTEXT_STATIC(types->displayName, "Types");
|
|
UA_LOCALIZEDTEXT_STATIC(types->description, "Types");
|
|
UA_LOCALIZEDTEXT_STATIC(types->description, "Types");
|
|
ADDREFERENCE(types, RefTypeId_HasTypeDefinition, UA_FALSE, ObjTypeId_FolderType);
|
|
ADDREFERENCE(types, RefTypeId_HasTypeDefinition, UA_FALSE, ObjTypeId_FolderType);
|
|
- UA_Namespace_insert(ns0, (UA_Node**)&types, UA_NAMESPACE_INSERT_UNIQUE);
|
|
|
|
|
|
+ UA_NodeStore_insert(server->nodestore, (UA_Node**)&types, UA_NODESTORE_INSERT_UNIQUE);
|
|
|
|
|
|
// Views
|
|
// Views
|
|
UA_ObjectNode *views;
|
|
UA_ObjectNode *views;
|
|
@@ -463,7 +441,7 @@ void UA_Server_init(UA_Server *server, UA_String *endpointUrl) {
|
|
UA_LOCALIZEDTEXT_STATIC(views->displayName, "Views");
|
|
UA_LOCALIZEDTEXT_STATIC(views->displayName, "Views");
|
|
UA_LOCALIZEDTEXT_STATIC(views->description, "Views");
|
|
UA_LOCALIZEDTEXT_STATIC(views->description, "Views");
|
|
ADDREFERENCE(views, RefTypeId_HasTypeDefinition, UA_FALSE, ObjTypeId_FolderType);
|
|
ADDREFERENCE(views, RefTypeId_HasTypeDefinition, UA_FALSE, ObjTypeId_FolderType);
|
|
- UA_Namespace_insert(ns0, (UA_Node**)&views, UA_NAMESPACE_INSERT_UNIQUE);
|
|
|
|
|
|
+ UA_NodeStore_insert(server->nodestore, (UA_Node**)&views, UA_NODESTORE_INSERT_UNIQUE);
|
|
|
|
|
|
// Server
|
|
// Server
|
|
UA_ObjectNode *servernode;
|
|
UA_ObjectNode *servernode;
|
|
@@ -477,16 +455,16 @@ void UA_Server_init(UA_Server *server, UA_String *endpointUrl) {
|
|
ADDREFERENCE(servernode, RefTypeId_HasComponent, UA_FALSE, ObjId_NamespaceArray);
|
|
ADDREFERENCE(servernode, RefTypeId_HasComponent, UA_FALSE, ObjId_NamespaceArray);
|
|
ADDREFERENCE(servernode, RefTypeId_HasProperty, UA_FALSE, ObjId_ServerStatus);
|
|
ADDREFERENCE(servernode, RefTypeId_HasProperty, UA_FALSE, ObjId_ServerStatus);
|
|
ADDREFERENCE(servernode, RefTypeId_HasProperty, UA_FALSE, ObjId_ServerArray);
|
|
ADDREFERENCE(servernode, RefTypeId_HasProperty, UA_FALSE, ObjId_ServerArray);
|
|
- UA_Namespace_insert(ns0, (UA_Node**)&servernode, UA_NAMESPACE_INSERT_UNIQUE);
|
|
|
|
|
|
+ UA_NodeStore_insert(server->nodestore, (UA_Node**)&servernode, UA_NODESTORE_INSERT_UNIQUE);
|
|
|
|
|
|
// NamespaceArray
|
|
// NamespaceArray
|
|
UA_VariableNode *namespaceArray;
|
|
UA_VariableNode *namespaceArray;
|
|
UA_VariableNode_new(&namespaceArray);
|
|
UA_VariableNode_new(&namespaceArray);
|
|
namespaceArray->nodeId = ObjId_NamespaceArray.nodeId;
|
|
namespaceArray->nodeId = ObjId_NamespaceArray.nodeId;
|
|
namespaceArray->nodeClass = UA_NODECLASS_VARIABLE; //FIXME: this should go into _new?
|
|
namespaceArray->nodeClass = UA_NODECLASS_VARIABLE; //FIXME: this should go into _new?
|
|
- UA_QUALIFIEDNAME_STATIC(namespaceArray->browseName, "NamespaceArray");
|
|
|
|
- UA_LOCALIZEDTEXT_STATIC(namespaceArray->displayName, "NamespaceArray");
|
|
|
|
- UA_LOCALIZEDTEXT_STATIC(namespaceArray->description, "NamespaceArray");
|
|
|
|
|
|
+ UA_QUALIFIEDNAME_STATIC(namespaceArray->browseName, "NodeStoreArray");
|
|
|
|
+ UA_LOCALIZEDTEXT_STATIC(namespaceArray->displayName, "NodeStoreArray");
|
|
|
|
+ UA_LOCALIZEDTEXT_STATIC(namespaceArray->description, "NodeStoreArray");
|
|
UA_Array_new((void **)&namespaceArray->value.data, 2, &UA_.types[UA_STRING]);
|
|
UA_Array_new((void **)&namespaceArray->value.data, 2, &UA_.types[UA_STRING]);
|
|
namespaceArray->value.vt = &UA_.types[UA_STRING];
|
|
namespaceArray->value.vt = &UA_.types[UA_STRING];
|
|
namespaceArray->value.arrayLength = 2;
|
|
namespaceArray->value.arrayLength = 2;
|
|
@@ -502,7 +480,7 @@ void UA_Server_init(UA_Server *server, UA_String *endpointUrl) {
|
|
namespaceArray->valueRank = 1;
|
|
namespaceArray->valueRank = 1;
|
|
namespaceArray->minimumSamplingInterval = 1.0;
|
|
namespaceArray->minimumSamplingInterval = 1.0;
|
|
namespaceArray->historizing = UA_FALSE;
|
|
namespaceArray->historizing = UA_FALSE;
|
|
- UA_Namespace_insert(ns0, (UA_Node**)&namespaceArray, UA_NAMESPACE_INSERT_UNIQUE);
|
|
|
|
|
|
+ UA_NodeStore_insert(server->nodestore, (UA_Node**)&namespaceArray, UA_NODESTORE_INSERT_UNIQUE);
|
|
|
|
|
|
// ServerStatus
|
|
// ServerStatus
|
|
UA_VariableNode *serverstatus;
|
|
UA_VariableNode *serverstatus;
|
|
@@ -528,7 +506,7 @@ void UA_Server_init(UA_Server *server, UA_String *endpointUrl) {
|
|
serverstatus->value.vt = &UA_.types[UA_SERVERSTATUSDATATYPE]; // gets encoded as an extensionobject
|
|
serverstatus->value.vt = &UA_.types[UA_SERVERSTATUSDATATYPE]; // gets encoded as an extensionobject
|
|
serverstatus->value.arrayLength = 1;
|
|
serverstatus->value.arrayLength = 1;
|
|
serverstatus->value.data = status;
|
|
serverstatus->value.data = status;
|
|
- UA_Namespace_insert(ns0, (UA_Node**)&serverstatus, UA_NAMESPACE_INSERT_UNIQUE);
|
|
|
|
|
|
+ UA_NodeStore_insert(server->nodestore, (UA_Node**)&serverstatus, UA_NODESTORE_INSERT_UNIQUE);
|
|
|
|
|
|
// State (Component of ServerStatus)
|
|
// State (Component of ServerStatus)
|
|
UA_VariableNode *state;
|
|
UA_VariableNode *state;
|
|
@@ -542,11 +520,10 @@ void UA_Server_init(UA_Server *server, UA_String *endpointUrl) {
|
|
state->value.arrayDimensionsLength = 1; // added to ensure encoding in readreponse
|
|
state->value.arrayDimensionsLength = 1; // added to ensure encoding in readreponse
|
|
state->value.arrayLength = 1;
|
|
state->value.arrayLength = 1;
|
|
state->value.data = &status->state; // points into the other object.
|
|
state->value.data = &status->state; // points into the other object.
|
|
- UA_Namespace_insert(ns0, (UA_Node**)&state, UA_NAMESPACE_INSERT_UNIQUE);
|
|
|
|
|
|
+ UA_NodeStore_insert(server->nodestore, (UA_Node**)&state, UA_NODESTORE_INSERT_UNIQUE);
|
|
|
|
|
|
//TODO: free(namespaceArray->value.data) later or forget it
|
|
//TODO: free(namespaceArray->value.data) later or forget it
|
|
|
|
|
|
-
|
|
|
|
/* UA_VariableNode* v = (UA_VariableNode*)np; */
|
|
/* UA_VariableNode* v = (UA_VariableNode*)np; */
|
|
/* UA_Array_new((void**)&v->value.data, 2, &UA_.types[UA_STRING]); */
|
|
/* UA_Array_new((void**)&v->value.data, 2, &UA_.types[UA_STRING]); */
|
|
/* v->value.vt = &UA_.types[UA_STRING]; */
|
|
/* v->value.vt = &UA_.types[UA_STRING]; */
|
|
@@ -558,22 +535,7 @@ void UA_Server_init(UA_Server *server, UA_String *endpointUrl) {
|
|
/* v->valueRank = 1; */
|
|
/* v->valueRank = 1; */
|
|
/* v->minimumSamplingInterval = 1.0; */
|
|
/* v->minimumSamplingInterval = 1.0; */
|
|
/* v->historizing = UA_FALSE; */
|
|
/* v->historizing = UA_FALSE; */
|
|
- /* UA_Namespace_insert(ns0,np); */
|
|
|
|
-
|
|
|
|
- /*******************/
|
|
|
|
- /* Namespace local */
|
|
|
|
- /*******************/
|
|
|
|
-
|
|
|
|
- UA_Namespace_releaseManagedNode((const UA_Node *)root);
|
|
|
|
|
|
+ /* UA_NodeStore_insert(server->nodestore,np); */
|
|
|
|
|
|
-#if defined(DEBUG) && defined(VERBOSE)
|
|
|
|
- uint32_t i;
|
|
|
|
- for(i = 0; i < ns0->size; i++) {
|
|
|
|
- if(ns0->entries[i].node != UA_NULL) {
|
|
|
|
- printf("application_init - entries[%d]={", i);
|
|
|
|
- UA_Node_print(ns0->entries[i].node, stdout);
|
|
|
|
- printf("}\n");
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-#endif
|
|
|
|
|
|
+ UA_NodeStore_releaseManagedNode((const UA_Node *)root);
|
|
}
|
|
}
|