Login  •  Register

Optional Placeholder Modelling Rule

Questions regarding the use of the C++ SDK for Server or Client development or integration into customer products ...

Optional Placeholder Modelling Rule

Postby taki » 12 Aug 2019, 11:42

I want to use a Collabolation model. I use UaModeler(1.6.2) project to generate and include its generated codes into my C++ based OPC UA SDK (1.7.0) project .
However, I find out something do not work correctly when objects ModellingRule with "Optional Placeholder" are not added by "addObjectsFolder***(const XmlUaNodeFactoryManager &factory)" method of its nodemanager.

I inspect generated code in following steps by using UaModeler.

I create a blank project and add two namespaces.
Then, I create new types following.



And then, I create new object "Test2Object" following with setting "Select Placeholder components".

Then, I generate "C++ Server 1.6.0" code and add these code into Unified Automation OPC UA SDK example "server_cpp_demo".

And I add following lines into "servermain.cpp".

#include "test1_nodemanagertest1.h"
#include "test2_nodemanagertest2.h"

Access::NodeManagerAccess *pAccessNodeManager = new Access::NodeManagerAccess(OpcUa_True);
// Start New Code
test1::NodeManagertest1 *pTest1NodeManager = new test1::NodeManagertest1(OpcUa_True);

test2::NodeManagertest2 *pTest2NodeManager = new test2::NodeManagertest2(OpcUa_True);
// End New Code

#if SUPPORT_Method_Server_Facet

Then, I build this project and run this application.
I check whether TestObject1 and TestObject2 is existing or not by using UaExpert.
But, they are not found.

Could you tell me correct instructions to use Optional Placeholder components?
Thank you in advance.

Best regards,
Shota Taki
Jr. Member
Jr. Member
Posts: 1
Joined: 20 Mar 2019, 03:21

Return to C++ based OPC UA SDK

Who is online

Users browsing this forum: MSN [Bot] and 0 guests