Page 1 of 1

methods require 2 nodeids to call?

Posted: 28 Aug 2014, 23:04
by scalfee
Hi,

The docs on callin are sparse. the Header files:

Code: Select all

class UACLIENT_EXPORT CallIn
{
public:
    /** Constructor */
    CallIn()
    {
    };
    /** Destructor */
    ~CallIn(){};

    UaNodeId         objectId;
    UaNodeId         methodId;
    UaVariantArray   inputArguments;
};
and the sdk help:
The CallIn class contains the settings for a call request. More...

#include <uaclientsdk.h>
Public Member Functions
CallIn ()
Constructor.

~CallIn ()
Destructor.

Detailed Description

The CallIn class contains the settings for a call request.
Pretty sparse.

Why do methods require two nodeid's to be called? I have the methodid, from the server found via a browse. What is the appropriate objectid? I have tried just putting the methodid into the objectid and it worked. A little explanation here and maybe in the sdk would clear things up.

Thanks, Steve

Re: methods require 2 nodeids to call?

Posted: 17 Sep 2014, 13:33
by Support Team
Hello Steve,

to call a method you need the NodeId of the method and the NodeId of the object the method belongs to.
You need both because you can have mutiple object instances of the same type:

Code: Select all

TypeDefinition:
ObjectTypeA
|-MethodA->NodeIdM


Instances:
ObjectA->NodeIdA
|-MethodA->NodeIdM

ObjectB->NodeIdB
|-MethodA->NodeIdM
So just having a methodId wouldn't be enough.
I have tried just putting the methodid into the objectid and it worked.
That's wrong and should return an error from the server. How did you try that?


Best Regards,

Unified Automation Support Team

Re: methods require 2 nodeids to call?

Posted: 19 Apr 2021, 11:36
by portelajoao
I am having exactly the same question.

The answer from the support team doesn't seem reasonable for me. It would be true in case the methodId of the methods from the instances would be the same, but that is not true. All the methods on the multiple instances will get different methodIds.

I have tried that using UaModeler 1.6.5., just look to the attached pictures.

In this case I don't understand the need/use of giving the "Parent" NodeID of an method.

Image

Regards,
Portela