|
@@ -22,7 +22,7 @@
|
|
|
int cfg_NumberOfConnections = 10;
|
|
|
int cfg_OpcUaReadsPerConnectionPerS = 1;
|
|
|
bool cfg_EnableConsoleOutput;
|
|
|
-char *cfg_OpcUa_ServerAddress;
|
|
|
+char *cfg_OpcUa_ServerEndpoint;
|
|
|
|
|
|
using namespace std;
|
|
|
|
|
@@ -37,10 +37,10 @@ void workerThread()
|
|
|
// open OPC UA connection to server
|
|
|
UA_Client *client = UA_Client_new();
|
|
|
UA_ClientConfig_setDefault(UA_Client_getConfig(client));
|
|
|
- UA_StatusCode retval = UA_Client_connect(client, cfg_OpcUa_ServerAddress); // Should be something like "opc.tcp://localhost:4840"
|
|
|
+ UA_StatusCode retval = UA_Client_connect(client, cfg_OpcUa_ServerEndpoint); // Should be something like "opc.tcp://localhost:4840"
|
|
|
if(retval != UA_STATUSCODE_GOOD) {
|
|
|
UA_Client_delete(client);
|
|
|
- cerr << "Could not open OPC UA connection to " << cfg_OpcUa_ServerAddress << endl;
|
|
|
+ cerr << "Could not open OPC UA connection to " << cfg_OpcUa_ServerEndpoint << endl;
|
|
|
return;
|
|
|
}
|
|
|
|
|
@@ -102,7 +102,7 @@ int main(int argc, char **argv) {
|
|
|
configOk &= getIntFromConfig(&cfg, "NumberOfConnections", &cfg_NumberOfConnections);
|
|
|
configOk &= getIntFromConfig(&cfg, "OpcUaReadsPerConnectionPerS", &cfg_OpcUaReadsPerConnectionPerS);
|
|
|
configOk &= getBoolFromConfig(&cfg, "EnableConsoleOutput", &cfg_EnableConsoleOutput);
|
|
|
- configOk &= getStringFromConfig(&cfg, "OpcUa.ServerAddress", &cfg_OpcUa_ServerAddress);
|
|
|
+ configOk &= getStringFromConfig(&cfg, "OpcUa.ServerEndpoint", &cfg_OpcUa_ServerEndpoint);
|
|
|
if(!configOk){
|
|
|
config_destroy(&cfg);
|
|
|
return EXIT_FAILURE;
|