no way to compare when less than two revisions

Differences

This shows you the differences between two versions of the page.


sdk:scripts:opcua-browse [2015/07/07 06:52] (current) – created moll
Line 1: Line 1:
 +====== SDK Script opcua-browse.are ======
 +<code c opcua-browse.are>
 +/* DESC: This script will browse for Nodes, it will start at the given Node for the given depth.
 + * Copyright (C) 2012 NetModule AG
 + */
 +
 +void usage () {
 +    printf("usage: opcua-browse.are <opcuaserver> <nodeIndex> <nodeId> <depth>\n");
 +    exit(1);
 +}
 +
 +if (argc != 3) {
 +    usage();
 +}
 +
 +opcuaserver = argv[1];
 +nodeIndex = (int) argv[2];
 +nodeId = (int) argv[3];
 +depth = (int) argv[4];
 +
 +
 +client_0 = nb_opcua_connect(opcuaserver);
 +if(client_0 >= 0) {
 + ret = nb_opcua_browse(client_0, nodeIndex, nodeId, depth);
 + if(ret == -1) {
 + printf("could not search for %s\n", searchingString);
 + } else {
 + printf("succesfully connected and searched for %s\n", searchingString);
 + printf("the result is:\n");
 + dump(ret);
 + }
 + nb_opcua_disconnect(client_0);
 +} else {
 + printf("could not connect to server %s\n", opcuaserver);
 +}
 +
 +
 +exit(0);
 +
 +</code>