12:41, EEST
April 12, 2016
I want to create a method Node On server side through createInstace() method which is the function of NodeManagerUANode. but when i create methodNode through this function it throws a Exception ?
uaNode= this.createInstance(Identifiers.MethodNode,new NodeId(2,”myMethod”),new QualifiedName(“myMethod”),new LocalizedText(“myMethod”));
com.prosysopc.ua.server.UaInstantiationException: Could not get type node.
at com.prosysopc.ua.server.NodeManagerUaNode.createNodeBuilder(Unknown Source)
at com.prosysopc.ua.server.NodeManagerUaNode.createNodeBuilder(Unknown Source)
at com.prosysopc.ua.server.NodeManagerUaNode.createInstance(Unknown Source)
what should I do ??
tell me if i am doing anything wrong .
thanks
12:29, EEST
April 17, 2013
Hi,
The NodeManagerUaNode.createInstance method is designed to create object and variable nodes. This method cannot be used to create method nodes as OPC UA methods do not have type definitions.
Please look at MyNodeManager.createMethodNode for an example of how to create a sample method node. This example uses
method. You can also add the node and reference separately, keeping in mind that OPC UA methods must belong to an object (or object type) and therefore be referenced from one of those with at least one HasComponent reference. This is because OPC UA methods can only be invoked on objects (or object types) referencing the method with a HasComponent reference.
13:35, EEST
April 12, 2016
Thank you Sir,
One more question if we extend our nodeManager with NodeManager instead of extending it with NodeManagerUaNode ,
now if we want to createInstance of any typeDefinition node which is already defined in types then how can we create a proper instance of any containing all of its references , the problem is that CreateInstance() is the method of NodeManagerUaNode and it is not available in NodeManager, so how can we create instances by extending our nodeManager with NodeManage
16:11, EEST
April 17, 2013
Hello,
If I understood the question correctly, it’s about how to create instances based on the type information. The createInstance method uses NodeBuilder internally, so you can recreate the functionality pretty easily using NodeBuilder class.
But then again: if you are creating instances of UaNodes why don’t you just use the NodeManagerUaNode implementation?
Did this answer your question or did I misinterpret something?
Most Users Ever Online: 1919
Currently Online:
13 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Heikki Tahvanainen: 402
hbrackel: 144
rocket science: 88
pramanj: 86
Francesco Zambon: 83
Ibrahim: 78
Sabari: 62
kapsl: 57
gjevremovic: 49
Xavier: 43
Member Stats:
Guest Posters: 0
Members: 737
Moderators: 7
Admins: 1
Forum Stats:
Groups: 3
Forums: 15
Topics: 1524
Posts: 6450
Newest Members:
fannielima, kristiewinkle8, rust, christamcdowall, redaahern07571, nigelbdhmp, travistimmons, AnnelCib, dalenegettinger, howardkennerleyModerators: Jouni Aro: 1026, Pyry: 1, Petri: 0, Bjarne Boström: 1026, Jimmy Ni: 26, Matti Siponen: 346, Lusetti: 0
Administrators: admin: 1