Digging through the library there is a slightly roundabout way to do what I want to do.
UA_StatusCode UA_BuildInfo_get(UA_BuildInfo* buildInfo)
{
UA_ServerConfig config;
UA_ServerConfig_init(&config);
UA_BuildInfo_clear(buildInfo);
UA_StatusCode retval =
UA_ServerConfig_setBasics(&config);
if (retval == UA_STATUSCODE_GOOD)
{
retval = UA_BuildInfo_copy(&config.buildInfo, buildInfo);
UA_
ServerConfig _clear(&config);
}
return retval;
}
More logical would be to have an exported utility function UA_BuildInfo_get() in the library that is then used in the plugins/ua_config_default.c:setDefaultConfig() function. However that is a somewhat more involved change as it would also require to move some defines such as MANUFACTURER_NAME, PRODUCT_NAME and more from that file into some more common header. As they relate to the whole library and not just a server instance, it would however make sense to do that.
Regards, Rolf
Op woensdag 27 maart 2024 om 21:38:38 UTC+1 schreef Rolf Kalbermatter: