diff --git a/tools/model_generator/genconfig.jar b/tools/model_generator/genconfig.jar index 7f06e77..15fc159 100644 Binary files a/tools/model_generator/genconfig.jar and b/tools/model_generator/genconfig.jar differ diff --git a/tools/model_generator/genmodel.jar b/tools/model_generator/genmodel.jar index 717c721..594ae74 100644 Binary files a/tools/model_generator/genmodel.jar and b/tools/model_generator/genmodel.jar differ diff --git a/tools/model_generator/src/com/libiec61850/scl/communication/GSEAddress.java b/tools/model_generator/src/com/libiec61850/scl/communication/GSEAddress.java index 8e3c635..cc1d611 100644 --- a/tools/model_generator/src/com/libiec61850/scl/communication/GSEAddress.java +++ b/tools/model_generator/src/com/libiec61850/scl/communication/GSEAddress.java @@ -44,13 +44,19 @@ public class GSEAddress { String type = ParserUtils.parseAttribute(pNode, "type"); if (type.equals("VLAN-ID")) { - vlanId = new Integer(pNode.getTextContent()); + vlanId = Integer.parseInt(pNode.getTextContent(), 16); + + if (vlanId > 0xfff) + throw new SclParserException(addressNode, "VLAN-ID value out of range"); } else if (type.equals("VLAN-PRIORITY")) { vlanPriority = new Integer(pNode.getTextContent()); } else if (type.equals("APPID")) { - appId = new Integer(pNode.getTextContent()); + appId = Integer.parseInt(pNode.getTextContent(), 16); + + if (appId > 0xfff) + throw new SclParserException(addressNode, "APPID value out of range"); } else if (type.equals("MAC-Address")) { String[] addressElements = pNode.getTextContent().split("-");