Class DAITracker
java.lang.Object
org.lfenergy.compas.sct.commons.scl.ied.DAITracker
A representation of the model object
DAITracker
.
The following features are supported:
Compare Two ObjectReference sections
Validate ObjectReference base cdc attribute
Returns value of the bType attribute By DaTypeName
ObjectReference: LDName/LNName.DataName[.DataName[…]].DataAttributeName[.DAComponentName[ ….]]
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
Enumeration of three states for matching check (FAILED, PARTIAL_MATCH, FULL_MATCH) -
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Value of indexDoType when DOI matching the DO is not instantiatedstatic 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
ConstructorDescriptionDAITracker
(@NonNull AbstractLNAdapter<?> lnAdapter, @NonNull DoTypeName doTypeName, @NonNull DaTypeName daTypeName) Constructor -
Method Summary
Modifier and TypeMethodDescriptionprotected double
getDaiNumericValue
(DaTypeName daTypeName, double defaultValue) Gets DAI value from DaTypeName for specific known types and throws exception if unknown typesearch()
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)
-
Field Details
-
DOI_NOT_FOUND
public static final int DOI_NOT_FOUNDValue 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_DAWhen 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 referencedoTypeName
- DOTypeName reference containing DO data leading to DAdaTypeName
- DATypeName reference containing linked DA to track data
-
-
Method Details
-
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
Validate if DAI Setting Group value is between boundaries (of DA BType)- Throws:
ScdException
- throws when value inconsistancy
-
getDaiNumericValue
Gets DAI value from DaTypeName for specific known types and throws exception if unknown type- Parameters:
daTypeName
- contains DA informationdefaultValue
- default init value- Returns:
- Double corresponding value for DAI val
-