14:41, EEST
June 4, 2015
Hi everyone,
Experimenting with NodeManagerUaNode I created a few test methods (extending PlainMethod) and got them to run just fine. Now I’ve switched to custom node managers based on NodeManager and tried to insert one of my Methods into the new server tree. For this I followed the example I found in Types -> ObjectTypes -> BaseObjectType -> FileType (there are a few Methods here and I tried to recreate their structure).
Basically, what my NodeManager does right now is:
– create new MyMethod
– setup input arguments and myMethod.setInputArguments(inputs)
– tell all of my NodeManager’s @Overwrite-methods how to support the Method node
– add an InputArguments-property as a property of the Method node, containing the Method’s input arguments as value
This works fine so far and, using the UaExert client to browse my server, looks exactly like the examples in the Types folder. However, when the Method is called it does not ask for arguments, stating “The method has no arguments”. – What else can I do to have the Method realise it actually does have arguments? Or does the fault lie somewhere else?
Also, as I’m no longer using NodeManagerUaNode, is it a good idea to extend PlainMethod which explicitly asks for one? In fact, I am handing it the getNodeManagerTable().getNodeManagerRoot() right now, which not only seems a bit awkward, but also a potential source of errors. Is there a (preferable) alternative?
7:15, EEST
December 21, 2011
Sorry for the delay in responding.
I am afraid, you cannot use the node based method definitions without a NodeManagerUaNode at the moment. But of course, you can add the method to a NodeManagerUaNode, even if your other nodes are in a custom node manager. NodeManagerRoot is not the best option semantically, since the nodes are supposed to reflect the standard ones defined by the OPC Foundation. So a better alternative is to create your own NodeManagerUaNode for these nodes.
However, if the method definition is in the type, you can just create a reference from your custom object nodes to the method definition in the type.
If you wish to do it properly with the custom node manager only, you will need to implement the complete node information in your custom NodeManager, IoManager and MethodManager, similar to what is done in the MyBigNodeManager sample (which does not contain the MethodManager, though).
9:23, EEST
June 4, 2015
Jouni Aro said
I am afraid, you cannot use the node based method definitions without a NodeManagerUaNode at the moment. But of course, you can add the method to a NodeManagerUaNode, even if your other nodes are in a custom node manager. NodeManagerRoot is not the best option semantically, since the nodes are supposed to reflect the standard ones defined by the OPC Foundation. So a better alternative is to create your own NodeManagerUaNode for these nodes..
Thanks, that is what I ended up doing for now, and it seems to work.
Jouni Aro said
If you wish to do it properly with the custom node manager only, you will need to implement the complete node information in your custom NodeManager, IoManager and MethodManager, similar to what is done in the MyBigNodeManager sample (which does not contain the MethodManager, though).
I’m still interested in going this way, but not sure how to go about it. Sadly, there are no methods in MyBigNodeManager to peek at and I have no clue what is missing from complete node information – using NodeManager, its IoManager and callMethod(…) I thought I had gathered everything. Is there a tutorial of some sort about this somewhere?
9:33, EEST
December 21, 2011
Unfortunately, any example to define the methods with a custom node manager is not available at the moment. In practice you need to provide the correct nodes and especially for the arguments also provide the correct values from the IoManager. Note that the standard nodes, such as the InputArguments and OutputArguments must be defined using BrowseNames in namespaceIndex=0.
You should compare the method nodes to the ones provided by PlainMethod with UaExpert or Prosys OPC UA Client visibly and verify that they look similar.
Most Users Ever Online: 1919
Currently Online:
50 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: 738
Moderators: 7
Admins: 1
Forum Stats:
Groups: 3
Forums: 15
Topics: 1524
Posts: 6451
Newest Members:
jonathonmcintyre, fannielima, kristiewinkle8, rust, christamcdowall, redaahern07571, nigelbdhmp, travistimmons, AnnelCib, dalenegettingerModerators: Jouni Aro: 1026, Pyry: 1, Petri: 0, Bjarne Boström: 1026, Jimmy Ni: 26, Matti Siponen: 346, Lusetti: 0
Administrators: admin: 1