TestModel created using UaModeler and compiled into XML and afterwards into C code

This commit is contained in:
Hottgenroth
2016-06-07 14:54:24 +02:00
parent 29da8433c0
commit 5b272aa5d7
6 changed files with 443 additions and 0 deletions

185
TestModel.c Normal file
View File

@ -0,0 +1,185 @@
/* WARNING: This is a generated file.
* Any manual changes will be overwritten.
*/
#include "TestModel.h"
UA_INLINE void TestModel(UA_Server *server) {
UA_Server_addNamespace(server, "http://krohnegroup.com/TestModel/Types.xsd");
do {
// Node: opcua_node_objectType_t(ns=2;i=1002), 1:TemperatureSensorType
UA_ObjectTypeNode *opcua_node_objecttype_t_ns_2_i_1002 = UA_NodeStore_newObjectTypeNode();
opcua_node_objecttype_t_ns_2_i_1002->browseName = UA_QUALIFIEDNAME_ALLOC(1, "TemperatureSensorType");
opcua_node_objecttype_t_ns_2_i_1002->displayName = UA_LOCALIZEDTEXT_ALLOC("en_US", "TemperatureSensorType");
opcua_node_objecttype_t_ns_2_i_1002->description = UA_LOCALIZEDTEXT_ALLOC("en_US", "");
opcua_node_objecttype_t_ns_2_i_1002->nodeId.namespaceIndex = 2;
opcua_node_objecttype_t_ns_2_i_1002->nodeId.identifier.numeric = 1002;
// Parent node does not exist yet. This node will be bootstrapped and linked later.
UA_RCU_LOCK();
UA_NodeStore_insert(server->nodestore, (UA_Node*) opcua_node_objecttype_t_ns_2_i_1002);
UA_RCU_UNLOCK();
} while(0);
do {
// Node: opcua_node_object_t(ns=2;i=5001), 1:Configuration
UA_ObjectNode *opcua_node_object_t_ns_2_i_5001 = UA_NodeStore_newObjectNode();
opcua_node_object_t_ns_2_i_5001->browseName = UA_QUALIFIEDNAME_ALLOC(1, "Configuration");
opcua_node_object_t_ns_2_i_5001->displayName = UA_LOCALIZEDTEXT_ALLOC("en_US", "Configuration");
opcua_node_object_t_ns_2_i_5001->description = UA_LOCALIZEDTEXT_ALLOC("en_US", "");
opcua_node_object_t_ns_2_i_5001->nodeId.namespaceIndex = 2;
opcua_node_object_t_ns_2_i_5001->nodeId.identifier.numeric = 5001;
opcua_node_object_t_ns_2_i_5001->eventNotifier = (UA_Byte) 0;
// Parent node does not exist yet. This node will be bootstrapped and linked later.
UA_RCU_LOCK();
UA_NodeStore_insert(server->nodestore, (UA_Node*) opcua_node_object_t_ns_2_i_5001);
UA_RCU_UNLOCK();
} while(0);
do {
UA_Variant *opcua_node_variable_t_ns_2_i_6001_variant = UA_alloca(sizeof(UA_Variant));
UA_Variant_init(opcua_node_variable_t_ns_2_i_6001_variant);
// Node: opcua_node_variable_t(ns=2;i=6001), 1:EngineeringUnit
UA_VariableNode *opcua_node_variable_t_ns_2_i_6001 = UA_NodeStore_newVariableNode();
opcua_node_variable_t_ns_2_i_6001->browseName = UA_QUALIFIEDNAME_ALLOC(1, "EngineeringUnit");
opcua_node_variable_t_ns_2_i_6001->displayName = UA_LOCALIZEDTEXT_ALLOC("en_US", "EngineeringUnit");
opcua_node_variable_t_ns_2_i_6001->description = UA_LOCALIZEDTEXT_ALLOC("en_US", "");
opcua_node_variable_t_ns_2_i_6001->nodeId.namespaceIndex = 2;
opcua_node_variable_t_ns_2_i_6001->nodeId.identifier.numeric = 6001;
opcua_node_variable_t_ns_2_i_6001->minimumSamplingInterval = (UA_Double) 0.0;
opcua_node_variable_t_ns_2_i_6001->userAccessLevel = (UA_Int32) 3;
opcua_node_variable_t_ns_2_i_6001->accessLevel = (UA_Int32) 3;
opcua_node_variable_t_ns_2_i_6001->valueRank = (UA_Int32) -1;
opcua_node_variable_t_ns_2_i_6001->value.variant.value = *opcua_node_variable_t_ns_2_i_6001_variant;
opcua_node_variable_t_ns_2_i_6001->valueSource = UA_VALUESOURCE_VARIANT;
// Parent node does not exist yet. This node will be bootstrapped and linked later.
UA_RCU_LOCK();
UA_NodeStore_insert(server->nodestore, (UA_Node*) opcua_node_variable_t_ns_2_i_6001);
UA_RCU_UNLOCK();
} while(0);
do {
// Node: opcua_node_object_t(ns=2;i=5002), 1:Measurement
UA_ObjectNode *opcua_node_object_t_ns_2_i_5002 = UA_NodeStore_newObjectNode();
opcua_node_object_t_ns_2_i_5002->browseName = UA_QUALIFIEDNAME_ALLOC(1, "Measurement");
opcua_node_object_t_ns_2_i_5002->displayName = UA_LOCALIZEDTEXT_ALLOC("en_US", "Measurement");
opcua_node_object_t_ns_2_i_5002->description = UA_LOCALIZEDTEXT_ALLOC("en_US", "");
opcua_node_object_t_ns_2_i_5002->nodeId.namespaceIndex = 2;
opcua_node_object_t_ns_2_i_5002->nodeId.identifier.numeric = 5002;
opcua_node_object_t_ns_2_i_5002->eventNotifier = (UA_Byte) 0;
// Parent node does not exist yet. This node will be bootstrapped and linked later.
UA_RCU_LOCK();
UA_NodeStore_insert(server->nodestore, (UA_Node*) opcua_node_object_t_ns_2_i_5002);
UA_RCU_UNLOCK();
} while(0);
do {
UA_Variant *opcua_node_variable_t_ns_2_i_6002_variant = UA_alloca(sizeof(UA_Variant));
UA_Variant_init(opcua_node_variable_t_ns_2_i_6002_variant);
// Node: opcua_node_variable_t(ns=2;i=6002), 1:Temperature
UA_VariableNode *opcua_node_variable_t_ns_2_i_6002 = UA_NodeStore_newVariableNode();
opcua_node_variable_t_ns_2_i_6002->browseName = UA_QUALIFIEDNAME_ALLOC(1, "Temperature");
opcua_node_variable_t_ns_2_i_6002->displayName = UA_LOCALIZEDTEXT_ALLOC("en_US", "Temperature");
opcua_node_variable_t_ns_2_i_6002->description = UA_LOCALIZEDTEXT_ALLOC("en_US", "");
opcua_node_variable_t_ns_2_i_6002->nodeId.namespaceIndex = 2;
opcua_node_variable_t_ns_2_i_6002->nodeId.identifier.numeric = 6002;
opcua_node_variable_t_ns_2_i_6002->minimumSamplingInterval = (UA_Double) 0.0;
opcua_node_variable_t_ns_2_i_6002->userAccessLevel = (UA_Int32) 3;
opcua_node_variable_t_ns_2_i_6002->accessLevel = (UA_Int32) 3;
opcua_node_variable_t_ns_2_i_6002->valueRank = (UA_Int32) -1;
opcua_node_variable_t_ns_2_i_6002->value.variant.value = *opcua_node_variable_t_ns_2_i_6002_variant;
opcua_node_variable_t_ns_2_i_6002->valueSource = UA_VALUESOURCE_VARIANT;
// Parent node does not exist yet. This node will be bootstrapped and linked later.
UA_RCU_LOCK();
UA_NodeStore_insert(server->nodestore, (UA_Node*) opcua_node_variable_t_ns_2_i_6002);
UA_RCU_UNLOCK();
} while(0);
do {
// Node: opcua_node_object_t(ns=2;i=5004), 1:TemperatureSensor
UA_ObjectNode *opcua_node_object_t_ns_2_i_5004 = UA_NodeStore_newObjectNode();
opcua_node_object_t_ns_2_i_5004->browseName = UA_QUALIFIEDNAME_ALLOC(1, "TemperatureSensor");
opcua_node_object_t_ns_2_i_5004->displayName = UA_LOCALIZEDTEXT_ALLOC("en_US", "TemperatureSensor");
opcua_node_object_t_ns_2_i_5004->description = UA_LOCALIZEDTEXT_ALLOC("en_US", "");
opcua_node_object_t_ns_2_i_5004->nodeId.namespaceIndex = 2;
opcua_node_object_t_ns_2_i_5004->nodeId.identifier.numeric = 5004;
opcua_node_object_t_ns_2_i_5004->eventNotifier = (UA_Byte) 0;
// Parent node does not exist yet. This node will be bootstrapped and linked later.
UA_RCU_LOCK();
UA_NodeStore_insert(server->nodestore, (UA_Node*) opcua_node_object_t_ns_2_i_5004);
UA_RCU_UNLOCK();
} while(0);
do {
// Node: opcua_node_object_t(ns=2;i=5003), 1:Configuration
UA_ObjectNode *opcua_node_object_t_ns_2_i_5003 = UA_NodeStore_newObjectNode();
opcua_node_object_t_ns_2_i_5003->browseName = UA_QUALIFIEDNAME_ALLOC(1, "Configuration");
opcua_node_object_t_ns_2_i_5003->displayName = UA_LOCALIZEDTEXT_ALLOC("en_US", "Configuration");
opcua_node_object_t_ns_2_i_5003->description = UA_LOCALIZEDTEXT_ALLOC("en_US", "");
opcua_node_object_t_ns_2_i_5003->nodeId.namespaceIndex = 2;
opcua_node_object_t_ns_2_i_5003->nodeId.identifier.numeric = 5003;
opcua_node_object_t_ns_2_i_5003->eventNotifier = (UA_Byte) 0;
// Parent node does not exist yet. This node will be bootstrapped and linked later.
UA_RCU_LOCK();
UA_NodeStore_insert(server->nodestore, (UA_Node*) opcua_node_object_t_ns_2_i_5003);
UA_RCU_UNLOCK();
} while(0);
do {
UA_Variant *opcua_node_variable_t_ns_2_i_6003_variant = UA_alloca(sizeof(UA_Variant));
UA_Variant_init(opcua_node_variable_t_ns_2_i_6003_variant);
// Node: opcua_node_variable_t(ns=2;i=6003), 1:EngineeringUnit
UA_VariableNode *opcua_node_variable_t_ns_2_i_6003 = UA_NodeStore_newVariableNode();
opcua_node_variable_t_ns_2_i_6003->browseName = UA_QUALIFIEDNAME_ALLOC(1, "EngineeringUnit");
opcua_node_variable_t_ns_2_i_6003->displayName = UA_LOCALIZEDTEXT_ALLOC("en_US", "EngineeringUnit");
opcua_node_variable_t_ns_2_i_6003->description = UA_LOCALIZEDTEXT_ALLOC("en_US", "");
opcua_node_variable_t_ns_2_i_6003->nodeId.namespaceIndex = 2;
opcua_node_variable_t_ns_2_i_6003->nodeId.identifier.numeric = 6003;
opcua_node_variable_t_ns_2_i_6003->minimumSamplingInterval = (UA_Double) 0.0;
opcua_node_variable_t_ns_2_i_6003->userAccessLevel = (UA_Int32) 3;
opcua_node_variable_t_ns_2_i_6003->accessLevel = (UA_Int32) 3;
opcua_node_variable_t_ns_2_i_6003->valueRank = (UA_Int32) -1;
opcua_node_variable_t_ns_2_i_6003->value.variant.value = *opcua_node_variable_t_ns_2_i_6003_variant;
opcua_node_variable_t_ns_2_i_6003->valueSource = UA_VALUESOURCE_VARIANT;
// Parent node does not exist yet. This node will be bootstrapped and linked later.
UA_RCU_LOCK();
UA_NodeStore_insert(server->nodestore, (UA_Node*) opcua_node_variable_t_ns_2_i_6003);
UA_RCU_UNLOCK();
} while(0);
do {
// Node: opcua_node_object_t(ns=2;i=5005), 1:Measurement
UA_ObjectNode *opcua_node_object_t_ns_2_i_5005 = UA_NodeStore_newObjectNode();
opcua_node_object_t_ns_2_i_5005->browseName = UA_QUALIFIEDNAME_ALLOC(1, "Measurement");
opcua_node_object_t_ns_2_i_5005->displayName = UA_LOCALIZEDTEXT_ALLOC("en_US", "Measurement");
opcua_node_object_t_ns_2_i_5005->description = UA_LOCALIZEDTEXT_ALLOC("en_US", "");
opcua_node_object_t_ns_2_i_5005->nodeId.namespaceIndex = 2;
opcua_node_object_t_ns_2_i_5005->nodeId.identifier.numeric = 5005;
opcua_node_object_t_ns_2_i_5005->eventNotifier = (UA_Byte) 0;
// Parent node does not exist yet. This node will be bootstrapped and linked later.
UA_RCU_LOCK();
UA_NodeStore_insert(server->nodestore, (UA_Node*) opcua_node_object_t_ns_2_i_5005);
UA_RCU_UNLOCK();
} while(0);
do {
UA_Variant *opcua_node_variable_t_ns_2_i_6004_variant = UA_alloca(sizeof(UA_Variant));
UA_Variant_init(opcua_node_variable_t_ns_2_i_6004_variant);
// Node: opcua_node_variable_t(ns=2;i=6004), 1:Temperature
UA_VariableNode *opcua_node_variable_t_ns_2_i_6004 = UA_NodeStore_newVariableNode();
opcua_node_variable_t_ns_2_i_6004->browseName = UA_QUALIFIEDNAME_ALLOC(1, "Temperature");
opcua_node_variable_t_ns_2_i_6004->displayName = UA_LOCALIZEDTEXT_ALLOC("en_US", "Temperature");
opcua_node_variable_t_ns_2_i_6004->description = UA_LOCALIZEDTEXT_ALLOC("en_US", "");
opcua_node_variable_t_ns_2_i_6004->nodeId.namespaceIndex = 2;
opcua_node_variable_t_ns_2_i_6004->nodeId.identifier.numeric = 6004;
opcua_node_variable_t_ns_2_i_6004->minimumSamplingInterval = (UA_Double) 0.0;
opcua_node_variable_t_ns_2_i_6004->userAccessLevel = (UA_Int32) 3;
opcua_node_variable_t_ns_2_i_6004->accessLevel = (UA_Int32) 3;
opcua_node_variable_t_ns_2_i_6004->valueRank = (UA_Int32) -1;
opcua_node_variable_t_ns_2_i_6004->value.variant.value = *opcua_node_variable_t_ns_2_i_6004_variant;
opcua_node_variable_t_ns_2_i_6004->valueSource = UA_VALUESOURCE_VARIANT;
// Parent node does not exist yet. This node will be bootstrapped and linked later.
UA_RCU_LOCK();
UA_NodeStore_insert(server->nodestore, (UA_Node*) opcua_node_variable_t_ns_2_i_6004);
UA_RCU_UNLOCK();
} while(0);
}