{"action":"created","issue":{"url":"https://api.github.com/repos/acplt/open62541/issues/195","labels_url":"https://api.github.com/repos/acplt/open62541/issues/195/labels{/name}","comments_url":"https://api.github.com/repos/acplt/open62541/issues/195/comments","events_url":"https://api.github.com/repos/acplt/open62541/issues/195/events","html_url":"https://github.com/acplt/open62541/issues/195","id":59440207,"number":195,"title":"statusCode = 805E0000: The requested node id is already used by another node","user":{"login":"kadomcev","id":11058275,"avatar_url":"https://avatars.githubusercontent.com/u/11058275?v=3","gravatar_id":"","url":"https://api.github.com/users/kadomcev","html_url":"https://github.com/kadomcev","followers_url":"https://api.github.com/users/kadomcev/followers","following_url":"https://api.github.com/users/kadomcev/following{/other_user}","gists_url":"https://api.github.com/users/kadomcev/gists{/gist_id}","starred_url":"https://api.github.com/users/kadomcev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kadomcev/subscriptions","organizations_url":"https://api.github.com/users/kadomcev/orgs","repos_url":"https://api.github.com/users/kadomcev/repos","events_url":"https://api.github.com/users/kadomcev/events{/privacy}","received_events_url":"https://api.github.com/users/kadomcev/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-03-02T05:26:07Z","updated_at":"2015-03-02T08:36:29Z","closed_at":null,"body":"Hi all.\r\nProblem with added node \"ADE7878.Uc\".\r\nAnother name node added ok. \"ADE7878.Ua\", \"ADE7878.Ub\", \"ADE7878.Uz\".\r\nnode with name \"ADE7878.Uc\" not added.\r\n\r\nUA_Int32 *myInteger = UA_Int32_new();\r\n*myInteger = 42;\r\nUA_NodeId ADE7878;\r\nUA_AddNodesResult res;\r\n\r\n/********************************************************************************************/\r\n/* Add Folder ADE7878 - TYPE:String */\r\nUA_ObjectNode *root = UA_ObjectNode_new();\r\nUA_QUALIFIEDNAME_STATIC(root->browseName, \"ADE7878\");\r\nUA_LOCALIZEDTEXT_STATIC(root->displayName, \"ADE7878\");\r\nUA_LOCALIZEDTEXT_STATIC(root->description, \"ADE7878\");\r\n\r\nroot->nodeClass = UA_NODECLASS_OBJECT;\r\nroot->nodeId.namespaceIndex = 0;\r\nroot->nodeId.identifierType = UA_NODEIDTYPE_STRING;\r\nroot->eventNotifier = UA_FALSE;\r\nUA_String_copycstring(\"ADE7878\", &root->nodeId.identifier.string);\r\nres = UA_Server_addNode(server, (UA_Node*)root,\r\n\t\t\t\t\t\t\t&UA_EXPANDEDNODEID_STATIC(0, UA_NS0ID_OBJECTSFOLDER),\r\n\t\t\t\t\t\t\t&UA_NODEID_STATIC(0, UA_NS0ID_ORGANIZES));\r\nADE7878 = res.addedNodeId;\r\nprintf(\"statusCode = %08X\\n\",res.statusCode);\r\nADDREFERENCE(ADE7878, UA_NODEID_STATIC(0, UA_NS0ID_HASTYPEDEFINITION),\r\n\t\t\t\t UA_EXPANDEDNODEID_STATIC(0, UA_NS0ID_FOLDERTYPE));\r\n\r\nUA_ExpandedNodeId parentNode;\r\nparentNode.nodeId = ADE7878;\r\nUA_VariableNode *rootNode;\r\n\r\n/********************************************************************************************/\r\n/* Add node 'Uc' in folder ADE7878 - TYPE:String */\r\nrootNode = UA_VariableNode_new();\r\nUA_QUALIFIEDNAME_STATIC(rootNode->browseName, \"Uc\");\r\nUA_LOCALIZEDTEXT_STATIC(rootNode->displayName, \"Uc\");\r\nUA_LOCALIZEDTEXT_STATIC(rootNode->description, \"Uc\");\r\nUA_String_copycstring(\"ADE7878.Uc\", &rootNode->nodeId.identifier.string);\r\nUA_Variant_setValue(&rootNode->value, myInteger, UA_TYPES_INT32);\r\n\r\nrootNode->nodeClass = UA_NODECLASS_VARIABLE;\r\nrootNode->nodeId.namespaceIndex = 0;\r\nrootNode->nodeId.identifierType = UA_NODEIDTYPE_STRING;\r\nrootNode->value.storageType = UA_VARIANT_DATASOURCE;\r\nrootNode->value.storage.data.arrayLength = 1;\r\nrootNode->value.storage.datasource = (UA_VariantDataSource)\r\n{.handle = UA_NULL,\r\n .read = readTimeData,\r\n .release = releaseTimeData,\r\n .write = writeTimeData};\r\nres = UA_Server_addNode(server, (UA_Node*)rootNode,\r\n\t\t\t\t\t\t\t&parentNode,\r\n\t\t\t\t\t\t\t&UA_NODEID_STATIC(0, UA_NS0ID_HASCOMPONENT));\r\nprintf(\"statusCode = %08X\\n\",res.statusCode);\r\n![1](https://cloud.githubusercontent.com/assets/11058275/6435788/7c1db69c-c0c6-11e4-862c-2225556fadce.PNG)\r\n![2](https://cloud.githubusercontent.com/assets/11058275/6435793/84f473be-c0c6-11e4-8889-0a5464cc4635.PNG)\r\n"},"comment":{"url":"https://api.github.com/repos/acplt/open62541/issues/comments/76674828","html_url":"https://github.com/acplt/open62541/issues/195#issuecomment-76674828","issue_url":"https://api.github.com/repos/acplt/open62541/issues/195","id":76674828,"user":{"login":"kadomcev","id":11058275,"avatar_url":"https://avatars.githubusercontent.com/u/11058275?v=3","gravatar_id":"","url":"https://api.github.com/users/kadomcev","html_url":"https://github.com/kadomcev","followers_url":"https://api.github.com/users/kadomcev/followers","following_url":"https://api.github.com/users/kadomcev/following{/other_user}","gists_url":"https://api.github.com/users/kadomcev/gists{/gist_id}","starred_url":"https://api.github.com/users/kadomcev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kadomcev/subscriptions","organizations_url":"https://api.github.com/users/kadomcev/orgs","repos_url":"https://api.github.com/users/kadomcev/repos","events_url":"https://api.github.com/users/kadomcev/events{/privacy}","received_events_url":"https://api.github.com/users/kadomcev/received_events","type":"User","site_admin":false},"created_at":"2015-03-02T08:36:29Z","updated_at":"2015-03-02T08:36:29Z","body":"Ia, Ib, Ic rename to  Ua, Ub, Uc\r\n\r\nstatic UA_NodeId addObjectNode(UA_Server *server, UA_String identifier, UA_String browseName, UA_String displayName, UA_String description, UA_UInt16 parent)\r\n{\r\n\tUA_AddNodesResult res;\r\n\tUA_NodeId MyNodeId;\r\n\tuint8_t nameNode[255];\r\n\r\n\tmemset(&nameNode,0x00,255);\r\n\tmemcpy(&nameNode, identifier.data, identifier.length);\r\n\r\n\tUA_ObjectNode *root \t\t\t= UA_ObjectNode_new();\r\n\troot->browseName.name \t\t\t= browseName;\r\n\troot->displayName.text \t\t\t= displayName;\r\n\troot->description.text\t\t\t= description;\r\n\troot->nodeClass \t\t\t\t= UA_NODECLASS_OBJECT;\r\n\troot->nodeId.namespaceIndex \t= 0;\r\n\troot->nodeId.identifierType \t= UA_NODEIDTYPE_STRING;\r\n\troot->nodeId.identifier.string \t= identifier;\r\n\troot->eventNotifier \t\t\t= UA_FALSE;\r\n\tres = UA_Server_addNode(server, (UA_Node*)root,\r\n\t\t\t\t\t\t\t\t&UA_EXPANDEDNODEID_STATIC(0, UA_NS0ID_OBJECTSFOLDER),\r\n\t\t\t\t\t\t\t\t&UA_NODEID_STATIC(0, UA_NS0ID_ORGANIZES));\r\n\tMyNodeId = res.addedNodeId;\r\n\tprintf(\"addObjectNode: %s, statusCode = %08X\\n\",nameNode, res.statusCode);\r\n\tADDREFERENCE(MyNodeId, UA_NODEID_STATIC(0, UA_NS0ID_HASTYPEDEFINITION),\r\n\t                 UA_EXPANDEDNODEID_STATIC(0, UA_NS0ID_FOLDERTYPE));\r\n\treturn MyNodeId;\r\n}\r\n\r\nint main()\r\n{\r\n\tsignal(SIGINT, signalHandler);\r\n\r\n\tUA_Server *server = UA_Server_new();\r\n    UA_Server_addNetworkLayer(server, ServerNetworkLayerTCP_new(UA_ConnectionConfig_standard, 16664));\r\n    UA_WorkItem work = {.type = UA_WORKITEMTYPE_METHODCALL, .work.methodCall = {.method = testCallback, .data = UA_NULL} };\r\n    UA_Server_addRepeatedWorkItem(server, &work, 20000000, UA_NULL); // call every 2 sec\r\n\r\n    UA_Int32 *myInteger = UA_Int32_new();\r\n    *myInteger = 42;\r\n    UA_AddNodesResult res;\r\n    UA_NodeId ADE7878, DI, DO, MAX1271, AD5422;\r\n\r\n\t/********************************************************************************************/\r\n\t/* Add Folder ADE7878 - TYPE:String */\r\n    UA_String identifier, browseName, displayName, description;\r\n    UA_String_copycstring(\"ADE7878\",&identifier);\r\n    UA_String_copycstring(\"ADE7878\",&browseName);\r\n    UA_String_copycstring(\"ADE7878\",&displayName);\r\n    UA_String_copycstring(\"ADE7878\",&description);\r\n    ADE7878 = addObjectNode(server,identifier,browseName,displayName,description,UA_NS0ID_OBJECTSFOLDER);\r\n\r\n    /********************************************************************************************/\r\n\t/* Add Folder DO - TYPE:String */\r\n\tUA_String_copycstring(\"DO\",&identifier);\r\n\tUA_String_copycstring(\"DO\",&browseName);\r\n\tUA_String_copycstring(\"DO\",&displayName);\r\n\tUA_String_copycstring(\"DO\",&description);\r\n\tDO = addObjectNode(server,identifier,browseName,displayName,description,UA_NS0ID_OBJECTSFOLDER);\r\n\r\n    /********************************************************************************************/\r\n\t/* Add Folder DI - TYPE:String */\r\n\tUA_String_copycstring(\"DI\",&identifier);\r\n\tUA_String_copycstring(\"DI\",&browseName);\r\n\tUA_String_copycstring(\"DI\",&displayName);\r\n\tUA_String_copycstring(\"DI\",&description);\r\n\tDI = addObjectNode(server,identifier,browseName,displayName,description,UA_NS0ID_OBJECTSFOLDER);\r\n\r\n\t/********************************************************************************************/\r\n\t/* Add Folder MAX1271 - TYPE:String */\r\n\tUA_String_copycstring(\"MAX1271\",&identifier);\r\n\tUA_String_copycstring(\"MAX1271\",&browseName);\r\n\tUA_String_copycstring(\"MAX1271\",&displayName);\r\n\tUA_String_copycstring(\"MAX1271\",&description);\r\n\tMAX1271 = addObjectNode(server,identifier,browseName,displayName,description,UA_NS0ID_OBJECTSFOLDER);\r\n\r\n\t/********************************************************************************************/\r\n\t/* Add Folder AD5422 - TYPE:String */\r\n\tUA_String_copycstring(\"AD5422\",&identifier);\r\n\tUA_String_copycstring(\"AD5422\",&browseName);\r\n\tUA_String_copycstring(\"AD5422\",&displayName);\r\n\tUA_String_copycstring(\"AD5422\",&description);\r\n\tAD5422 = addObjectNode(server,identifier,browseName,displayName,description,UA_NS0ID_OBJECTSFOLDER);\r\n\r\n\tUA_ExpandedNodeId parentNode;\r\n\tparentNode.nodeId = ADE7878;\r\n\tUA_VariableNode *rootNode;\r\n\r\n\t/********************************************************************************************/\r\n\t/* Add node 'Ua' in folder ADE7878 - TYPE:String */\r\n\trootNode = UA_VariableNode_new();\r\n\tUA_QUALIFIEDNAME_STATIC(rootNode->browseName, \"Ia\");\r\n\tUA_LOCALIZEDTEXT_STATIC(rootNode->displayName, \"Ia\");\r\n\tUA_LOCALIZEDTEXT_STATIC(rootNode->description, \"Ia\");\r\n\tUA_String_copycstring(\"ADE7878.Ia\", &rootNode->nodeId.identifier.string);\r\n\r\n\trootNode->nodeClass = UA_NODECLASS_VARIABLE;\r\n\trootNode->nodeId.namespaceIndex = 0;\r\n\trootNode->nodeId.identifierType = UA_NODEIDTYPE_STRING;\r\n\r\n\tUA_Variant_setValue(&rootNode->value, myInteger, UA_TYPES_INT32);\r\n\trootNode->value.storageType = UA_VARIANT_DATA_NODELETE;\r\n\trootNode->value.storage.data.arrayLength = 1;\r\n\tres = UA_Server_addNode(server, (UA_Node*)rootNode,\r\n\t\t\t\t\t\t\t\t&parentNode,\r\n\t\t\t\t\t\t\t\t&UA_NODEID_STATIC(0, UA_NS0ID_HASCOMPONENT));\r\n\tprintf(\"statusCode = %08X\\n\",res.statusCode);\r\n\r\n\r\n\t/********************************************************************************************/\r\n\t/* Add node 'Ub' in folder ADE7878 - TYPE:String */\r\n\trootNode = UA_VariableNode_new();\r\n\tUA_QUALIFIEDNAME_STATIC(rootNode->browseName, \"Ib\");\r\n\tUA_LOCALIZEDTEXT_STATIC(rootNode->displayName, \"Ib\");\r\n\tUA_LOCALIZEDTEXT_STATIC(rootNode->description, \"Ib\");\r\n\tUA_String_copycstring(\"ADE7878.Ib\", &rootNode->nodeId.identifier.string);\r\n\r\n\trootNode->nodeClass = UA_NODECLASS_VARIABLE;\r\n\trootNode->nodeId.namespaceIndex = 0;\r\n\trootNode->nodeId.identifierType = UA_NODEIDTYPE_STRING;\r\n\r\n\trootNode->value.type = &UA_TYPES[UA_TYPES_INT32];\r\n\trootNode->value.storage.data.dataPtr = myInteger;\r\n\trootNode->value.storageType = UA_VARIANT_DATA_NODELETE;\r\n\trootNode->value.storage.data.arrayLength = 1;\r\n\tres = UA_Server_addNode(server, (UA_Node*)rootNode,\r\n\t\t\t\t\t\t\t\t&parentNode,\r\n\t\t\t\t\t\t\t\t&UA_NODEID_STATIC(0, UA_NS0ID_HASCOMPONENT));\r\n\tprintf(\"statusCode = %08X\\n\",res.statusCode);\r\n\r\n\r\n\t/********************************************************************************************/\r\n\t/* Add node 'Uc' in folder ADE7878 - TYPE:String */\r\n\trootNode = UA_VariableNode_new();\r\n\tUA_QUALIFIEDNAME_STATIC(rootNode->browseName, \"Ic\");\r\n\tUA_LOCALIZEDTEXT_STATIC(rootNode->displayName, \"Ic\");\r\n\tUA_LOCALIZEDTEXT_STATIC(rootNode->description, \"Ic\");\r\n\tUA_String_copycstring(\"ADE7878.Ic\", &rootNode->nodeId.identifier.string);\r\n\tUA_Variant_setValue(&rootNode->value, myInteger, UA_TYPES_INT32);\r\n\r\n\trootNode->nodeClass = UA_NODECLASS_VARIABLE;\r\n\trootNode->nodeId.namespaceIndex = 0;\r\n\trootNode->nodeId.identifierType = UA_NODEIDTYPE_STRING;\r\n\trootNode->value.storageType = UA_VARIANT_DATASOURCE;\r\n\trootNode->value.storage.data.arrayLength = 1;\r\n\trootNode->value.storage.datasource = (UA_VariantDataSource)\r\n\t{.handle = UA_NULL,\r\n\t .read = readTimeData,\r\n\t .release = releaseTimeData,\r\n\t .write = writeTimeData};\r\n\tres = UA_Server_addNode(server, (UA_Node*)rootNode,\r\n\t\t\t\t\t\t\t\t&parentNode,\r\n\t\t\t\t\t\t\t\t&UA_NODEID_STATIC(0, UA_NS0ID_HASCOMPONENT));\r\n\tprintf(\"statusCode = %08X\\n\",res.statusCode);\r\n\r\n\r\n\t/********************************************************************************************/\r\n\t/* Add node 'DO.1' in folder DO - TYPE:String */\r\n\tparentNode.nodeId = DO;\r\n\trootNode = UA_VariableNode_new();\r\n\tUA_QUALIFIEDNAME_STATIC(rootNode->browseName, \"DO.1\");\r\n\tUA_LOCALIZEDTEXT_STATIC(rootNode->displayName, \"DO.1\");\r\n\tUA_LOCALIZEDTEXT_STATIC(rootNode->description, \"DO.1\");\r\n\tUA_String_copycstring(\"DO.1\", &rootNode->nodeId.identifier.string);\r\n\r\n\tUA_Variant_setValue(&rootNode->value, myInteger, UA_TYPES_INT32);\r\n\r\n\trootNode->nodeClass = UA_NODECLASS_VARIABLE;\r\n\trootNode->nodeId.namespaceIndex = 0;\r\n\trootNode->nodeId.identifierType = UA_NODEIDTYPE_STRING;\r\n\trootNode->value.storageType = UA_VARIANT_DATASOURCE;\r\n\trootNode->value.storage.data.arrayLength = 1;\r\n\trootNode->value.storage.datasource = (UA_VariantDataSource)\r\n\t{.handle = UA_NULL,\r\n\t .read = readTimeData,\r\n\t .release = releaseTimeData,\r\n\t .write = writeTimeData};\r\n\tres = UA_Server_addNode(server, (UA_Node*)rootNode,\r\n\t\t\t\t\t\t\t\t&parentNode,\r\n\t\t\t\t\t\t\t\t&UA_NODEID_STATIC(0, UA_NS0ID_HASCOMPONENT));\r\n\tprintf(\"statusCode = %08X\\n\",res.statusCode);\r\n\r\n\r\n\t/********************************************************************************************/\r\n    UA_StatusCode retval = UA_Server_run(server, 1, &running);\r\n\tUA_Server_delete(server);\r\n\r\n\treturn retval;\r\n}"}}