Skip to content

Bug : LNodeTypeAdapter.getDataAttributeRef should not throw exception "Multiple Data Attribute found" #525

Open
@massifben

Description

@massifben

Actual

I get an Exception when calling lNodeTypeAdapter.getDataAttributeRef("Do1.da1") on this SCL :

<SCL xmlns="http://www.iec.ch/61850/2003/SCL" version="2007" revision="B" release="4">
    <Header id="HeaderID" version="version" revision="Revision" toolID="toolID"/>
    <DataTypeTemplates>
        <LNodeType id="LN1" lnClass="ANCR">
            <DO name="Do1" type="DO1"/>
        </LNodeType>
        <DOType cdc="WYE" id="DO1">
            <SDO name="sdo1" type="SDO1"/>
            <SDO name="sdo2" type="SDO1"/>
            <DA name="da1" bType="BOOLEAN" fc="ST"/>
            <DA name="unused" bType="BOOLEAN" fc="ST"/>
        </DOType>
        <DOType cdc="WYE" id="SDO1">
            <DA name="da1" bType="BOOLEAN" fc="ST"/>
            <DA name="unused" bType="BOOLEAN" fc="ST"/>
        </DOType>
    </DataTypeTemplates>
</SCL>

The Exception is :

org.lfenergy.compas.sct.commons.exception.ScdException: Multiple Data Attribute found for this data reference Do1.da1 in LNodeType.lnClass=ANCR, LNodeType.id=LN1. Found DA : Do1.sdo1.da1, Do1.sdo2.da1, Do1.da1 

Expected

I expect the method to not throw Exception and return DataAttributeRef Do1.da1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions