Class SclElementsProviderService

java.lang.Object
org.lfenergy.compas.sct.commons.SclElementsProviderService
All Implemented Interfaces:
SclElementsProvider

public class SclElementsProviderService extends Object implements SclElementsProvider
  • Constructor Details

    • SclElementsProviderService

      public SclElementsProviderService()
  • Method Details

    • getSubnetwork

      public List<SubNetworkDTO> getSubnetwork(SCL scd) throws ScdException
      Description copied from interface: SclElementsProvider
      Gets list of SCL SubNetworks
      Specified by:
      getSubnetwork in interface SclElementsProvider
      Parameters:
      scd - SCL file in which SubNetworks should be found
      Returns:
      List of SubNetworkDTO from SCL
      Throws:
      ScdException - throws when no Communication in SCL and createIfNotExists == false
    • getExtRefInfo

      public List<ExtRefInfo> getExtRefInfo(SCL scd, String iedName, String ldInst) throws ScdException
      Description copied from interface: SclElementsProvider
      Gets all ExtRef from specific IED/LDevice in SCL file
      Specified by:
      getExtRefInfo in interface SclElementsProvider
      Parameters:
      scd - SCL file in which ExtRefs should be found
      iedName - name of IED in which LDevice is localized
      ldInst - LdInst of LDevice in which all ExtRefs should be found
      Returns:
      list of ExtRefInfo from specified parameter SCL/IED/LDevice
      Throws:
      ScdException - throws when unknown specified IED or LDevice
    • getExtRefBinders

      public List<ExtRefBindingInfo> getExtRefBinders(SCL scd, String iedName, String ldInst, String lnClass, String lnInst, String prefix, ExtRefSignalInfo signalInfo) throws ScdException
      Description copied from interface: SclElementsProvider
      Gets all possible ExtRefs to bind in SCL file with given ExtRef (signalInfo) in SCL file
      Specified by:
      getExtRefBinders in interface SclElementsProvider
      Parameters:
      scd - SCL file in which ExtRefs should be found
      iedName - name of IED in which LDevice is localized
      ldInst - ldInst of LDevice in which LN is localized
      lnClass - lnClass of LN in which ExtRef signal to find binders is localized
      lnInst - lnInst of LN in which ExtRef signal to find binders is localized
      prefix - prefix of LN in which ExtRef signal to find binders is localized
      signalInfo - ExtRef signal for which we should find possible binders in SCL file binders
      Returns:
      list of ExtRefBindingInfo object (containing binding data for each LNode in current SCL file) sorted by compareTo method.
      Throws:
      ScdException - throws when ExtRef contains inconsistency data
    • getExtRefSourceInfo

      public List<ControlBlock> getExtRefSourceInfo(SCL scd, ExtRefInfo extRefInfo) throws ScdException
      Description copied from interface: SclElementsProvider
      Gets all Control Blocks related to extRefInfo in given SCL file
      Specified by:
      getExtRefSourceInfo in interface SclElementsProvider
      Parameters:
      scd - SCL file in which ControlBlocks should be found
      extRefInfo - ExtRef signal for which we should find related ControlBlocks
      Returns:
      list of ControlBlock object as ControlBlocks of LNode specified in extRefInfo
      Throws:
      ScdException - throws when mandatory data of ExtRef are missing
    • getDAI

      public Set<DataAttributeRef> getDAI(SCL scd, String iedName, String ldInst, DataAttributeRef dataAttributeRef, boolean updatable) throws ScdException
      Description copied from interface: SclElementsProvider
      Gets a list of summarized DataTypeTemplate for DataAttribute DA (updatable or not) related to the one given in dataAttributeRef
      Specified by:
      getDAI in interface SclElementsProvider
      Parameters:
      scd - SCL file in which DataTypeTemplate of DAIs should be found
      iedName - name of IED in which DAs are localized
      ldInst - ldInst of LDevice in which DAIs are localized
      dataAttributeRef - reference summarized DataTypeTemplate related to IED DAIs
      updatable - true to retrieve DataTypeTemplate's related to only updatable DAIs, false to retrieve all
      Returns:
      Set of Data Attribute Reference for DataAttribute (updatable or not)
      Throws:
      ScdException - SCD illegal arguments exception, missing mandatory data
    • getEnumTypeValues

      public Set<EnumValDTO> getEnumTypeValues(SCL scd, String idEnum) throws ScdException
      Description copied from interface: SclElementsProvider
      Gets EnumTypes values of ID idEnum from DataTypeTemplate of SCL file
      Specified by:
      getEnumTypeValues in interface SclElementsProvider
      Parameters:
      scd - SCL file in which EnumType should be found
      idEnum - ID of EnumType for which values are retrieved
      Returns:
      list of couple EnumType value and it's order
      Throws:
      ScdException - throws when unknown EnumType