Class DAITracker

java.lang.Object
org.lfenergy.compas.sct.commons.scl.ied.DAITracker

public class DAITracker extends Object
A representation of the model object DAITracker.

The following features are supported:


     ObjectReference: LDName/LNName.DataName[.DataName[…]].DataAttributeName[.DAComponentName[ ….]]
 
See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static enum 
    Enumeration of three states for matching check (FAILED, PARTIAL_MATCH, FULL_MATCH)
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Value of indexDoType when DOI matching the DO is not instantiated
    static final int
    When data has no BDA : value of indexDaType when the DAI matching the DA is not instantiated When data has BDA : value of indexDaType when the SDI matching the DA is not instantiated
  • Constructor Summary

    Constructors
    Constructor
    Description
    DAITracker(@NonNull AbstractLNAdapter<?> lnAdapter, @NonNull DoTypeName doTypeName, @NonNull DaTypeName daTypeName)
    Constructor
  • Method Summary

    Modifier and Type
    Method
    Description
    protected double
    getDaiNumericValue(DaTypeName daTypeName, double defaultValue)
    Gets DAI value from DaTypeName for specific known types and throws exception if unknown type
    Checks DOI/SDI/DAI presence in LN (lnAdapter attribute) matching given DO/SDO (doTypeName attribute) and DA/BDA (daTypeName attribute) As a reminder DOI/SDI/DAI chain matches DO/SDO/DA/BDA chain like this : - DOI is equivalent to a DO - SDI are equivalent to SDO and DA with bType="Struct" and BDA with bType="Struct".
    void
    Validate if DAI Setting Group value is between boundaries (of DA BType)

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • DOI_NOT_FOUND

      public static final int DOI_NOT_FOUND
      Value of indexDoType when DOI matching the DO is not instantiated
      See Also:
    • SDI_OR_DAI_NOT_FOUND_FOR_DA

      public static final int SDI_OR_DAI_NOT_FOUND_FOR_DA
      When data has no BDA : value of indexDaType when the DAI matching the DA is not instantiated When data has BDA : value of indexDaType when the SDI matching the DA is not instantiated
      See Also:
  • Constructor Details

    • DAITracker

      public DAITracker(@NonNull @NonNull AbstractLNAdapter<?> lnAdapter, @NonNull @NonNull DoTypeName doTypeName, @NonNull @NonNull DaTypeName daTypeName)
      Constructor
      Parameters:
      lnAdapter - Parent container reference
      doTypeName - DOTypeName reference containing DO data leading to DA
      daTypeName - DATypeName reference containing linked DA to track data
  • Method Details

    • search

      public DAITracker.MatchResult search()
      Checks DOI/SDI/DAI presence in LN (lnAdapter attribute) matching given DO/SDO (doTypeName attribute) and DA/BDA (daTypeName attribute) As a reminder DOI/SDI/DAI chain matches DO/SDO/DA/BDA chain like this : - DOI is equivalent to a DO - SDI are equivalent to SDO and DA with bType="Struct" and BDA with bType="Struct". There can be no SDI when there are no SDO, nor DA(bType="Struct") , nor SDA(bType="Struct") - DAI is the final element. It is equivalent to the final DA (when bType != "Struct") or the final BDA (BDA with bType != "Struct")
      Returns:
      one of MatchResult enum value :
      • FAILED
      • => no DOI found ( = nothing found)
      • PARTIAL_MATCH
      • => DOI found, and maybe some SDI found (matching SDO or DA), but DAI not found
      • FULL_MATCH
      • => DOI found, all intermediate SDI found and DAI found
    • validateBoundedDAI

      public void validateBoundedDAI() throws ScdException
      Validate if DAI Setting Group value is between boundaries (of DA BType)
      Throws:
      ScdException - throws when value inconsistancy
    • getDaiNumericValue

      protected double getDaiNumericValue(DaTypeName daTypeName, double defaultValue)
      Gets DAI value from DaTypeName for specific known types and throws exception if unknown type
      Parameters:
      daTypeName - contains DA information
      defaultValue - default init value
      Returns:
      Double corresponding value for DAI val