i am getting two ip in device address element which is pooling ip type. so first need to set only on in this parameter. also need to use this ip in qaction for some logic so tell available methods.
Hi Chirangee,
The parameter of Type pollingip | DataMiner Docs is as José mentioned, a single parameter. if you have multiple connections defined, it will contain everything concatenated by semicolons (”;”).
If I understand your question correctly, you are trying to trigger a QAction for each of the IPs of your element but that is not possible, the value of that parameter will not change during the lifetime of your element.
In your QAction, you can use the String.Split Method (System) | Microsoft Learn to extract each IP address and you should then have an array with the correct order as defined in your element settings.
With it, you can either use the array or set other parameters to be used later or display if it is more convenient.
Do note that this parameter cannot be written to, it is read-only, and if you want to communicate with both endpoints you will have to define the connection ID on the group (see: connection attribute | DataMiner Docs) to indicate which endpoint you want to use.
If on the other hand, this is a scenario of main and backup connection then you have a look into Redundant polling | DataMiner Docs
Correct, this parameter is a representation of the settings of your element’s edit page.
You can only modify those from there and in code, you can only access them.
Hi Chirangee,
If you want to know the IP that is configured in the element and use this information in a QAction, first you will need to create a parameter of type pollingip
Example:
More info: Type element | DataMiner Docs
Then you can perform the normal call to get the parameter data (e.g protocol.GetParameter())
Kind regards
hi jose,
thanks for reply i m having all these things now, on a diff param triggers i am getting two same ip from pooling ip param sepreted by “;” . but on startup i want to set only one ip from these ip’s in pooling ip param
Hi Chirangee,
I apologize, but I didn’t fully understand your previous message.
You can use type=”pollingip” or simply type=”ip” if you want to retrieve the configured port as well. The value will be automatically added to the parameter, so there’s no need to assign or set it manually (DataMiner will take care of this).
From the QAction, you can obtain this information like this:
var ipInformation = protocol.GetParameter(1);
With this you can than print the value or use it in other logic.
Kind regards,
so as I understand not possible change a poolingip type parameter display value because it is a read only. Fetch value of this param in a qaction and use or display accordingly.