/* 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 \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);