Class LDeviceAdapter

java.lang.Object
org.lfenergy.compas.sct.commons.scl.SclElementAdapter<IEDAdapter,TLDevice>
org.lfenergy.compas.sct.commons.scl.ied.LDeviceAdapter

public class LDeviceAdapter extends SclElementAdapter<IEDAdapter,TLDevice>
See Also:
  • Constructor Details

    • LDeviceAdapter

      public LDeviceAdapter(IEDAdapter parentAdapter, TLDevice currentElem)
      Constructor
      Parameters:
      parentAdapter - Parent container reference
      currentElem - Current reference
  • Method Details

    • createHmiReportControlBlocks

      public void createHmiReportControlBlocks(List<TFCDA> fcdas)
      Create DataSet and ReportControl Blocks for the HMI with the given FCDAs. DataSet and ReportControl are created in LN0, even if FCDA refers to another LN.
      Parameters:
      fcdas - List of FCDA for which we must create the DataSet and ReportControl
    • amChildElementRef

      protected boolean amChildElementRef()
      Check if node is child of the reference node
      Specified by:
      amChildElementRef in class SclElementAdapter<IEDAdapter,TLDevice>
      Returns:
      link parent child existence
    • getAccessPoint

      public TAccessPoint getAccessPoint()
    • elementXPath

      protected String elementXPath()
      Description copied from class: SclElementAdapter
      Returns XPath path to current element
      Specified by:
      elementXPath in class SclElementAdapter<IEDAdapter,TLDevice>
      Returns:
      message as undefined
    • getXPath

      public String getXPath()
      Description copied from class: SclElementAdapter
      Gets XPath path to current element from parent element
      Overrides:
      getXPath in class SclElementAdapter<IEDAdapter,TLDevice>
      Returns:
      path to current element
    • updateLDName

      public void updateLDName() throws ScdException
      Updates LDevice name by combining IED name and LDevice ldInst value
      Throws:
      ScdException - throws when renaming LDevice and new name has more than 33 caracteres
    • getInst

      public String getInst()
      Gets current LDevice Inst parameter value
      Returns:
      Inst parameter value
    • getLdName

      public String getLdName()
      Gets current LDevice name
      Returns:
      LDevice name
    • getLN0Adapter

      public LN0Adapter getLN0Adapter()
      Gets current LDevice LNode LN0
      Returns:
      LN0Adapter
    • hasLN0

      public boolean hasLN0()
      Checks if LDevice has an LN0 node
      Returns:
      true if lDevice has a LN0 node, false otherwise
    • getLNAdapters

      public List<LNAdapter> getLNAdapters()
      Gets current LDevice LNodes (except LN0)
      Returns:
      list of LNAdapter object
    • getLNAdapter

      public LNAdapter getLNAdapter(String lnClass, String lnInst, String prefix) throws ScdException
      Gets specific LNode from current LDevice
      Parameters:
      lnClass - LNode lnClass value
      lnInst - LNode lnInst value
      prefix - LNode prefix value
      Returns:
      LNAdapter object
      Throws:
      ScdException - thros when specified LNode not found in current IED
    • findLnAdapter

      public Optional<LNAdapter> findLnAdapter(String lnClass, String lnInst, String prefix)
      Find a specific LN from current LDevice
      Parameters:
      lnClass - LNode lnClass value
      lnInst - LNode lnInst value
      prefix - LNode prefix value
      Returns:
      LNAdapter object
      Throws:
      ScdException - thros when specified LNode not found in current IED
    • getExtRefBinders

      public List<ExtRefBindingInfo> getExtRefBinders(ExtRefSignalInfo signalInfo)
      Checks all possible ExtRef in current LDevice which could be bound to given ExtRef as parameter
      Parameters:
      signalInfo - ExtRef to bind data
      Returns:
      list of ExtRefBindingInfo object (containing binding data for each LDNode in current LDevice related to given ExtRef)
    • getExtRefInfo

      public List<ExtRefInfo> getExtRefInfo()
      Gets all ExtRef of all LNodes of current LDevice
      Returns:
      list of ExtRefInfo object (containing binding data for each LDNode in current LDevice)
    • getDAI

      public Set<DataAttributeRef> getDAI(DataAttributeRef dataAttributeRef, boolean updatableOnly) throws ScdException
      Gets a list of summarized DataTypeTemplate for DataAttribute DAIs (updatableOnly or not)
      Parameters:
      dataAttributeRef - Data Attribute Reference (used as filter)
      updatableOnly - true to retrieve only updatableOnly DAIs, false to retrieve all DAIs
      Returns:
      Set of DataAttributeRef (updatableOnly or not)
      Throws:
      ScdException - SCD illegal arguments exception
    • getLDeviceStatus

      public Optional<String> getLDeviceStatus()
    • getLNAdaptersIncludingLN0

      public List<AbstractLNAdapter<?>> getLNAdaptersIncludingLN0()
      Gets all LN of LDevice including LN0
      Returns:
      list of all LN of LDevice
    • createDataSetAndControlBlocks

      public List<SclReportItem> createDataSetAndControlBlocks(Set<FcdaForDataSetsCreation> allowedFcdas)
    • findSourceDA

      public Set<DataAttributeRef> findSourceDA(TExtRef extRef)
    • hasDataSetCreationCapability

      protected boolean hasDataSetCreationCapability(ControlBlockEnum controlBlockEnum)
      Checks if parent AccessPoint has DataSet creation capability
      Parameters:
      controlBlockEnum - the type of DataSet we want to check for creation capability.
      Returns:
      true if parent AccessPoint has the capability, false otherwise
    • hasControlBlockCreationCapability

      protected boolean hasControlBlockCreationCapability(ControlBlockEnum controlBlockEnum)
      Checks if parent AccessPoint has ControlBlock creation capability
      Parameters:
      controlBlockEnum - the type of ControlBlock we want to check for creation capability.
      Returns:
      true if parent AccessPoint has the capability, false otherwise
    • manageMonitoringLns

      public Optional<SclReportItem> manageMonitoringLns(List<TExtRef> tExtRefs, String doName, MonitoringLnClassEnum monitoringLnClassEnum)
      Update and/or create Monitoring LNs (LSVS and LGOS) into LDSUIED from ExtRefs binding
      Parameters:
      tExtRefs - ExtRefs for which source Control Blocks (Goose or SMV) should be monitored
      monitoringLnClassEnum - LNClass value for LN to monitor
      Returns:
      a list of SclReport Objects that contains errors
    • getExtRefBayReferenceForActifLDEPF

      public List<ExtRefInfo.ExtRefBayReference> getExtRefBayReferenceForActifLDEPF(List<SclReportItem> sclReportItems)
      Provides a list of ExtRef and associated Bay
      - The location of ExtRef should be in an active LDevice (inst=LDEPF)
      - ExtRef that lacks Bay or ICDHeader Private is not returned
      Parameters:
      sclReportItems - List of SclReportItem
      Returns:
      list of ExtRef and associated Bay