|
@@ -3,6 +3,7 @@
|
|
|
* See http://creativecommons.org/publicdomain/zero/1.0/ for more information.
|
|
|
*/
|
|
|
#include <iostream>
|
|
|
+#include <cstring>
|
|
|
|
|
|
#ifdef NOT_AMALGATED
|
|
|
# include "ua_server.h"
|
|
@@ -22,10 +23,13 @@ using namespace std;
|
|
|
|
|
|
int main()
|
|
|
{
|
|
|
- UA_Server *server = UA_Server_new(UA_ServerConfig_standard);
|
|
|
+ UA_Server *server = UA_Server_new(UA_ServerConfig_standard);
|
|
|
UA_Server_addNetworkLayer(server, ServerNetworkLayerTCP_new(UA_ConnectionConfig_standard, 16664));
|
|
|
|
|
|
- // add a variable node to the adresspace
|
|
|
+ UA_Logger logger = Logger_Stdout_new();
|
|
|
+ UA_Server_setLogger(server, logger);
|
|
|
+
|
|
|
+ // add a variable node to the adresspace
|
|
|
UA_Variant *myIntegerVariant = UA_Variant_new();
|
|
|
UA_Int32 myInteger = 42;
|
|
|
UA_Variant_setScalarCopy(myIntegerVariant, &myInteger, &UA_TYPES[UA_TYPES_INT32]);
|