Avatar

Please consider registering
guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed Topic RSS sp_TopicIcon
Methods - how to set input arguments, which Method to use?
June 15, 2015
14:41, EEST
Avatar
danko
Member
Members
Forum Posts: 6
Member Since:
June 4, 2015
sp_UserOfflineSmall Offline

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?

June 18, 2015
7:15, EEST
Avatar
Jouni Aro
Moderator
Moderators
Forum Posts: 1010
Member Since:
December 21, 2011
sp_UserOfflineSmall Offline

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).

June 18, 2015
9:23, EEST
Avatar
danko
Member
Members
Forum Posts: 6
Member Since:
June 4, 2015
sp_UserOfflineSmall Offline

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. Smile

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?

June 18, 2015
9:33, EEST
Avatar
Jouni Aro
Moderator
Moderators
Forum Posts: 1010
Member Since:
December 21, 2011
sp_UserOfflineSmall Offline

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.

Forum Timezone: Europe/Helsinki

Most Users Ever Online: 518

Currently Online:
16 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

hbrackel: 135

pramanj: 86

Francesco Zambon: 81

rocket science: 77

Ibrahim: 76

Sabari: 62

kapsl: 57

gjevremovic: 49

Xavier: 43

fred: 41

Member Stats:

Guest Posters: 0

Members: 683

Moderators: 16

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1467

Posts: 6261

Newest Members:

digitechroshni, LouieWreve, Kickbiche, karrimacvitie5, graciela2073, sagarchau, elviralangwell4, Donnavek, Eddiefauth, DonaldPooma

Moderators: Jouni Aro: 1010, Otso Palonen: 32, Tuomas Hiltunen: 5, Pyry: 1, Petri: 0, Bjarne Boström: 983, Heikki Tahvanainen: 402, Jukka Asikainen: 1, moldzh08: 0, Jimmy Ni: 26, Teppo Uimonen: 21, Markus Johansson: 42, Niklas Nurminen: 0, Matti Siponen: 321, Lusetti: 0, Ari-Pekka Soikkeli: 5

Administrators: admin: 1