News:

We really need your input in this questionnaire

Main Menu

Node ID for Push parameter

Started by pouya.moradian, October 14, 2015, 02:35:30 PM

Previous topic - Next topic

pouya.moradian

Hi

As i see for pushing parameter to server node Id and DCI name is needed.
I'm using push parameter for pushing client side event as parameter,
So i need Node Id for each node in agent code, Is there any global variable or any variable to retrieve node id in java sub agent?

Is there any better approach to push event to server side for each client(node) ?

With Best Regards
Pouya

Victor Kirhenshtein

Hi,

you may set node ID to 0, then server will find actual node by source IP address.

Best regards,
Victor

pouya.moradian

Hi,

Thanks for your reply,
I got invalid object Id on using 0 as object id !

With best Regards
Pouya

Victor Kirhenshtein

Hi,

can you show me code snippet how you push data?

Best regards,
Victor

pouya.moradian

Hi,

I'm using Runtime.exec() in java in my agent but here is same story in command prompt.

Thank you.

Victor Kirhenshtein

Hi,

I was thinking you are using Java or C++ API, not command line tool. For command line tool you just have to omit node ID - server will find it from connection's source IP address.

Best regards,
Victor

pouya.moradian

Hi,

Thanks for your reply,
there is just some function like this in sample code :

@Override
   public ListParameter[] getListParameters()
   {
      return new ListParameter[] {
         new ListParameterAdapter("ListParameter1", "List Description") {
            @Override
            public String[] getValue(String value)
            {
               return new String[] { "1", "2" };
            }
         }
      };
   }

how can i use this for pushing parameter to server on an event ?

With best regards,
Pouya