Class ControlBlock

java.lang.Object
org.lfenergy.compas.sct.commons.dto.LNodeMetaDataEmbedder
org.lfenergy.compas.sct.commons.dto.ControlBlock
Direct Known Subclasses:
GooseControlBlock, ReportControlBlock, SMVControlBlock

public abstract class ControlBlock extends LNodeMetaDataEmbedder
A representation of the model object ControlBlock. - GooseControlBlock, - ReportControlBlock, - SMVControlBlock,

The following features are supported:

See Also:
  • Field Details

  • Constructor Details

    • ControlBlock

      public ControlBlock()
  • Method Details

    • getServiceType

      @Deprecated(since="16/01/2023") public TServiceType getServiceType()
      Deprecated.
      TServiceType provides REPORT, SMV, GOOSE and POLL. It does not provide "LOG" for LogControl and provides "POLL" which is not a valid ControlBlock type. Use getControlBlockEnum() instead.
      Get ServiceType
      Returns:
      ServiceType enum object
      See Also:
    • getControlBlockEnum

      public abstract ControlBlockEnum getControlBlockEnum()
      Get ControlBlockEnum
      Returns:
      ControlBlockEnum of the instance
    • toTControl

      public abstract TControl toTControl()
      Map the object to TControl
      Returns:
      new instance of TControl element with all the attributes copied from the current object
    • validateCB

      public void validateCB() throws ScdException
      Validate Control block structure
      Throws:
      ScdException - when ControlBlock structure is not valid
    • validateSecurityEnabledValue

      public final void validateSecurityEnabledValue(IEDAdapter iedAdapter) throws ScdException
      Check if Security is enabled in IED (Services)
      Parameters:
      iedAdapter - IED adapter containing IED data
      Throws:
      ScdException - when ControlBlock Security is not consistent
    • getConfRev

      public Long getConfRev()
      Get ConfRev value. ConfRev is 0 for newly created control blocks without data set reference
      Returns:
      confRev long value
    • validateSecurityEnabledValue

      protected abstract void validateSecurityEnabledValue(TServices tServices) throws ScdException
      Abstract method to check validity of Security Enable state for Control blocks
      Parameters:
      tServices - Service object
      Throws:
      ScdException - when ControlBlock Security is not consistent
    • getControlBlockServiceSetting

      public TServiceSettingsNoDynEnum getControlBlockServiceSetting(TServices tServices)
      Get Control block settings from Service
      Parameters:
      tServices - Service object
      Returns:
      ServiceSettingsNoDynEnum enum value
    • addToLN

      public abstract TControl addToLN(TAnyLN tAnyLN)
      Add the ControlBlock to an LN or LN0 element
      Parameters:
      tAnyLN - tLN or tLNO element
      Returns:
      the added TControl
    • copyProtocol

      protected static TProtocol copyProtocol(TProtocol tProtocol)
      Copy a TProtocol object
      Parameters:
      tProtocol - input instance
      Returns:
      new instance of tProtocol with the same fields as input