#include <memory/memory.h>
#include <uaserver/addressspace/addressspace.h>
#include <uaserver/valuestore/valuestore.h>
#include <uaserver/provider/provider.h>
#include <trace/trace.h>
#include "custom_provider_store.h"
#include "custom_provider_nodes.h"
#include "custom_provider.h"
#include "custom_provider_method.h"
uint16_t g_custom_provider_nsidx;
static struct ua_variant g_memorystore_values[10];
uint8_t g_custom_store_idx = 0;
static void custom_provider_cleanup(void)
{
return;
}
{
int ret;
config.nsidx = UA_NSIDX_INVALID;
config.max_variables = 10;
config.max_methods = 1;
config.max_objects = 1;
config.max_references = 20;
config.max_strings = 10;
"http://www.unifiedautomation.com/CustomServer/",
&config,
if (ret < 0) return ret;
g_custom_provider_nsidx = (uint16_t) ret;
if (ret != 0) return ret;
ret =
ua_memorystore_init(&g_memorystore, 0, g_memorystore_values, countof(g_memorystore_values));
if (ret != 0) return ret;
store_if.get_fct = custom_store_get_value;
store_if.attach_fct = custom_store_attach_value;
if (ret != 0) return ret;
ret = custom_provider_create_nodes();
if (ret != 0) return ret;
#ifdef ENABLE_SERVICE_CALL
ret = custom_provider_method_init();
if (ret != 0) return ret;
#endif
#ifdef ENABLE_SERVICE_CALL
ctx->
call = custom_provider_method_call;
#endif
ctx->
cleanup = custom_provider_cleanup;
return ret;
}