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(" | ||
+ | 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, | ||
+ | if(ret == -1) { | ||
+ | printf(" | ||
+ | } else { | ||
+ | printf(" | ||
+ | printf(" | ||
+ | dump(ret); | ||
+ | } | ||
+ | nb_opcua_disconnect(client_0); | ||
+ | } else { | ||
+ | printf(" | ||
+ | } | ||
+ | |||
+ | |||
+ | exit(0); | ||
+ | |||
+ | </ | ||