I have a problem when I want to print a custom stucture that I don't receive from a server but that I create on the client side. In my real case I want to log the parameters of a method call. The logging happens, when the parameter is already a variant! When I get the same structure from the server with an event or by reading, printing works just fine. But printing the parameter I created in my project fails.
You should be able to recreate the problem like I did using the "client_cpp_sdk" demo project (version 1.7.4 with the "same" demo server). I edited the example and I used this place because right before, a Demo::Vector instance from the server is printed successfully:
Code: Select all
void read()
{
// ... Successfully read and printed the variables, also Demo::Vector instances ...
// ##### prints "Cannot get a structure definition - check access to type dictionary" #####
Demo::Vector v(1.1, 2.2, 3.3);
UaExtensionObject eo;
v.toExtensionObject(eo);
printExtensionObject(eo);
}
}
Now the question is: can I set the namespace index to the correct value somehow, or is there another applicable solution for this problem?
Thanks