- Java SCL parser: parser is more tolerant. Added access to IED list.

pull/71/head
Michael Zillgith 7 years ago
parent 49d06cc9d3
commit 9cb032138b

@ -8,6 +8,7 @@ Changes to version 1.2.2
- TLS client: fixed problem with high CPU load - TLS client: fixed problem with high CPU load
- ISO connection: fixed race condition that can cause corrupted messages - ISO connection: fixed race condition that can cause corrupted messages
- .NET API: added project files for .NET core 2.0 - .NET API: added project files for .NET core 2.0
- .NET API: added server side support for TLS
Changes to version 1.2.1 Changes to version 1.2.1
------------------------ ------------------------

@ -27,6 +27,7 @@ import java.io.FileInputStream;
import java.io.FileNotFoundException; import java.io.FileNotFoundException;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.util.Collection;
import java.util.LinkedList; import java.util.LinkedList;
import java.util.List; import java.util.List;
import java.util.Stack; import java.util.Stack;
@ -57,8 +58,8 @@ import com.libiec61850.scl.types.EnumerationType;
import com.libiec61850.scl.types.LogicalNodeType; import com.libiec61850.scl.types.LogicalNodeType;
import com.libiec61850.scl.types.TypeDeclarations; import com.libiec61850.scl.types.TypeDeclarations;
public class SclParser { public class SclParser
{
private List<IED> ieds; private List<IED> ieds;
private Communication communication; private Communication communication;
private TypeDeclarations typeDeclarations; private TypeDeclarations typeDeclarations;
@ -111,6 +112,11 @@ public class SclParser {
return null; return null;
} }
public Collection<IED> getIeds()
{
return ieds;
}
public IED getFirstIed() { public IED getFirstIed() {
return ieds.get(0); return ieds.get(0);
} }
@ -314,4 +320,4 @@ public class SclParser {
return null; return null;
} }
} }

@ -43,9 +43,9 @@ public class AccessPoint {
Node serverNode = ParserUtils.getChildNodeWithTag(apNode, "Server"); Node serverNode = ParserUtils.getChildNodeWithTag(apNode, "Server");
if (serverNode == null) if (serverNode == null)
throw new SclParserException(apNode, "AccessPoint has no server defined!"); this.server = null;
else
this.server = new Server(serverNode, typeDeclarations); this.server = new Server(serverNode, typeDeclarations);
} }

@ -41,9 +41,6 @@ public class IED {
List<Node> accessPointNodes = ParserUtils.getChildNodesWithTag(iedNode, "AccessPoint"); List<Node> accessPointNodes = ParserUtils.getChildNodesWithTag(iedNode, "AccessPoint");
if (accessPointNodes.size() == 0)
throw new SclParserException(iedNode, "no AccessPoint defined in IED " + name);
this.accessPoints = new LinkedList<AccessPoint>(); this.accessPoints = new LinkedList<AccessPoint>();
for (Node accessPointNode : accessPointNodes) { for (Node accessPointNode : accessPointNodes) {

Loading…
Cancel
Save