Преглед на файлове

fixing a typo in the last commit

Stasik0 преди 9 години
родител
ревизия
586a24c952
променени са 3 файла, в които са добавени 3 реда и са изтрити 3 реда
  1. 1 1
      README.md
  2. 1 1
      doc/tutorial_client_firstSteps.rst
  3. 1 1
      examples/client.c

+ 1 - 1
README.md

@@ -104,7 +104,7 @@ int main(int argc, char *argv[])
     /* create a readrequest with one entry */
     UA_ReadRequest req;
     UA_ReadRequest_init(&req);
-    req.nodesToRead = UA_Array_new(&UA_TYPES[UA_TYPES_READVALUEID], 1);
+    req.nodesToRead = UA_Array_new(1, &UA_TYPES[UA_TYPES_READVALUEID]);
     req.nodesToReadSize = 1;
     
     /* define the node and attribute to be read */

+ 1 - 1
doc/tutorial_client_firstSteps.rst

@@ -144,7 +144,7 @@ Let us extend the client with with an action reading node's value:
 
       UA_ReadRequest rReq;
       UA_ReadRequest_init(&rReq);
-      rReq.nodesToRead = UA_Array_new(&UA_TYPES[UA_TYPES_READVALUEID], 1);
+      rReq.nodesToRead = UA_Array_new(1, &UA_TYPES[UA_TYPES_READVALUEID]);
       rReq.nodesToReadSize = 1;
       rReq.nodesToRead[0].nodeId = UA_NODEID_NUMERIC(0, 2258);
       rReq.nodesToRead[0].attributeId = UA_ATTRIBUTEID_VALUE;

+ 1 - 1
examples/client.c

@@ -88,7 +88,7 @@ int main(int argc, char *argv[]) {
     printf("\nReading the value of node (1, \"the.answer\"):\n");
     UA_ReadRequest rReq;
     UA_ReadRequest_init(&rReq);
-    rReq.nodesToRead =  UA_Array_new(&UA_TYPES[UA_TYPES_READVALUEID], 1);
+    rReq.nodesToRead =  UA_Array_new(1, &UA_TYPES[UA_TYPES_READVALUEID]);
     rReq.nodesToReadSize = 1;
     rReq.nodesToRead[0].nodeId = UA_NODEID_STRING_ALLOC(1, "the.answer"); /* assume this node exists */
     rReq.nodesToRead[0].attributeId = UA_ATTRIBUTEID_VALUE;