GridProtectionAlliance / openPDC

Open Source Phasor Data Concentrator
MIT License
128 stars 59 forks source link

Input stream multiple sources question #131

Closed mlbeauchemin closed 4 years ago

mlbeauchemin commented 4 years ago

We had been informed that in version 2.7 of openPDC, there was a way to set up an input stream to have multiple potential sources. I have installed v2.7, but I am unable to figure out how to set this up.

ritchiecarroll commented 4 years ago

In the connection string for the PMU you can add as many source IP or hostnames as needed, for example:

transportProtocol=tcp; server=192.168.2.2:4712,192.168.3.2:4712;
ritchiecarroll commented 4 years ago

Also, just checked - this should be in nightly build version that is pending release for version 2.8 (not 2.7): http://www.gridprotectionalliance.org/nightlybuilds/openPDC/Beta/Synchrophasor.Installs.zip

Thanks, Ritchie

mlbeauchemin commented 4 years ago

Thank you!

mlbeauchemin commented 4 years ago

@ritchiecarroll We've got the version 2.8 code now, would you be able to point us in the direction of where the code behind this is? We are trying to understand it. Thanks.

ritchiecarroll commented 4 years ago

Code was added to the GSF.Commuication.TcpClient such that any connection made with this library could connect to multiple sources.

This works by maintaining an array of servers to connect to and just moving to the next one should it fail to connect with the first:

https://github.com/GridProtectionAlliance/gsf/blob/master/Source/Libraries/GSF.Communication/TcpClient.cs#L642

https://github.com/GridProtectionAlliance/gsf/blob/master/Source/Libraries/GSF.Communication/TcpClient.cs#L450

mlbeauchemin commented 4 years ago

Thank you!