Browse Source

Fixed failing attributes test; displayName and description are now set, the testcase did assume they are not.

ichrispa 9 years ago
parent
commit
5cab8d3cb3

+ 1 - 1
doc/building.rst

@@ -13,7 +13,7 @@ Using the GCC compiler, the following calls build the library on Linux.
    
 
 Building with CMake on Ubuntu or Debian
------------------------------
+---------------------------------------
 
 .. code-block:: bash
    

+ 2 - 2
doc/tutorial_firstSteps.rst

@@ -26,8 +26,8 @@ Before we can get started you will require the stack. You may either clone the c
    Checking connectivity... done.
    ichrispa@Cassandra:>
 
-Then create a build directory and read the next section.
-::
+Then create a build directory and read the next section.::
+   
    ichrispa@Cassandra:> cd open62541
    ichrispa@Cassandra:open62541> mkdir build
    ichrispa@Cassandra:open62541/build> cd build

+ 7 - 0
doc/tutorial_nodescontents.rst

@@ -80,6 +80,13 @@ Examining node copies
 
 ``` UA_(Server|Client)_destroyNodeCopy()```
 
+Compile XML Namespaces
+----------------------
+
+Stasiks comfy CMake method.
+
+Manual script call.
+
 Creating object instances
 -------------------------
 

+ 1 - 1
examples/server.c

@@ -263,7 +263,7 @@ int main(int argc, char** argv) {
   const UA_NodeId myIntegerNodeId = UA_NODEID_STRING(1, "the.answer");
   UA_NodeId parentNodeId = UA_NODEID_NUMERIC(0, UA_NS0ID_OBJECTSFOLDER);
   UA_NodeId parentReferenceNodeId = UA_NODEID_NUMERIC(0, UA_NS0ID_ORGANIZES);
-  UA_Server_addVariableNode(server, myIntegerNodeId, myIntegerName, UA_LOCALIZEDTEXT("en_US","My Integer"), UA_LOCALIZEDTEXT("en_US","My Integer"),
+  UA_Server_addVariableNode(server, myIntegerNodeId, myIntegerName, UA_LOCALIZEDTEXT("en_US", "the answer"), UA_LOCALIZEDTEXT("en_US", "the answer"),
                             parentNodeId, parentReferenceNodeId, 0, 0, myIntegerVariant, NULL);
 
   /**************/

+ 6 - 4
tests/check_services_attributes.c

@@ -39,7 +39,7 @@ static UA_Server* makeTestSequence(void) {
     const UA_NodeId myIntegerNodeId = UA_NODEID_STRING(1, "the.answer");
     UA_NodeId parentNodeId = UA_NODEID_NUMERIC(0, UA_NS0ID_OBJECTSFOLDER);
     UA_NodeId parentReferenceNodeId = UA_NODEID_NUMERIC(0, UA_NS0ID_ORGANIZES);
-    UA_Server_addVariableNode(server, myIntegerNodeId, myIntegerName, UA_LOCALIZEDTEXT("en_US",""), UA_LOCALIZEDTEXT("en_US",""),
+    UA_Server_addVariableNode(server, myIntegerNodeId, myIntegerName, UA_LOCALIZEDTEXT("en_US","the answer"), UA_LOCALIZEDTEXT("en_US","the answer"),
                               parentNodeId, parentReferenceNodeId, 0, 0, myIntegerVariant, NULL);
 
     /* ObjectNode */
@@ -85,14 +85,16 @@ static UA_VariableNode* makeCompareSequence(void) {
 	UA_Variant_setScalarCopy(myIntegerVariant, &myInteger,
 			&UA_TYPES[UA_TYPES_INT32]);
 	const UA_QualifiedName myIntegerName = UA_QUALIFIEDNAME(1, "the answer");
-	const UA_NodeId myIntegerNodeId = UA_NODEID_STRING(1, "the.answer");
+	const UA_LocalizedText myIntegerDisplName = UA_LOCALIZEDTEXT("en_US", "the answer");
+        const UA_NodeId myIntegerNodeId = UA_NODEID_STRING(1, "the.answer");
 	UA_NodeId parentNodeId = UA_NODEID_NUMERIC(0, UA_NS0ID_OBJECTSFOLDER);
 	//UA_NodeId parentReferenceNodeId = UA_NODEID_NUMERIC(0, UA_NS0ID_ORGANIZES);
 	node->value.variant=*myIntegerVariant;
 	UA_NodeId_copy(&myIntegerNodeId,&node->nodeId);
 	UA_QualifiedName_copy(&myIntegerName,&node->browseName);
-	UA_String_copy(&myIntegerName.name,&node->displayName.text);
-	UA_ExpandedNodeId parentId;
+        UA_LocalizedText_copy(&myIntegerDisplName, &node->displayName);
+        UA_LocalizedText_copy(&myIntegerDisplName, &node->description);
+        UA_ExpandedNodeId parentId;
 	UA_ExpandedNodeId_init(&parentId);
 	UA_NodeId_copy(&parentNodeId,&parentId.nodeId);