Hi Dojo!
One of ous customer asked about be able to change the polling IP address of some elements when necessary so we want to know if it is possible via an automation script.
We already check the possibility to add a second interface in the driver but it will be more complex as it is an smart-serial single (IEC 104).
Thank you in advance!
Pedro
As far as I know, you can change the polling IP of a device via the IDmsElement object as well.
You can access the connection via IDmsElement.Connections. Once you have the correct connection, you should cast it to the correct connection class type, which then makes it easy to edit whatever part of the connection you'd like. At the end, call the .Update() method on the IDmsElement object and the updates will be applied on the element.
Hi Pedro,
Can you check my answer to this other question Change Polling IP from a Automation? - DataMiner Dojo
It is similar to what you are after and in there, I briefly explain a couple of options and the IDP one could be automated to be run via script
Thank you João!
We know that SLNET calls are not recomended but as a temporal solution while IDP is installed and tested we need a quick solution for this requirement asap. Do you have a reference guide for SLNET calls or an example for this call in particular? thanks again!
The SLNet call that allows this is the AddElementMessage which besides creation also allows editing.
You can edit an element by assigning the correct value to the DataMinerID and ElementID properties and then configuring the Ports property.
VERY IMPORTANT NOTE: For any and all fields that you do not wish to modify, you must not assign any value to them not even null or default values.
A snippet you can use as base for your script is below but I must reiterate that these calls must be done with caution.
new SLNetMessages.AddElementMessage
{
DataMinerID = dmaId,
ElementID = elementId,
Ports= new SLNetMessages.ElementPortInfo[]
{
// Main Port
new SLNetMessages.ElementPortInfo
{
PollingIPAddress = “127.0.0.1”
},
// Second Port
null,
// Third Port
new SLNetMessages.ElementPortInfo
{
PollingIPAddress = “127.0.0.2”
},
}
}
Notice the only exception to my note above is when dealing with the ports.
If you wish to modify a port but leave a previous one untouched you must pass a null value in that array position instead of an empty object.
Disclaimer
Note that this is an internal call and we do not recommend using this, as it is not officially supported and we cannot guarantee that it will still work in the future as these are subject to change without notice. We recommend always using the correct UI or automation options provided in DataMiner Automation or through our web API.
Thanks João! I will try this!
Thank you Robin, I will try with IDmsElement aswell.
Kind regards!