|
@@ -73,13 +73,23 @@ void appMockup_init() {
|
|
|
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_ReferenceTypeNode *references;
|
|
|
UA_ReferenceTypeNode_new(&references);
|
|
|
references->nodeId = RefTypeId_References;
|
|
|
references->nodeClass = UA_NODECLASS_REFERENCETYPE;
|
|
|
- references->browseName = UA_QUALIFIEDNAME_STATIC("References");
|
|
|
- references->displayName = UA_LOCALIZEDTEXT_STATIC("References");
|
|
|
- references->description = UA_LOCALIZEDTEXT_STATIC("References");
|
|
|
+ UA_QUALIFIEDNAME_STATIC(references->browseName, "References");
|
|
|
+ UA_LOCALIZEDTEXT_STATIC(references->displayName, "References");
|
|
|
+ UA_LOCALIZEDTEXT_STATIC(references->description, "References");
|
|
|
references->isAbstract = UA_TRUE;
|
|
|
references->symmetric = UA_TRUE;
|
|
|
Namespace_insert(ns0,(UA_Node**)&references, NAMESPACE_INSERT_UNIQUE);
|
|
@@ -88,343 +98,329 @@ void appMockup_init() {
|
|
|
UA_ReferenceTypeNode_new(&hierarchicalreferences);
|
|
|
hierarchicalreferences->nodeId = RefTypeId_HierarchicalReferences;
|
|
|
hierarchicalreferences->nodeClass = UA_NODECLASS_REFERENCETYPE;
|
|
|
- hierarchicalreferences->browseName = UA_QUALIFIEDNAME_STATIC("HierarchicalReferences");
|
|
|
- hierarchicalreferences->displayName = UA_LOCALIZEDTEXT_STATIC("HierarchicalReferences");
|
|
|
- hierarchicalreferences->description = UA_LOCALIZEDTEXT_STATIC("HierarchicalReferences");
|
|
|
+ UA_QUALIFIEDNAME_STATIC(hierarchicalreferences->browseName, "HierarchicalReferences");
|
|
|
+ UA_LOCALIZEDTEXT_STATIC(hierarchicalreferences->displayName, "HierarchicalReferences");
|
|
|
+ UA_LOCALIZEDTEXT_STATIC(hierarchicalreferences->description, "HierarchicalReferences");
|
|
|
hierarchicalreferences->isAbstract = UA_TRUE;
|
|
|
hierarchicalreferences->symmetric = UA_FALSE;
|
|
|
- AddReference((UA_Node*)hierarchicalreferences, &(UA_ReferenceNode){RefTypeId_HasSubtype, UA_TRUE,
|
|
|
- (UA_ExpandedNodeId){RefTypeId_References, UA_STRING_NULL, 0}}, ns0);
|
|
|
+ ADDINVERSEREFERENCE(hierarchicalreferences, RefTypeId_HasSubtype, RefTypeId_References);
|
|
|
Namespace_insert(ns0,(UA_Node**)&hierarchicalreferences, NAMESPACE_INSERT_UNIQUE);
|
|
|
|
|
|
UA_ReferenceTypeNode *nonhierarchicalreferences;
|
|
|
UA_ReferenceTypeNode_new(&nonhierarchicalreferences);
|
|
|
nonhierarchicalreferences->nodeId = RefTypeId_NonHierarchicalReferences;
|
|
|
nonhierarchicalreferences->nodeClass = UA_NODECLASS_REFERENCETYPE;
|
|
|
- nonhierarchicalreferences->browseName = UA_QUALIFIEDNAME_STATIC("NonHierarchicalReferences");
|
|
|
- nonhierarchicalreferences->displayName = UA_LOCALIZEDTEXT_STATIC("NonHierarchicalReferences");
|
|
|
- nonhierarchicalreferences->description = UA_LOCALIZEDTEXT_STATIC("NonHierarchicalReferences");
|
|
|
+ UA_QUALIFIEDNAME_STATIC(nonhierarchicalreferences->browseName, "NonHierarchicalReferences");
|
|
|
+ UA_LOCALIZEDTEXT_STATIC(nonhierarchicalreferences->displayName, "NonHierarchicalReferences");
|
|
|
+ UA_LOCALIZEDTEXT_STATIC(nonhierarchicalreferences->description, "NonHierarchicalReferences");
|
|
|
nonhierarchicalreferences->isAbstract = UA_TRUE;
|
|
|
nonhierarchicalreferences->symmetric = UA_FALSE;
|
|
|
- AddReference((UA_Node*)nonhierarchicalreferences, &(UA_ReferenceNode){RefTypeId_HasSubtype, UA_TRUE,
|
|
|
- (UA_ExpandedNodeId){RefTypeId_References, UA_STRING_NULL, 0}}, ns0);
|
|
|
+ ADDINVERSEREFERENCE(nonhierarchicalreferences, RefTypeId_HasSubtype, RefTypeId_References);
|
|
|
Namespace_insert(ns0,(UA_Node**)&nonhierarchicalreferences, NAMESPACE_INSERT_UNIQUE);
|
|
|
|
|
|
UA_ReferenceTypeNode *haschild;
|
|
|
UA_ReferenceTypeNode_new(&haschild);
|
|
|
haschild->nodeId = RefTypeId_HasChild;
|
|
|
haschild->nodeClass = UA_NODECLASS_REFERENCETYPE;
|
|
|
- haschild->browseName = UA_QUALIFIEDNAME_STATIC("HasChild");
|
|
|
- haschild->displayName = UA_LOCALIZEDTEXT_STATIC("HasChild");
|
|
|
- haschild->description = UA_LOCALIZEDTEXT_STATIC("HasChild");
|
|
|
+ UA_QUALIFIEDNAME_STATIC(haschild->browseName, "HasChild");
|
|
|
+ UA_LOCALIZEDTEXT_STATIC(haschild->displayName, "HasChild");
|
|
|
+ UA_LOCALIZEDTEXT_STATIC(haschild->description, "HasChild");
|
|
|
haschild->isAbstract = UA_TRUE;
|
|
|
haschild->symmetric = UA_FALSE;
|
|
|
- AddReference((UA_Node*)haschild, &(UA_ReferenceNode){RefTypeId_HasSubtype, UA_TRUE,
|
|
|
- (UA_ExpandedNodeId){RefTypeId_HierarchicalReferences, UA_STRING_NULL, 0}}, ns0);
|
|
|
+ ADDINVERSEREFERENCE(haschild, RefTypeId_HasSubtype, RefTypeId_HierarchicalReferences);
|
|
|
Namespace_insert(ns0,(UA_Node**)&haschild, NAMESPACE_INSERT_UNIQUE);
|
|
|
|
|
|
UA_ReferenceTypeNode *organizes;
|
|
|
UA_ReferenceTypeNode_new(&organizes);
|
|
|
organizes->nodeId = RefTypeId_Organizes;
|
|
|
organizes->nodeClass = UA_NODECLASS_REFERENCETYPE;
|
|
|
- organizes->browseName = UA_QUALIFIEDNAME_STATIC("Organizes");
|
|
|
- organizes->displayName = UA_LOCALIZEDTEXT_STATIC("Organizes");
|
|
|
- organizes->description = UA_LOCALIZEDTEXT_STATIC("Organizes");
|
|
|
+ UA_QUALIFIEDNAME_STATIC(organizes->browseName, "Organizes");
|
|
|
+ UA_LOCALIZEDTEXT_STATIC(organizes->displayName, "Organizes");
|
|
|
+ UA_LOCALIZEDTEXT_STATIC(organizes->description, "Organizes");
|
|
|
organizes->isAbstract = UA_FALSE;
|
|
|
organizes->symmetric = UA_FALSE;
|
|
|
- organizes->inverseName = UA_LOCALIZEDTEXT_STATIC("OrganizedBy");
|
|
|
- AddReference((UA_Node*)organizes, &(UA_ReferenceNode){RefTypeId_HasSubtype, UA_TRUE,
|
|
|
- (UA_ExpandedNodeId){RefTypeId_HierarchicalReferences, UA_STRING_NULL, 0}}, ns0);
|
|
|
+ UA_LOCALIZEDTEXT_STATIC(organizes->inverseName, "OrganizedBy");
|
|
|
+ ADDINVERSEREFERENCE(organizes, RefTypeId_HasSubtype, RefTypeId_HierarchicalReferences);
|
|
|
Namespace_insert(ns0,(UA_Node**)&organizes, NAMESPACE_INSERT_UNIQUE);
|
|
|
|
|
|
UA_ReferenceTypeNode *haseventsource;
|
|
|
UA_ReferenceTypeNode_new(&haseventsource);
|
|
|
haseventsource->nodeId = RefTypeId_HasEventSource;
|
|
|
haseventsource->nodeClass = UA_NODECLASS_REFERENCETYPE;
|
|
|
- haseventsource->browseName = UA_QUALIFIEDNAME_STATIC("HasEventSource");
|
|
|
- haseventsource->displayName = UA_LOCALIZEDTEXT_STATIC("HasEventSource");
|
|
|
- haseventsource->description = UA_LOCALIZEDTEXT_STATIC("HasEventSource");
|
|
|
+ UA_QUALIFIEDNAME_STATIC(haseventsource->browseName, "HasEventSource");
|
|
|
+ UA_LOCALIZEDTEXT_STATIC(haseventsource->displayName, "HasEventSource");
|
|
|
+ UA_LOCALIZEDTEXT_STATIC(haseventsource->description, "HasEventSource");
|
|
|
haseventsource->isAbstract = UA_FALSE;
|
|
|
haseventsource->symmetric = UA_FALSE;
|
|
|
- haseventsource->inverseName = UA_LOCALIZEDTEXT_STATIC("EventSourceOf");
|
|
|
- AddReference((UA_Node*)haseventsource, &(UA_ReferenceNode){RefTypeId_HasSubtype, UA_TRUE,
|
|
|
- (UA_ExpandedNodeId){RefTypeId_HierarchicalReferences, UA_STRING_NULL, 0}}, ns0);
|
|
|
+ UA_LOCALIZEDTEXT_STATIC(haseventsource->inverseName, "EventSourceOf");
|
|
|
+ ADDINVERSEREFERENCE(haseventsource, RefTypeId_HasSubtype, RefTypeId_HierarchicalReferences);
|
|
|
Namespace_insert(ns0,(UA_Node**)&haseventsource, NAMESPACE_INSERT_UNIQUE);
|
|
|
|
|
|
UA_ReferenceTypeNode *hasmodellingrule;
|
|
|
UA_ReferenceTypeNode_new(&hasmodellingrule);
|
|
|
hasmodellingrule->nodeId = RefTypeId_HasModellingRule;
|
|
|
hasmodellingrule->nodeClass = UA_NODECLASS_REFERENCETYPE;
|
|
|
- hasmodellingrule->browseName = UA_QUALIFIEDNAME_STATIC("HasModellingRule");
|
|
|
- hasmodellingrule->displayName = UA_LOCALIZEDTEXT_STATIC("HasModellingRule");
|
|
|
- hasmodellingrule->description = UA_LOCALIZEDTEXT_STATIC("HasModellingRule");
|
|
|
+ UA_QUALIFIEDNAME_STATIC(hasmodellingrule->browseName, "HasModellingRule");
|
|
|
+ UA_LOCALIZEDTEXT_STATIC(hasmodellingrule->displayName, "HasModellingRule");
|
|
|
+ UA_LOCALIZEDTEXT_STATIC(hasmodellingrule->description, "HasModellingRule");
|
|
|
hasmodellingrule->isAbstract = UA_FALSE;
|
|
|
hasmodellingrule->symmetric = UA_FALSE;
|
|
|
- hasmodellingrule->inverseName = UA_LOCALIZEDTEXT_STATIC("ModellingRuleOf");
|
|
|
- AddReference((UA_Node*)hasmodellingrule, &(UA_ReferenceNode){RefTypeId_HasSubtype, UA_TRUE,
|
|
|
- (UA_ExpandedNodeId){RefTypeId_NonHierarchicalReferences, UA_STRING_NULL, 0}}, ns0);
|
|
|
+ UA_LOCALIZEDTEXT_STATIC(hasmodellingrule->inverseName, "ModellingRuleOf");
|
|
|
+ ADDINVERSEREFERENCE(hasmodellingrule, RefTypeId_HasSubtype, RefTypeId_NonHierarchicalReferences);
|
|
|
Namespace_insert(ns0,(UA_Node**)&hasmodellingrule, NAMESPACE_INSERT_UNIQUE);
|
|
|
|
|
|
UA_ReferenceTypeNode *hasencoding;
|
|
|
UA_ReferenceTypeNode_new(&hasencoding);
|
|
|
hasencoding->nodeId = RefTypeId_HasEncoding;
|
|
|
hasencoding->nodeClass = UA_NODECLASS_REFERENCETYPE;
|
|
|
- hasencoding->browseName = UA_QUALIFIEDNAME_STATIC("HasEncoding");
|
|
|
- hasencoding->displayName = UA_LOCALIZEDTEXT_STATIC("HasEncoding");
|
|
|
- hasencoding->description = UA_LOCALIZEDTEXT_STATIC("HasEncoding");
|
|
|
+ UA_QUALIFIEDNAME_STATIC(hasencoding->browseName, "HasEncoding");
|
|
|
+ UA_LOCALIZEDTEXT_STATIC(hasencoding->displayName, "HasEncoding");
|
|
|
+ UA_LOCALIZEDTEXT_STATIC(hasencoding->description, "HasEncoding");
|
|
|
hasencoding->isAbstract = UA_FALSE;
|
|
|
hasencoding->symmetric = UA_FALSE;
|
|
|
- hasencoding->inverseName = UA_LOCALIZEDTEXT_STATIC("EncodingOf");
|
|
|
- AddReference((UA_Node*)hasencoding, &(UA_ReferenceNode){RefTypeId_HasSubtype, UA_TRUE,
|
|
|
- (UA_ExpandedNodeId){RefTypeId_NonHierarchicalReferences, UA_STRING_NULL, 0}}, ns0);
|
|
|
+ UA_LOCALIZEDTEXT_STATIC(hasencoding->inverseName, "EncodingOf");
|
|
|
+ ADDINVERSEREFERENCE(hasencoding, RefTypeId_HasSubtype, RefTypeId_NonHierarchicalReferences);
|
|
|
Namespace_insert(ns0,(UA_Node**)&hasencoding, NAMESPACE_INSERT_UNIQUE);
|
|
|
|
|
|
UA_ReferenceTypeNode *hasdescription;
|
|
|
UA_ReferenceTypeNode_new(&hasdescription);
|
|
|
hasdescription->nodeId = RefTypeId_HasDescription;
|
|
|
hasdescription->nodeClass = UA_NODECLASS_REFERENCETYPE;
|
|
|
- hasdescription->browseName = UA_QUALIFIEDNAME_STATIC("HasDescription");
|
|
|
- hasdescription->displayName = UA_LOCALIZEDTEXT_STATIC("HasDescription");
|
|
|
- hasdescription->description = UA_LOCALIZEDTEXT_STATIC("HasDescription");
|
|
|
+ UA_QUALIFIEDNAME_STATIC(hasdescription->browseName, "HasDescription");
|
|
|
+ UA_LOCALIZEDTEXT_STATIC(hasdescription->displayName, "HasDescription");
|
|
|
+ UA_LOCALIZEDTEXT_STATIC(hasdescription->description, "HasDescription");
|
|
|
hasdescription->isAbstract = UA_FALSE;
|
|
|
hasdescription->symmetric = UA_FALSE;
|
|
|
- hasdescription->inverseName = UA_LOCALIZEDTEXT_STATIC("DescriptionOf");
|
|
|
- AddReference((UA_Node*)hasdescription, &(UA_ReferenceNode){RefTypeId_HasSubtype, UA_TRUE,
|
|
|
- (UA_ExpandedNodeId){RefTypeId_NonHierarchicalReferences, UA_STRING_NULL, 0}}, ns0);
|
|
|
+ UA_LOCALIZEDTEXT_STATIC(hasdescription->inverseName, "DescriptionOf");
|
|
|
+ ADDINVERSEREFERENCE(hasdescription, RefTypeId_HasSubtype, RefTypeId_NonHierarchicalReferences);
|
|
|
Namespace_insert(ns0,(UA_Node**)&hasdescription, NAMESPACE_INSERT_UNIQUE);
|
|
|
|
|
|
UA_ReferenceTypeNode *hastypedefinition;
|
|
|
UA_ReferenceTypeNode_new(&hastypedefinition);
|
|
|
hastypedefinition->nodeId = RefTypeId_HasTypeDefinition;
|
|
|
hastypedefinition->nodeClass = UA_NODECLASS_REFERENCETYPE;
|
|
|
- hastypedefinition->browseName = UA_QUALIFIEDNAME_STATIC("HasTypeDefinition");
|
|
|
- hastypedefinition->displayName = UA_LOCALIZEDTEXT_STATIC("HasTypeDefinition");
|
|
|
- hastypedefinition->description = UA_LOCALIZEDTEXT_STATIC("HasTypeDefinition");
|
|
|
+ UA_QUALIFIEDNAME_STATIC(hastypedefinition->browseName, "HasTypeDefinition");
|
|
|
+ UA_LOCALIZEDTEXT_STATIC(hastypedefinition->displayName, "HasTypeDefinition");
|
|
|
+ UA_LOCALIZEDTEXT_STATIC(hastypedefinition->description, "HasTypeDefinition");
|
|
|
hastypedefinition->isAbstract = UA_FALSE;
|
|
|
hastypedefinition->symmetric = UA_FALSE;
|
|
|
- hastypedefinition->inverseName = UA_LOCALIZEDTEXT_STATIC("TypeDefinitionOf");
|
|
|
- AddReference((UA_Node*)hastypedefinition, &(UA_ReferenceNode){RefTypeId_HasSubtype, UA_TRUE,
|
|
|
- (UA_ExpandedNodeId){RefTypeId_NonHierarchicalReferences, UA_STRING_NULL, 0}}, ns0);
|
|
|
+ UA_LOCALIZEDTEXT_STATIC(hastypedefinition->inverseName, "TypeDefinitionOf");
|
|
|
+ ADDINVERSEREFERENCE(hastypedefinition, RefTypeId_HasSubtype, RefTypeId_NonHierarchicalReferences);
|
|
|
Namespace_insert(ns0,(UA_Node**)&hastypedefinition, NAMESPACE_INSERT_UNIQUE);
|
|
|
|
|
|
UA_ReferenceTypeNode *generatesevent;
|
|
|
UA_ReferenceTypeNode_new(&generatesevent);
|
|
|
generatesevent->nodeId = RefTypeId_GeneratesEvent;
|
|
|
generatesevent->nodeClass = UA_NODECLASS_REFERENCETYPE;
|
|
|
- generatesevent->browseName = UA_QUALIFIEDNAME_STATIC("GeneratesEvent");
|
|
|
- generatesevent->displayName = UA_LOCALIZEDTEXT_STATIC("GeneratesEvent");
|
|
|
- generatesevent->description = UA_LOCALIZEDTEXT_STATIC("GeneratesEvent");
|
|
|
+ UA_QUALIFIEDNAME_STATIC(generatesevent->browseName, "GeneratesEvent");
|
|
|
+ UA_LOCALIZEDTEXT_STATIC(generatesevent->displayName, "GeneratesEvent");
|
|
|
+ UA_LOCALIZEDTEXT_STATIC(generatesevent->description, "GeneratesEvent");
|
|
|
generatesevent->isAbstract = UA_FALSE;
|
|
|
generatesevent->symmetric = UA_FALSE;
|
|
|
- generatesevent->inverseName = UA_LOCALIZEDTEXT_STATIC("GeneratedBy");
|
|
|
- AddReference((UA_Node*)generatesevent, &(UA_ReferenceNode){RefTypeId_HasSubtype, UA_TRUE,
|
|
|
- (UA_ExpandedNodeId){RefTypeId_NonHierarchicalReferences, UA_STRING_NULL, 0}}, ns0);
|
|
|
+ UA_LOCALIZEDTEXT_STATIC(generatesevent->inverseName, "GeneratedBy");
|
|
|
+ ADDINVERSEREFERENCE(generatesevent, RefTypeId_HasSubtype, RefTypeId_NonHierarchicalReferences);
|
|
|
Namespace_insert(ns0,(UA_Node**)&generatesevent, NAMESPACE_INSERT_UNIQUE);
|
|
|
|
|
|
UA_ReferenceTypeNode *aggregates;
|
|
|
UA_ReferenceTypeNode_new(&aggregates);
|
|
|
aggregates->nodeId = RefTypeId_Aggregates;
|
|
|
aggregates->nodeClass = UA_NODECLASS_REFERENCETYPE;
|
|
|
- aggregates->browseName = UA_QUALIFIEDNAME_STATIC("Aggregates");
|
|
|
- aggregates->displayName = UA_LOCALIZEDTEXT_STATIC("Aggregates");
|
|
|
- aggregates->description = UA_LOCALIZEDTEXT_STATIC("Aggregates");
|
|
|
+ UA_QUALIFIEDNAME_STATIC(aggregates->browseName, "Aggregates");
|
|
|
+ UA_LOCALIZEDTEXT_STATIC(aggregates->displayName, "Aggregates");
|
|
|
+ UA_LOCALIZEDTEXT_STATIC(aggregates->description, "Aggregates");
|
|
|
aggregates->isAbstract = UA_TRUE;
|
|
|
aggregates->symmetric = UA_FALSE;
|
|
|
- AddReference((UA_Node*)aggregates, &(UA_ReferenceNode){RefTypeId_HasSubtype, UA_TRUE,
|
|
|
- (UA_ExpandedNodeId){RefTypeId_HasChild, UA_STRING_NULL, 0}}, ns0);
|
|
|
+ ADDINVERSEREFERENCE(aggregates, RefTypeId_HasSubtype, RefTypeId_HasChild);
|
|
|
Namespace_insert(ns0,(UA_Node**)&aggregates, NAMESPACE_INSERT_UNIQUE);
|
|
|
|
|
|
UA_ReferenceTypeNode *hassubtype;
|
|
|
UA_ReferenceTypeNode_new(&hassubtype);
|
|
|
hassubtype->nodeId = RefTypeId_HasSubtype;
|
|
|
hassubtype->nodeClass = UA_NODECLASS_REFERENCETYPE;
|
|
|
- hassubtype->browseName = UA_QUALIFIEDNAME_STATIC("HasSubtype");
|
|
|
- hassubtype->displayName = UA_LOCALIZEDTEXT_STATIC("HasSubtype");
|
|
|
- hassubtype->description = UA_LOCALIZEDTEXT_STATIC("HasSubtype");
|
|
|
+ UA_QUALIFIEDNAME_STATIC(hassubtype->browseName, "HasSubtype");
|
|
|
+ UA_LOCALIZEDTEXT_STATIC(hassubtype->displayName, "HasSubtype");
|
|
|
+ UA_LOCALIZEDTEXT_STATIC(hassubtype->description, "HasSubtype");
|
|
|
hassubtype->isAbstract = UA_FALSE;
|
|
|
hassubtype->symmetric = UA_FALSE;
|
|
|
- hassubtype->inverseName = UA_LOCALIZEDTEXT_STATIC("SubtypeOf");
|
|
|
- AddReference((UA_Node*)hassubtype, &(UA_ReferenceNode){RefTypeId_HasSubtype, UA_TRUE,
|
|
|
- (UA_ExpandedNodeId){RefTypeId_HasChild, UA_STRING_NULL, 0}}, ns0);
|
|
|
+ UA_LOCALIZEDTEXT_STATIC(hassubtype->inverseName, "SubtypeOf");
|
|
|
+ ADDINVERSEREFERENCE(hassubtype, RefTypeId_HasSubtype, RefTypeId_HasChild);
|
|
|
Namespace_insert(ns0,(UA_Node**)&hassubtype, NAMESPACE_INSERT_UNIQUE);
|
|
|
|
|
|
UA_ReferenceTypeNode *hasproperty;
|
|
|
UA_ReferenceTypeNode_new(&hasproperty);
|
|
|
hasproperty->nodeId = RefTypeId_HasProperty;
|
|
|
hasproperty->nodeClass = UA_NODECLASS_REFERENCETYPE;
|
|
|
- hasproperty->browseName = UA_QUALIFIEDNAME_STATIC("HasProperty");
|
|
|
- hasproperty->displayName = UA_LOCALIZEDTEXT_STATIC("HasProperty");
|
|
|
- hasproperty->description = UA_LOCALIZEDTEXT_STATIC("HasProperty");
|
|
|
+ UA_QUALIFIEDNAME_STATIC(hasproperty->browseName, "HasProperty");
|
|
|
+ UA_LOCALIZEDTEXT_STATIC(hasproperty->displayName, "HasProperty");
|
|
|
+ UA_LOCALIZEDTEXT_STATIC(hasproperty->description, "HasProperty");
|
|
|
hasproperty->isAbstract = UA_FALSE;
|
|
|
hasproperty->symmetric = UA_FALSE;
|
|
|
- hasproperty->inverseName = UA_LOCALIZEDTEXT_STATIC("PropertyOf");
|
|
|
- AddReference((UA_Node*)hasproperty, &(UA_ReferenceNode){RefTypeId_HasSubtype, UA_TRUE,
|
|
|
- (UA_ExpandedNodeId){RefTypeId_Aggregates, UA_STRING_NULL, 0}}, ns0);
|
|
|
+ UA_LOCALIZEDTEXT_STATIC(hasproperty->inverseName, "PropertyOf");
|
|
|
+ ADDINVERSEREFERENCE(hasproperty, RefTypeId_HasSubtype, RefTypeId_Aggregates);
|
|
|
Namespace_insert(ns0,(UA_Node**)&hasproperty, NAMESPACE_INSERT_UNIQUE);
|
|
|
|
|
|
UA_ReferenceTypeNode *hascomponent;
|
|
|
UA_ReferenceTypeNode_new(&hascomponent);
|
|
|
hascomponent->nodeId = RefTypeId_HasComponent;
|
|
|
hascomponent->nodeClass = UA_NODECLASS_REFERENCETYPE;
|
|
|
- hascomponent->browseName = UA_QUALIFIEDNAME_STATIC("HasComponent");
|
|
|
- hascomponent->displayName = UA_LOCALIZEDTEXT_STATIC("HasComponent");
|
|
|
- hascomponent->description = UA_LOCALIZEDTEXT_STATIC("HasComponent");
|
|
|
+ UA_QUALIFIEDNAME_STATIC(hascomponent->browseName, "HasComponent");
|
|
|
+ UA_LOCALIZEDTEXT_STATIC(hascomponent->displayName, "HasComponent");
|
|
|
+ UA_LOCALIZEDTEXT_STATIC(hascomponent->description, "HasComponent");
|
|
|
hascomponent->isAbstract = UA_FALSE;
|
|
|
hascomponent->symmetric = UA_FALSE;
|
|
|
- hascomponent->inverseName = UA_LOCALIZEDTEXT_STATIC("ComponentOf");
|
|
|
- AddReference((UA_Node*)hascomponent, &(UA_ReferenceNode){RefTypeId_HasSubtype, UA_TRUE,
|
|
|
- (UA_ExpandedNodeId){RefTypeId_Aggregates, UA_STRING_NULL, 0}}, ns0);
|
|
|
+ UA_LOCALIZEDTEXT_STATIC(hascomponent->inverseName, "ComponentOf");
|
|
|
+ ADDINVERSEREFERENCE(hascomponent, RefTypeId_HasSubtype, RefTypeId_Aggregates);
|
|
|
Namespace_insert(ns0,(UA_Node**)&hascomponent, NAMESPACE_INSERT_UNIQUE);
|
|
|
|
|
|
UA_ReferenceTypeNode *hasnotifier;
|
|
|
UA_ReferenceTypeNode_new(&hasnotifier);
|
|
|
hasnotifier->nodeId = RefTypeId_HasNotifier;
|
|
|
hasnotifier->nodeClass = UA_NODECLASS_REFERENCETYPE;
|
|
|
- hasnotifier->browseName = UA_QUALIFIEDNAME_STATIC("HasNotifier");
|
|
|
- hasnotifier->displayName = UA_LOCALIZEDTEXT_STATIC("HasNotifier");
|
|
|
- hasnotifier->description = UA_LOCALIZEDTEXT_STATIC("HasNotifier");
|
|
|
+ UA_QUALIFIEDNAME_STATIC(hasnotifier->browseName, "HasNotifier");
|
|
|
+ UA_LOCALIZEDTEXT_STATIC(hasnotifier->displayName, "HasNotifier");
|
|
|
+ UA_LOCALIZEDTEXT_STATIC(hasnotifier->description, "HasNotifier");
|
|
|
hasnotifier->isAbstract = UA_FALSE;
|
|
|
hasnotifier->symmetric = UA_FALSE;
|
|
|
- hasnotifier->inverseName = UA_LOCALIZEDTEXT_STATIC("NotifierOf");
|
|
|
- AddReference((UA_Node*)hasnotifier, &(UA_ReferenceNode){RefTypeId_HasSubtype, UA_TRUE,
|
|
|
- (UA_ExpandedNodeId){RefTypeId_HasEventSource, UA_STRING_NULL, 0}}, ns0);
|
|
|
+ UA_LOCALIZEDTEXT_STATIC(hasnotifier->inverseName, "NotifierOf");
|
|
|
+ ADDINVERSEREFERENCE(hasnotifier, RefTypeId_HasSubtype, RefTypeId_HasEventSource);
|
|
|
Namespace_insert(ns0,(UA_Node**)&hasnotifier, NAMESPACE_INSERT_UNIQUE);
|
|
|
|
|
|
UA_ReferenceTypeNode *hasorderedcomponent;
|
|
|
UA_ReferenceTypeNode_new(&hasorderedcomponent);
|
|
|
hasorderedcomponent->nodeId = RefTypeId_HasOrderedComponent;
|
|
|
hasorderedcomponent->nodeClass = UA_NODECLASS_REFERENCETYPE;
|
|
|
- hasorderedcomponent->browseName = UA_QUALIFIEDNAME_STATIC("HasOrderedComponent");
|
|
|
- hasorderedcomponent->displayName = UA_LOCALIZEDTEXT_STATIC("HasOrderedComponent");
|
|
|
- hasorderedcomponent->description = UA_LOCALIZEDTEXT_STATIC("HasOrderedComponent");
|
|
|
+ UA_QUALIFIEDNAME_STATIC(hasorderedcomponent->browseName, "HasOrderedComponent");
|
|
|
+ UA_LOCALIZEDTEXT_STATIC(hasorderedcomponent->displayName, "HasOrderedComponent");
|
|
|
+ UA_LOCALIZEDTEXT_STATIC(hasorderedcomponent->description, "HasOrderedComponent");
|
|
|
hasorderedcomponent->isAbstract = UA_FALSE;
|
|
|
hasorderedcomponent->symmetric = UA_FALSE;
|
|
|
- hasorderedcomponent->inverseName = UA_LOCALIZEDTEXT_STATIC("OrderedComponentOf");
|
|
|
- AddReference((UA_Node*)hasorderedcomponent, &(UA_ReferenceNode){RefTypeId_HasSubtype, UA_TRUE,
|
|
|
- (UA_ExpandedNodeId){RefTypeId_HasComponent, UA_STRING_NULL, 0}}, ns0);
|
|
|
+ UA_LOCALIZEDTEXT_STATIC(hasorderedcomponent->inverseName, "OrderedComponentOf");
|
|
|
+ ADDINVERSEREFERENCE(hasorderedcomponent, RefTypeId_HasSubtype, RefTypeId_HasComponent);
|
|
|
Namespace_insert(ns0,(UA_Node**)&hasorderedcomponent, NAMESPACE_INSERT_UNIQUE);
|
|
|
|
|
|
UA_ReferenceTypeNode *hasmodelparent;
|
|
|
UA_ReferenceTypeNode_new(&hasmodelparent);
|
|
|
hasmodelparent->nodeId = RefTypeId_HasModelParent;
|
|
|
hasmodelparent->nodeClass = UA_NODECLASS_REFERENCETYPE;
|
|
|
- hasmodelparent->browseName = UA_QUALIFIEDNAME_STATIC("HasModelParent");
|
|
|
- hasmodelparent->displayName = UA_LOCALIZEDTEXT_STATIC("HasModelParent");
|
|
|
- hasmodelparent->description = UA_LOCALIZEDTEXT_STATIC("HasModelParent");
|
|
|
+ UA_QUALIFIEDNAME_STATIC(hasmodelparent->browseName, "HasModelParent");
|
|
|
+ UA_LOCALIZEDTEXT_STATIC(hasmodelparent->displayName, "HasModelParent");
|
|
|
+ UA_LOCALIZEDTEXT_STATIC(hasmodelparent->description, "HasModelParent");
|
|
|
hasmodelparent->isAbstract = UA_FALSE;
|
|
|
hasmodelparent->symmetric = UA_FALSE;
|
|
|
- hasmodelparent->inverseName = UA_LOCALIZEDTEXT_STATIC("ModelParentOf");
|
|
|
- AddReference((UA_Node*)hasmodelparent, &(UA_ReferenceNode){RefTypeId_HasSubtype, UA_TRUE,
|
|
|
- (UA_ExpandedNodeId){RefTypeId_NonHierarchicalReferences, UA_STRING_NULL, 0}}, ns0);
|
|
|
+ UA_LOCALIZEDTEXT_STATIC(hasmodelparent->inverseName, "ModelParentOf");
|
|
|
+ ADDINVERSEREFERENCE(hasmodelparent, RefTypeId_HasSubtype, RefTypeId_NonHierarchicalReferences);
|
|
|
Namespace_insert(ns0,(UA_Node**)&hasmodelparent, NAMESPACE_INSERT_UNIQUE);
|
|
|
|
|
|
UA_ReferenceTypeNode *fromstate;
|
|
|
UA_ReferenceTypeNode_new(&fromstate);
|
|
|
fromstate->nodeId = RefTypeId_FromState;
|
|
|
fromstate->nodeClass = UA_NODECLASS_REFERENCETYPE;
|
|
|
- fromstate->browseName = UA_QUALIFIEDNAME_STATIC("FromState");
|
|
|
- fromstate->displayName = UA_LOCALIZEDTEXT_STATIC("FromState");
|
|
|
- fromstate->description = UA_LOCALIZEDTEXT_STATIC("FromState");
|
|
|
+ UA_QUALIFIEDNAME_STATIC(fromstate->browseName, "FromState");
|
|
|
+ UA_LOCALIZEDTEXT_STATIC(fromstate->displayName, "FromState");
|
|
|
+ UA_LOCALIZEDTEXT_STATIC(fromstate->description, "FromState");
|
|
|
fromstate->isAbstract = UA_FALSE;
|
|
|
fromstate->symmetric = UA_FALSE;
|
|
|
- fromstate->inverseName = UA_LOCALIZEDTEXT_STATIC("ToTransition");
|
|
|
- AddReference((UA_Node*)fromstate, &(UA_ReferenceNode){RefTypeId_HasSubtype, UA_TRUE,
|
|
|
- (UA_ExpandedNodeId){RefTypeId_NonHierarchicalReferences, UA_STRING_NULL, 0}}, ns0);
|
|
|
+ UA_LOCALIZEDTEXT_STATIC(fromstate->inverseName, "ToTransition");
|
|
|
+ ADDINVERSEREFERENCE(fromstate, RefTypeId_HasSubtype, RefTypeId_NonHierarchicalReferences);
|
|
|
Namespace_insert(ns0,(UA_Node**)&fromstate, NAMESPACE_INSERT_UNIQUE);
|
|
|
|
|
|
UA_ReferenceTypeNode *tostate;
|
|
|
UA_ReferenceTypeNode_new(&tostate);
|
|
|
tostate->nodeId = RefTypeId_ToState;
|
|
|
tostate->nodeClass = UA_NODECLASS_REFERENCETYPE;
|
|
|
- tostate->browseName = UA_QUALIFIEDNAME_STATIC("ToState");
|
|
|
- tostate->displayName = UA_LOCALIZEDTEXT_STATIC("ToState");
|
|
|
- tostate->description = UA_LOCALIZEDTEXT_STATIC("ToState");
|
|
|
+ UA_QUALIFIEDNAME_STATIC(tostate->browseName, "ToState");
|
|
|
+ UA_LOCALIZEDTEXT_STATIC(tostate->displayName, "ToState");
|
|
|
+ UA_LOCALIZEDTEXT_STATIC(tostate->description, "ToState");
|
|
|
tostate->isAbstract = UA_FALSE;
|
|
|
tostate->symmetric = UA_FALSE;
|
|
|
- tostate->inverseName = UA_LOCALIZEDTEXT_STATIC("FromTransition");
|
|
|
- AddReference((UA_Node*)tostate, &(UA_ReferenceNode){RefTypeId_HasSubtype, UA_TRUE,
|
|
|
- (UA_ExpandedNodeId){RefTypeId_NonHierarchicalReferences, UA_STRING_NULL, 0}}, ns0);
|
|
|
+ UA_LOCALIZEDTEXT_STATIC(tostate->inverseName, "FromTransition");
|
|
|
+ ADDINVERSEREFERENCE(tostate, RefTypeId_HasSubtype, RefTypeId_NonHierarchicalReferences);
|
|
|
Namespace_insert(ns0,(UA_Node**)&tostate, NAMESPACE_INSERT_UNIQUE);
|
|
|
|
|
|
UA_ReferenceTypeNode *hascause;
|
|
|
UA_ReferenceTypeNode_new(&hascause);
|
|
|
hascause->nodeId = RefTypeId_HasCause;
|
|
|
hascause->nodeClass = UA_NODECLASS_REFERENCETYPE;
|
|
|
- hascause->browseName = UA_QUALIFIEDNAME_STATIC("HasCause");
|
|
|
- hascause->displayName = UA_LOCALIZEDTEXT_STATIC("HasCause");
|
|
|
- hascause->description = UA_LOCALIZEDTEXT_STATIC("HasCause");
|
|
|
+ UA_QUALIFIEDNAME_STATIC(hascause->browseName, "HasCause");
|
|
|
+ UA_LOCALIZEDTEXT_STATIC(hascause->displayName, "HasCause");
|
|
|
+ UA_LOCALIZEDTEXT_STATIC(hascause->description, "HasCause");
|
|
|
hascause->isAbstract = UA_FALSE;
|
|
|
hascause->symmetric = UA_FALSE;
|
|
|
- hascause->inverseName = UA_LOCALIZEDTEXT_STATIC("MayBeCausedBy");
|
|
|
- AddReference((UA_Node*)hascause, &(UA_ReferenceNode){RefTypeId_HasSubtype, UA_TRUE,
|
|
|
- (UA_ExpandedNodeId){RefTypeId_NonHierarchicalReferences, UA_STRING_NULL, 0}}, ns0);
|
|
|
+ UA_LOCALIZEDTEXT_STATIC(hascause->inverseName, "MayBeCausedBy");
|
|
|
+ ADDINVERSEREFERENCE(hascause, RefTypeId_HasSubtype, RefTypeId_NonHierarchicalReferences);
|
|
|
Namespace_insert(ns0,(UA_Node**)&hascause, NAMESPACE_INSERT_UNIQUE);
|
|
|
|
|
|
UA_ReferenceTypeNode *haseffect;
|
|
|
UA_ReferenceTypeNode_new(&haseffect);
|
|
|
haseffect->nodeId = RefTypeId_HasEffect;
|
|
|
haseffect->nodeClass = UA_NODECLASS_REFERENCETYPE;
|
|
|
- haseffect->browseName = UA_QUALIFIEDNAME_STATIC("HasEffect");
|
|
|
- haseffect->displayName = UA_LOCALIZEDTEXT_STATIC("HasEffect");
|
|
|
- haseffect->description = UA_LOCALIZEDTEXT_STATIC("HasEffect");
|
|
|
+ UA_QUALIFIEDNAME_STATIC(haseffect->browseName, "HasEffect");
|
|
|
+ UA_LOCALIZEDTEXT_STATIC(haseffect->displayName, "HasEffect");
|
|
|
+ UA_LOCALIZEDTEXT_STATIC(haseffect->description, "HasEffect");
|
|
|
haseffect->isAbstract = UA_FALSE;
|
|
|
haseffect->symmetric = UA_FALSE;
|
|
|
- haseffect->inverseName = UA_LOCALIZEDTEXT_STATIC("MayBeEffectedBy");
|
|
|
- AddReference((UA_Node*)haseffect, &(UA_ReferenceNode){RefTypeId_HasSubtype, UA_TRUE,
|
|
|
- (UA_ExpandedNodeId){RefTypeId_NonHierarchicalReferences, UA_STRING_NULL, 0}}, ns0);
|
|
|
+ UA_LOCALIZEDTEXT_STATIC(haseffect->inverseName, "MayBeEffectedBy");
|
|
|
+ ADDINVERSEREFERENCE(haseffect, RefTypeId_HasSubtype, RefTypeId_NonHierarchicalReferences);
|
|
|
Namespace_insert(ns0,(UA_Node**)&haseffect, NAMESPACE_INSERT_UNIQUE);
|
|
|
|
|
|
UA_ReferenceTypeNode *hashistoricalconfiguration;
|
|
|
UA_ReferenceTypeNode_new(&hashistoricalconfiguration);
|
|
|
hashistoricalconfiguration->nodeId = RefTypeId_HasHistoricalConfiguration;
|
|
|
hashistoricalconfiguration->nodeClass = UA_NODECLASS_REFERENCETYPE;
|
|
|
- hashistoricalconfiguration->browseName = UA_QUALIFIEDNAME_STATIC("HasHistoricalConfiguration");
|
|
|
- hashistoricalconfiguration->displayName = UA_LOCALIZEDTEXT_STATIC("HasHistoricalConfiguration");
|
|
|
- hashistoricalconfiguration->description = UA_LOCALIZEDTEXT_STATIC("HasHistoricalConfiguration");
|
|
|
+ UA_QUALIFIEDNAME_STATIC(hashistoricalconfiguration->browseName, "HasHistoricalConfiguration");
|
|
|
+ UA_LOCALIZEDTEXT_STATIC(hashistoricalconfiguration->displayName, "HasHistoricalConfiguration");
|
|
|
+ UA_LOCALIZEDTEXT_STATIC(hashistoricalconfiguration->description, "HasHistoricalConfiguration");
|
|
|
hashistoricalconfiguration->isAbstract = UA_FALSE;
|
|
|
hashistoricalconfiguration->symmetric = UA_FALSE;
|
|
|
- hashistoricalconfiguration->inverseName = UA_LOCALIZEDTEXT_STATIC("HistoricalConfigurationOf");
|
|
|
- AddReference((UA_Node*)hashistoricalconfiguration, &(UA_ReferenceNode){RefTypeId_HasSubtype,
|
|
|
- UA_TRUE, (UA_ExpandedNodeId){RefTypeId_Aggregates, UA_STRING_NULL, 0}}, ns0);
|
|
|
+ UA_LOCALIZEDTEXT_STATIC(hashistoricalconfiguration->inverseName, "HistoricalConfigurationOf");
|
|
|
+ ADDINVERSEREFERENCE(hashistoricalconfiguration, RefTypeId_HasSubtype, RefTypeId_Aggregates);
|
|
|
Namespace_insert(ns0,(UA_Node**)&hashistoricalconfiguration, NAMESPACE_INSERT_UNIQUE);
|
|
|
|
|
|
|
|
|
|
|
|
- UA_ExpandedNodeId ObjTypeId_FolderType = NS0EXPANDEDNODEID(61);
|
|
|
+ UA_ExpandedNodeId ObjTypeId_FolderType; NS0EXPANDEDNODEID(ObjTypeId_FolderType, 61);
|
|
|
|
|
|
|
|
|
- UA_ExpandedNodeId ObjId_ObjectsFolder = NS0EXPANDEDNODEID(85);
|
|
|
- UA_ExpandedNodeId ObjId_TypesFolder = NS0EXPANDEDNODEID(86);
|
|
|
- UA_ExpandedNodeId ObjId_ViewsFolder = NS0EXPANDEDNODEID(87);
|
|
|
- UA_ExpandedNodeId ObjId_Server = NS0EXPANDEDNODEID(2253);
|
|
|
- UA_ExpandedNodeId ObjId_ServerArray = NS0EXPANDEDNODEID(2254);
|
|
|
- UA_ExpandedNodeId ObjId_NamespaceArray = NS0EXPANDEDNODEID(2255);
|
|
|
- UA_ExpandedNodeId ObjId_ServerStatus = NS0EXPANDEDNODEID(2256);
|
|
|
- UA_ExpandedNodeId ObjId_ServerCapabilities = NS0EXPANDEDNODEID(2268);
|
|
|
- UA_ExpandedNodeId ObjId_State = NS0EXPANDEDNODEID(2259);
|
|
|
+ UA_ExpandedNodeId ObjId_ObjectsFolder; NS0EXPANDEDNODEID(ObjId_ObjectsFolder, 85);
|
|
|
+ UA_ExpandedNodeId ObjId_TypesFolder; NS0EXPANDEDNODEID(ObjId_TypesFolder, 86);
|
|
|
+ UA_ExpandedNodeId ObjId_ViewsFolder; NS0EXPANDEDNODEID(ObjId_ViewsFolder, 87);
|
|
|
+ UA_ExpandedNodeId ObjId_Server; NS0EXPANDEDNODEID(ObjId_Server, 2253);
|
|
|
+ UA_ExpandedNodeId ObjId_ServerArray; NS0EXPANDEDNODEID(ObjId_ServerArray, 2254);
|
|
|
+ UA_ExpandedNodeId ObjId_NamespaceArray; NS0EXPANDEDNODEID(ObjId_NamespaceArray, 2255);
|
|
|
+ UA_ExpandedNodeId ObjId_ServerStatus; NS0EXPANDEDNODEID(ObjId_ServerStatus, 2256);
|
|
|
+ UA_ExpandedNodeId ObjId_ServerCapabilities; NS0EXPANDEDNODEID(ObjId_ServerCapabilities, 2268);
|
|
|
+ UA_ExpandedNodeId ObjId_State; NS0EXPANDEDNODEID(ObjId_State, 2259);
|
|
|
|
|
|
|
|
|
UA_ObjectNode *folderType;
|
|
|
UA_ObjectNode_new(&folderType);
|
|
|
folderType->nodeId = NS0NODEID(61);
|
|
|
folderType->nodeClass = UA_NODECLASS_OBJECTTYPE;
|
|
|
- folderType->browseName = UA_QUALIFIEDNAME_STATIC("FolderType");
|
|
|
- folderType->displayName = UA_LOCALIZEDTEXT_STATIC("FolderType");
|
|
|
- folderType->description = UA_LOCALIZEDTEXT_STATIC("FolderType");
|
|
|
+ UA_QUALIFIEDNAME_STATIC(folderType->browseName, "FolderType");
|
|
|
+ UA_LOCALIZEDTEXT_STATIC(folderType->displayName, "FolderType");
|
|
|
+ UA_LOCALIZEDTEXT_STATIC(folderType->description, "FolderType");
|
|
|
Namespace_insert(ns0,(UA_Node**)&folderType, 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_ObjectNode *root;
|
|
|
UA_ObjectNode_new(&root);
|
|
|
root->nodeId = NS0NODEID(84);
|
|
|
root->nodeClass = UA_NODECLASS_OBJECT;
|
|
|
- root->browseName = UA_QUALIFIEDNAME_STATIC("Root");
|
|
|
- root->displayName = UA_LOCALIZEDTEXT_STATIC("Root");
|
|
|
- root->description = UA_LOCALIZEDTEXT_STATIC("Root");
|
|
|
- AddReference((UA_Node*)root, &(UA_ReferenceNode){RefTypeId_HasTypeDefinition, UA_FALSE, ObjTypeId_FolderType}, ns0);
|
|
|
- AddReference((UA_Node*)root, &(UA_ReferenceNode){RefTypeId_Organizes, UA_FALSE, ObjId_ObjectsFolder}, ns0);
|
|
|
- AddReference((UA_Node*)root, &(UA_ReferenceNode){RefTypeId_Organizes, UA_FALSE, ObjId_TypesFolder}, ns0);
|
|
|
- AddReference((UA_Node*)root, &(UA_ReferenceNode){RefTypeId_Organizes, UA_FALSE, ObjId_ViewsFolder}, ns0);
|
|
|
+ UA_QUALIFIEDNAME_STATIC(root->browseName, "Root");
|
|
|
+ UA_LOCALIZEDTEXT_STATIC(root->displayName, "Root");
|
|
|
+ UA_LOCALIZEDTEXT_STATIC(root->description, "Root");
|
|
|
+ ADDREFERENCE(root, RefTypeId_HasTypeDefinition, UA_FALSE, ObjTypeId_FolderType);
|
|
|
+ ADDREFERENCE(root, RefTypeId_Organizes, UA_FALSE, ObjId_ObjectsFolder);
|
|
|
+ ADDREFERENCE(root, RefTypeId_Organizes, UA_FALSE, ObjId_TypesFolder);
|
|
|
+ ADDREFERENCE(root, RefTypeId_Organizes, UA_FALSE, ObjId_ViewsFolder);
|
|
|
|
|
|
Namespace_insert(ns0,(UA_Node**)&root, NAMESPACE_INSERT_UNIQUE | NAMESPACE_INSERT_GETMANAGED);
|
|
|
|
|
@@ -433,11 +429,11 @@ void appMockup_init() {
|
|
|
UA_ObjectNode_new(&objects);
|
|
|
objects->nodeId = ObjId_ObjectsFolder.nodeId;
|
|
|
objects->nodeClass = UA_NODECLASS_OBJECT;
|
|
|
- objects->browseName = UA_QUALIFIEDNAME_STATIC("Objects");
|
|
|
- objects->displayName = UA_LOCALIZEDTEXT_STATIC("Objects");
|
|
|
- objects->description = UA_LOCALIZEDTEXT_STATIC("Objects");
|
|
|
- AddReference((UA_Node*)objects, &(UA_ReferenceNode){RefTypeId_HasTypeDefinition, UA_FALSE, ObjTypeId_FolderType}, ns0);
|
|
|
- AddReference((UA_Node*)objects, &(UA_ReferenceNode){RefTypeId_Organizes, UA_FALSE, ObjId_Server}, ns0);
|
|
|
+ UA_QUALIFIEDNAME_STATIC(objects->browseName, "Objects");
|
|
|
+ UA_LOCALIZEDTEXT_STATIC(objects->displayName, "Objects");
|
|
|
+ UA_LOCALIZEDTEXT_STATIC(objects->description, "Objects");
|
|
|
+ ADDREFERENCE(objects, RefTypeId_HasTypeDefinition, UA_FALSE, ObjTypeId_FolderType);
|
|
|
+ ADDREFERENCE(objects, RefTypeId_Organizes, UA_FALSE, ObjId_Server);
|
|
|
Namespace_insert(ns0,(UA_Node**)&objects, NAMESPACE_INSERT_UNIQUE);
|
|
|
|
|
|
|
|
@@ -445,10 +441,10 @@ void appMockup_init() {
|
|
|
UA_ObjectNode_new(&types);
|
|
|
types->nodeId = ObjId_TypesFolder.nodeId;
|
|
|
types->nodeClass = UA_NODECLASS_OBJECT;
|
|
|
- types->browseName = UA_QUALIFIEDNAME_STATIC("Types");
|
|
|
- types->displayName = UA_LOCALIZEDTEXT_STATIC("Types");
|
|
|
- types->description = UA_LOCALIZEDTEXT_STATIC("Types");
|
|
|
- AddReference((UA_Node*)types, &(UA_ReferenceNode){RefTypeId_HasTypeDefinition, UA_FALSE, ObjTypeId_FolderType}, ns0);
|
|
|
+ UA_QUALIFIEDNAME_STATIC(types->browseName, "Types");
|
|
|
+ UA_LOCALIZEDTEXT_STATIC(types->displayName, "Types");
|
|
|
+ UA_LOCALIZEDTEXT_STATIC(types->description, "Types");
|
|
|
+ ADDREFERENCE(types, RefTypeId_HasTypeDefinition, UA_FALSE, ObjTypeId_FolderType);
|
|
|
Namespace_insert(ns0,(UA_Node**)&types, NAMESPACE_INSERT_UNIQUE);
|
|
|
|
|
|
|
|
@@ -456,10 +452,10 @@ void appMockup_init() {
|
|
|
UA_ObjectNode_new(&views);
|
|
|
views->nodeId = ObjId_ViewsFolder.nodeId;
|
|
|
views->nodeClass = UA_NODECLASS_OBJECT;
|
|
|
- views->browseName = UA_QUALIFIEDNAME_STATIC("Views");
|
|
|
- views->displayName = UA_LOCALIZEDTEXT_STATIC("Views");
|
|
|
- views->description = UA_LOCALIZEDTEXT_STATIC("Views");
|
|
|
- AddReference((UA_Node*)views, &(UA_ReferenceNode){RefTypeId_HasTypeDefinition, UA_FALSE, ObjTypeId_FolderType}, ns0);
|
|
|
+ UA_QUALIFIEDNAME_STATIC(views->browseName, "Views");
|
|
|
+ UA_LOCALIZEDTEXT_STATIC(views->displayName, "Views");
|
|
|
+ UA_LOCALIZEDTEXT_STATIC(views->description, "Views");
|
|
|
+ ADDREFERENCE(views, RefTypeId_HasTypeDefinition, UA_FALSE, ObjTypeId_FolderType);
|
|
|
Namespace_insert(ns0,(UA_Node**)&views, NAMESPACE_INSERT_UNIQUE);
|
|
|
|
|
|
|
|
@@ -467,13 +463,13 @@ void appMockup_init() {
|
|
|
UA_ObjectNode_new(&server);
|
|
|
server->nodeId = ObjId_Server.nodeId;
|
|
|
server->nodeClass = UA_NODECLASS_OBJECT;
|
|
|
- server->browseName = UA_QUALIFIEDNAME_STATIC("Server");
|
|
|
- server->displayName = UA_LOCALIZEDTEXT_STATIC("Server");
|
|
|
- server->description = UA_LOCALIZEDTEXT_STATIC("Server");
|
|
|
- AddReference((UA_Node*)server, &(UA_ReferenceNode){RefTypeId_HasComponent, UA_FALSE, ObjId_ServerCapabilities}, ns0);
|
|
|
- AddReference((UA_Node*)server, &(UA_ReferenceNode){RefTypeId_HasComponent, UA_FALSE, ObjId_NamespaceArray}, ns0);
|
|
|
- AddReference((UA_Node*)server, &(UA_ReferenceNode){RefTypeId_HasProperty, UA_FALSE, ObjId_ServerStatus}, ns0);
|
|
|
- AddReference((UA_Node*)server, &(UA_ReferenceNode){RefTypeId_HasProperty, UA_FALSE, ObjId_ServerArray}, ns0);
|
|
|
+ UA_QUALIFIEDNAME_STATIC(server->browseName, "Server");
|
|
|
+ UA_LOCALIZEDTEXT_STATIC(server->displayName, "Server");
|
|
|
+ UA_LOCALIZEDTEXT_STATIC(server->description, "Server");
|
|
|
+ ADDREFERENCE(server, RefTypeId_HasComponent, UA_FALSE, ObjId_ServerCapabilities);
|
|
|
+ ADDREFERENCE(server, RefTypeId_HasComponent, UA_FALSE, ObjId_NamespaceArray);
|
|
|
+ ADDREFERENCE(server, RefTypeId_HasProperty, UA_FALSE, ObjId_ServerStatus);
|
|
|
+ ADDREFERENCE(server, RefTypeId_HasProperty, UA_FALSE, ObjId_ServerArray);
|
|
|
Namespace_insert(ns0,(UA_Node**)&server, NAMESPACE_INSERT_UNIQUE);
|
|
|
|
|
|
|
|
@@ -481,9 +477,9 @@ void appMockup_init() {
|
|
|
UA_VariableNode_new(&namespaceArray);
|
|
|
namespaceArray->nodeId = ObjId_NamespaceArray.nodeId;
|
|
|
namespaceArray->nodeClass = UA_NODECLASS_VARIABLE;
|
|
|
- namespaceArray->browseName = UA_QUALIFIEDNAME_STATIC("NamespaceArray");
|
|
|
- namespaceArray->displayName = UA_LOCALIZEDTEXT_STATIC("NamespaceArray");
|
|
|
- namespaceArray->description = UA_LOCALIZEDTEXT_STATIC("NamespaceArray");
|
|
|
+ UA_QUALIFIEDNAME_STATIC(namespaceArray->browseName, "NamespaceArray");
|
|
|
+ UA_LOCALIZEDTEXT_STATIC(namespaceArray->displayName, "NamespaceArray");
|
|
|
+ UA_LOCALIZEDTEXT_STATIC(namespaceArray->description, "NamespaceArray");
|
|
|
UA_Array_new((void**)&namespaceArray->value.data, 2, &UA_.types[UA_STRING]);
|
|
|
namespaceArray->value.vt = &UA_.types[UA_STRING];
|
|
|
namespaceArray->value.arrayLength = 2;
|
|
@@ -505,23 +501,22 @@ void appMockup_init() {
|
|
|
UA_VariableNode_new(&serverstatus);
|
|
|
serverstatus->nodeId = ObjId_ServerStatus.nodeId;
|
|
|
serverstatus->nodeClass = UA_NODECLASS_VARIABLE;
|
|
|
- serverstatus->browseName = UA_QUALIFIEDNAME_STATIC("ServerStatus");
|
|
|
- serverstatus->displayName = UA_LOCALIZEDTEXT_STATIC("ServerStatus");
|
|
|
- serverstatus->description = UA_LOCALIZEDTEXT_STATIC("ServerStatus");
|
|
|
+ UA_QUALIFIEDNAME_STATIC(serverstatus->browseName, "ServerStatus");
|
|
|
+ UA_LOCALIZEDTEXT_STATIC(serverstatus->displayName, "ServerStatus");
|
|
|
+ UA_LOCALIZEDTEXT_STATIC(serverstatus->description, "ServerStatus");
|
|
|
UA_ServerStatusDataType *status;
|
|
|
UA_ServerStatusDataType_new(&status);
|
|
|
status->startTime = UA_DateTime_now();
|
|
|
status->currentTime = UA_DateTime_now();
|
|
|
status->state = UA_SERVERSTATE_RUNNING;
|
|
|
- status->buildInfo = (UA_BuildInfo){
|
|
|
- .productUri = UA_STRING_STATIC("open62541.org"),
|
|
|
- .manufacturerName = UA_STRING_STATIC("open62541"),
|
|
|
- .productName = UA_STRING_STATIC("open62541"),
|
|
|
- .softwareVersion = UA_STRING_STATIC("0.0"),
|
|
|
- .buildNumber = UA_STRING_STATIC("0.0"),
|
|
|
- .buildDate = UA_DateTime_now()};
|
|
|
+ UA_STRING_STATIC(status->buildInfo.productUri, "open62541.org");
|
|
|
+ UA_STRING_STATIC(status->buildInfo.manufacturerName, "open62541");
|
|
|
+ UA_STRING_STATIC(status->buildInfo.productName, "open62541");
|
|
|
+ UA_STRING_STATIC(status->buildInfo.softwareVersion, "0.0");
|
|
|
+ UA_STRING_STATIC(status->buildInfo.buildNumber, "0.0");
|
|
|
+ status->buildInfo.buildDate = UA_DateTime_now();
|
|
|
status->secondsTillShutdown = 99999999;
|
|
|
- status->shutdownReason = UA_LOCALIZEDTEXT_STATIC("because");
|
|
|
+ UA_LOCALIZEDTEXT_STATIC(status->shutdownReason, "because");
|
|
|
serverstatus->value.vt = &UA_.types[UA_SERVERSTATUSDATATYPE];
|
|
|
serverstatus->value.arrayLength = 1;
|
|
|
serverstatus->value.data = status;
|
|
@@ -532,9 +527,9 @@ void appMockup_init() {
|
|
|
UA_VariableNode_new(&state);
|
|
|
state->nodeId = ObjId_State.nodeId;
|
|
|
state->nodeClass = UA_NODECLASS_VARIABLE;
|
|
|
- state->browseName = UA_QUALIFIEDNAME_STATIC("State");
|
|
|
- state->displayName = UA_LOCALIZEDTEXT_STATIC("State");
|
|
|
- state->description = UA_LOCALIZEDTEXT_STATIC("State");
|
|
|
+ UA_QUALIFIEDNAME_STATIC(state->browseName, "State");
|
|
|
+ UA_LOCALIZEDTEXT_STATIC(state->displayName, "State");
|
|
|
+ UA_LOCALIZEDTEXT_STATIC(state->description, "State");
|
|
|
state->value.vt = &UA_borrowed_.types[UA_SERVERSTATE];
|
|
|
state->value.arrayLength = 1;
|
|
|
state->value.data = &status->state;
|
|
@@ -559,82 +554,6 @@ void appMockup_init() {
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
- UA_ExpandedNodeId ObjId_temperature1 = (UA_ExpandedNodeId){.nodeId = (UA_NodeId){.encodingByte = UA_NODEIDTYPE_TWOBYTE, .namespace = 0, .identifier.numeric = 108}, .namespaceUri = {-1, ((void *)0)}, .serverIndex = 0};
|
|
|
-
|
|
|
-
|
|
|
- UA_VariableNode *temperature1;
|
|
|
- UA_VariableNode_new(&temperature1);
|
|
|
- temperature1->nodeId = ObjId_temperature1.nodeId;
|
|
|
- temperature1->nodeClass = UA_NODECLASS_VARIABLE;
|
|
|
- temperature1->browseName = UA_QUALIFIEDNAME_STATIC("temperature1");
|
|
|
- temperature1->displayName = UA_LOCALIZEDTEXT_STATIC("temperature1");
|
|
|
- temperature1->description = UA_LOCALIZEDTEXT_STATIC("temperature1");
|
|
|
-
|
|
|
-
|
|
|
- UA_Variant *tmpNodeValue = &temperature1->value;
|
|
|
- UA_Variant_init(tmpNodeValue);
|
|
|
- UA_Float *tmpFloat;
|
|
|
- UA_Float_new(&tmpFloat);
|
|
|
- *tmpFloat = -273.15f;
|
|
|
- tmpNodeValue->arrayDimensionsLength = 0;
|
|
|
- tmpNodeValue->arrayLength = 1;
|
|
|
- tmpNodeValue->data = (void*)tmpFloat;
|
|
|
- tmpNodeValue->vt = &UA_.types[UA_FLOAT];
|
|
|
-
|
|
|
- AddReference((UA_Node*)root, &(UA_ReferenceNode){RefTypeId_Organizes, UA_FALSE, ObjId_temperature1}, ns0);
|
|
|
- Namespace_insert(ns0,(UA_Node**)&temperature1, NAMESPACE_INSERT_UNIQUE);
|
|
|
-
|
|
|
-
|
|
|
- UA_ExpandedNodeId ObjId_redLED = (UA_ExpandedNodeId){.nodeId = (UA_NodeId){.encodingByte = UA_NODEIDTYPE_TWOBYTE, .namespace = 0, .identifier.numeric = 109}, .namespaceUri = {-1, ((void *)0)}, .serverIndex = 0};
|
|
|
-
|
|
|
- UA_VariableNode *redLED;
|
|
|
- UA_VariableNode_new(&redLED);
|
|
|
- redLED->nodeId = ObjId_redLED.nodeId;
|
|
|
- redLED->nodeClass = UA_NODECLASS_VARIABLE;
|
|
|
- redLED->browseName = UA_QUALIFIEDNAME_STATIC("redLED");
|
|
|
- redLED->displayName = UA_LOCALIZEDTEXT_STATIC("redLED");
|
|
|
- redLED->description = UA_LOCALIZEDTEXT_STATIC("redLED");
|
|
|
-
|
|
|
-
|
|
|
- UA_Variant *tmpNodeValue1 = &redLED->value;
|
|
|
- UA_Variant_init(tmpNodeValue1);
|
|
|
- UA_Boolean *ledVal;
|
|
|
- UA_Boolean_new(&ledVal);
|
|
|
- *ledVal = UA_FALSE;
|
|
|
- tmpNodeValue1->arrayDimensionsLength = 0;
|
|
|
- tmpNodeValue1->arrayLength = 1;
|
|
|
- tmpNodeValue1->data = (void*)ledVal;
|
|
|
- tmpNodeValue1->vt = &UA_.types[UA_BOOLEAN];
|
|
|
-
|
|
|
- AddReference((UA_Node*)root, &(UA_ReferenceNode){RefTypeId_Organizes, UA_FALSE, ObjId_redLED}, ns0);
|
|
|
- Namespace_insert(ns0,(UA_Node**)&redLED, NAMESPACE_INSERT_UNIQUE);
|
|
|
-
|
|
|
-
|
|
|
- UA_ExpandedNodeId ObjId_yellowLED = (UA_ExpandedNodeId){.nodeId = (UA_NodeId){.encodingByte = UA_NODEIDTYPE_TWOBYTE, .namespace = 0, .identifier.numeric = 110}, .namespaceUri = {-1, ((void *)0)}, .serverIndex = 0};
|
|
|
-
|
|
|
- UA_VariableNode *yellowLED;
|
|
|
- UA_VariableNode_new(&yellowLED);
|
|
|
- yellowLED->nodeId = ObjId_yellowLED.nodeId;
|
|
|
- yellowLED->nodeClass = UA_NODECLASS_VARIABLE;
|
|
|
- yellowLED->browseName = UA_QUALIFIEDNAME_STATIC("yellowLED");
|
|
|
- yellowLED->displayName = UA_LOCALIZEDTEXT_STATIC("yellowLED");
|
|
|
- yellowLED->description = UA_LOCALIZEDTEXT_STATIC("yellowLED");
|
|
|
-
|
|
|
-
|
|
|
- UA_Variant *tmpNodeValue2 = &yellowLED->value;
|
|
|
- UA_Variant_init(tmpNodeValue2);
|
|
|
- UA_Boolean *ledVal1;
|
|
|
- UA_Boolean_new(&ledVal1);
|
|
|
- *ledVal1 = UA_FALSE;
|
|
|
- tmpNodeValue2->arrayDimensionsLength = 0;
|
|
|
- tmpNodeValue2->arrayLength = 1;
|
|
|
- tmpNodeValue2->data = (void*)ledVal1;
|
|
|
- tmpNodeValue2->vt = &UA_.types[UA_BOOLEAN];
|
|
|
-
|
|
|
- AddReference((UA_Node*)root, &(UA_ReferenceNode){RefTypeId_Organizes, UA_FALSE, ObjId_yellowLED}, ns0);
|
|
|
- Namespace_insert(ns0,(UA_Node**)&yellowLED, NAMESPACE_INSERT_UNIQUE);
|
|
|
|
|
|
Namespace_releaseManagedNode((const UA_Node*)root);
|
|
|
|