fixing a typo in the last commit

This commit is contained in:
Stasik0 2016-01-15 15:37:00 +01:00
parent f9e8a6cfcc
commit 586a24c952
3 changed files with 3 additions and 3 deletions

View File

@ -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 */

View File

@ -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;

View File

@ -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;