mz-automation / libiec61850

Official repository for libIEC61850, the open-source library for the IEC 61850 protocols
http://libiec61850.com/libiec61850
GNU General Public License v3.0
863 stars 461 forks source link

SCD files without gateway IP addresses causes model build failure - DockerComposeGenerator.java #486

Open JT-simutech opened 9 months ago

JT-simutech commented 9 months ago

The gateway IP address quite frequently is missing in SCD files for IEDs in the network that is referenced during build. Maybe better to state "using default gateway" or similar if this is missing. The code is inside a try-catch block but the build process will not complete. If the SCD file is read in OMICRON IEDScout it is not causing any problems that gateway is missing. Could be optional with gateway IP?

InetAddress gateway = InetAddress.getByName( subNetwork.getConnectedAPs().get(0).getAddress().getAddressParameter("IP-GATEWAY").getText());

image image

Maybe better to catch the unknownhostexception and replace with some default IP if missing or rebuild code to make robust on this?