Hi Dojo Community, I need your Help!
I am working on a task where I need to add dynamic polling (dynamic connections) feature. This driver is smart-serial, and only have one main connection. Table with Connection's IP addresses and Port Numbers must be added, and connection needs to be dynamically changed when previous connection is down (device not accessible) ...
- I have used dynamic ip parameter for this purpose (Dynamic polling | DataMiner Docs) - <Type options="dynamic ip 0">read</Type>
- Also, for tracking configured connections I am using <Type>ip</Type> parameter (in this case it will only contain one connection configuration, the main one, in "[IP Address]:[Port Number]" format)
Issue -> When I do set to dynamic ip parameter, and restart element, that value is correctly synced with <Type>ip</Type> param value. But on stream-viewer I can see that connection was not actually changed as it is still polling from Connection that was previously set from element edit wizard. I have also checked the Wireshark and it's same there.
In short, the previous connection is not closed and the new one is not established, although I see that the connection set in the dynamic ip parameter is the same as the one shown by the <Type>ip</Type> parameter that I use to track the connection configuration.
1st image:
- The element has been created. Inside the Element edit wizard, the ip address (10.12.0.1) and port number (9901) are set. That connection is added to the table, we also see that the <Type>ip</Type> parameter correctly shows the configuration. The stream-viewer also shows that the connection is established.
2nd image:
- Details have been added for the remaining connections (3 of them in this case). By pressing the 'Reconnect' button, an attempt is made to change the connection, in such a way that the value of the ip address and the port number are set in the dynamic ip parameter. If the element is restarted after that, the value of the dynamic ip parameter is correctly displayed on the <Type>ip</Type> parameter, however, that connection is not established, nor is the previous one terminated. The desired behavior would be to change the 10.0.12.1:9901 connection to 10.12.0.5:9905.
After investigating together with Matej, we had to come to the unfortunate conclusion that dynamic IP for smart-serial connections is not supported at the time of writing (version 10.3.8). I don't see a technical reason why we couldn't extend these features to work together, and urge you to get in touch with the PO of data-acquisition.