Commit ab3176a3 authored by Ivan Tyagov's avatar Ivan Tyagov

Cleanup.

parent cb9d8d97
......@@ -2,9 +2,9 @@
rm -f server_publish server_subscribe
# build OPC UA server which publishes msgs
gcc -o server_publish -I /usr/local/include/ -std=c99 server.c -l:libopen62541.so -L/usr/local/lib -lmbedcrypto -lmbedx509 -I ~/open62541/src/pubsub/ -I ~/open62541/deps/
gcc -o server -I /usr/local/include/ -std=c99 server.c -l:libopen62541.so -L/usr/local/lib -lmbedcrypto -lmbedx509 -I ~/open62541/src/pubsub/ -I ~/open62541/deps/
# build OPC Ua server which subscribes to msgs
gcc -o server_subscribe -I /usr/local/include/ -std=c99 server_subscribe.c -l:libopen62541.so -L/usr/local/lib -I ~/open62541/src/pubsub/ -I ~/open62541/deps/
#gcc -o server_subscribe -I /usr/local/include/ -std=c99 server_subscribe.c -l:libopen62541.so -L/usr/local/lib -I ~/open62541/src/pubsub/ -I ~/open62541/deps/
......@@ -257,13 +257,12 @@ int main(int argc, char **argv)
}
#endif
// enable keep-alive
// enable publish keep-alive
if (arguments.heart_beat) {
enablePublishHeartBeat(server, config);
}
// XXX: subscribe part
/* Add PubSubConnection */
// enable subscribe to keep-alive messages
UA_ServerConfig_addPubSubTransportLayer(config, UA_PubSubTransportLayerUDPMP());
UA_StatusCode return_value = UA_STATUSCODE_GOOD;
UA_String transportProfile = UA_STRING("http://opcfoundation.org/UA-Profile/Transport/pubsub-udp-uadp");
......@@ -287,8 +286,6 @@ int main(int argc, char **argv)
if (return_value != UA_STATUSCODE_GOOD)
return EXIT_FAILURE;
// EOF: subscribe
// run server
UA_StatusCode retval = UA_Server_run(server, &running);
UA_Server_delete(server);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment