Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RSR-633] - Automated Binding - Edit InRef #231

Closed
DamienPERNET opened this issue Jan 30, 2023 · 0 comments · Fixed by #233, #251, #261 or #269
Closed

[RSR-633] - Automated Binding - Edit InRef #231

DamienPERNET opened this issue Jan 30, 2023 · 0 comments · Fixed by #233, #251, #261 or #269
Assignees
Labels
enhancement New feature or request

Comments

@DamienPERNET
Copy link
Contributor

US Purpose:

The US purpose is to populate for a given LDevice@inst/LN0 and for each DOI@name="InRefXXX"/DAI@name="purpose"/Val, if at least one /Inputs/ExtRef.desc matches:

  • DOI@name="InRef"/DAI@name="setSrcRef"/Val
  • DOI@name="InRef"/DAI@name="setSrcCB"/Val
  • DOI@name="InRef"/DAI@name="setTstRef"/Val
  • DOI@name="InRef"/DAI@name="setTstCB"/Val

 

Prerequisites:

All ExtRef are already bound:

 

Input:

  • SCD file where all ExtRef are already bound

 

Description:

The goal is to associate DOI@name="InRefXXX" with:

  • one ExtRef nominally used
  • AND eventually one ExtRef used for tests

The ExtRef that can be associated to a DOI@name="InRefXXX":

  • are in the same LDevice.inst/LN0 than the DOI@name="InRefXXX"
  • AND have their ExtRef@desc which contain the string defined in DOI@name="InRefXXX"/DAI@name="purpose"/Val
  • AND have their ExtRef@iedName AND ExtRef@ldInst populated

Thus, each DOI@name="InRefXXX" can have as possible binding ExtRef:

  • 0 ExtRef
  • 1 ExtRef where ExtRef@desc is suffixed by "_1"
  • 2 to n ExtRef where ExtRef@desc are suffixed by "_1" and by "_n" with n > 1

 

The first ExtRef is the nominal case, it is the one which has the suffix "_1".

The last ExtRef is for the cases of tests, it is the one which has the greater suffix ie "_n".

 

The first ExtRef of the nominal case is used to populate:

  • DOI@name="InRefXXX"/DAI@name="setSrcRef"/Val with ExtRef@iedNameExtRef@ldInst/ExtRef@prefixExtRef@lnClassExtRef@lnInst[.]ExtRef@doName
  • AND DOI@name="InRefXXX"/DAI@name="setSrcCB"/Val with ExtRef@iedNameExtRef@srcLDInst/ExtRef@srcPrefixExtRef@srcLNClassExtRef@srcLNInst[.]ExtRef@srcCBName only if ExtRef owns source CB. In this case, if ExtRef@srcLNClass is omit then take "LLN0".
  • Note: If an optional attribute is missing (srcPrefix or srcLnInst), fill the DAI/Val without it

The last ExtRef of the test case is used to populate:

  • DOI@name="InRefXXX"/DAI@name="setTstRef"/Val with ExtRef@iedNameExtRef@ldInst/ExtRef@prefixExtRef@lnClassExtRef@lnInst[.]ExtRef@doName
  • AND DOI@name="InRefXXX"/DAI@name="setTstCB"/Val with ExtRef@iedNameExtRef@srcLDInst/ExtRef@srcPrefixExtRef@srcLNClassExtRef@srcLNInst[.]ExtRef@srcCBName only if ExtRef owns source CB. In this case, if ExtRef@srcLNClass is omit then take "LLN0".
  • Note: If an optional attribute is missing (srcPrefix or srcLnInst), fill the DAI/Val without it

 

Details:

  • For each LDevice.inst/LN0 of the SCD file
    • For each DOI@name="InRefXXX"/DAI@name="purpose"/Val :
      • Find into the current LDevice.inst/LN0, all Inputs/ExtRef@desc which contain the DAI@name="purpose"/Val in their string
      • Keep only ExtRef which have their ExtRef@iedName AND ExtRef@ldInst populated
        • Case 1 : No ExtRef@desc matches, then do nothing. An informative message is returned INFO.01 then process the next DOI@name="InRefXXX"
        • Case 2 : Only one ExtRef@desc matches, then
          • Check that the ExtRef@desc is suffixed by "_1" else an informative message is returned INFO.01 and the next DOI@name="InRefXXX" is processed
          • Create and populate attributes:
            • DOI@name="InRefXXX"/DAI@name="setSrcRef"/Val = ExtRef@iedNameExtRef@ldInst/ExtRef@prefixExtRef@lnClassExtRef@lnInst[.]ExtRef@doName
            • if ExtRef@srcCBName exists and is populated then DOI@name="InRefXXX"/DAI@name="setSrcCB"/Val = ExtRef@iedNameExtRef@srcLDInst/ExtRef@srcPrefixExtRef@srcLNClassExtRef@srcLNInst[.]ExtRef@srcCBName. In this case, if ExtRef@srcLNClass is omit then take "LLN0"
            • Note: If an optional attribute is missing (srcPrefix or srcLnInst), fill the DAI/Val without it
        • Case 3 : Two or more ExtRef@desc match, then
          • Among these matching ExtRef@desc, check that the ExtRef@desc smallest suffix is "_1": it is the first ExtRef, the nominal case else an informative message is returned INFO.01 and the next DOI@name="InRefXXX" is processed.
          • Among these matching ExtRef@desc, check that the ExtRef@desc greatest suffix is strictly different from the smallest suffix "_1" else there is no ExtRef for test then an informative message is returned INFO.01 and the next DOI@name="InRefXXX" is processed
          • With the first ExtRef@desc i.e the one which is suffixed by "_1", the smallest suffix, create and populate attributes:
            • DOI@name="InRefXXX"/DAI@name="setSrcRef"/Val = ExtRef@iedNameExtRef@ldInst/ExtRef@prefixExtRef@lnClassExtRef@lnInst[.]ExtRef@doName
            • if ExtRef@srcCBName exists and is populated then DOI@name="InRefXXX"/DAI@name="setSrcCB"/Val = ExtRef@iedNameExtRef@srcLDInst/ExtRef@srcPrefixExtRef@srcLNClassExtRef@srcLNInst[.]ExtRef@srcCBName. In this case, if ExtRef@srcLNClass is omit then take "LLN0"
            • Note: If an optional attribute is missing (srcPrefix or srcLnInst), fill the DAI/Val without it
          • With the ExtRef@desc which has the greatest suffix different from the smallest, create and populate attributes:
            • DOI@name="InRefXXX"/DAI@name="setTstRef"/Val = ExtRef@iedNameExtRef@ldInst/ExtRef@prefixExtRef@lnClassExtRef@lnInst[.]ExtRef@doName
            • if ExtRef@srcCBName exists and is populated then DOI@name="InRefXXX"/DAI@name="setTstCB"/Val = ExtRef@iedNameExtRef@srcLDInst/ExtRef@srcPrefixExtRef@srcLNClassExtRef@srcLNInst[.]ExtRef@srcCBName. In this case, if ExtRef@srcLNClass is omit then take "LLN0"
            • Note: If an optional attribute is missing (srcPrefix or srcLnInst), fill the DAI/Val without it
        • If we are not into one of the previous cases, then return an info message INFO.01 then process the next DOI@name="InRefXXX"

 

Output:

In SCD file, each LDevice@inst/LN0/DOI@name="InRefXXX", when it exists some LDevice@inst/LN0/Inputs/ExtRef which match with the DOI@name="InRefXXX"/DAI@name="purpose"/Val, is bound by using the following attributes populated:

  • with the ExtRef@desc which has the smallest suffix i.e "_1" for:
    • DOI@name="InRefXXX"/DAI@name="setSrcRef"/Val = ExtRef@iedNameExtRef@ldInst/ExtRef@prefixExtRef@lnClassExtRef@lnInst[.]ExtRef@doName
    • if ExtRef@srcCBName exists and is populated then DOI@name="InRefXXX"/DAI@name="setSrcCB"/Val = ExtRef@iedNameExtRef@srcLDInst/ExtRef@srcPrefixExtRef@srcLNClassExtRef@srcLNInst[.]ExtRef@srcCBName. In this case, if ExtRef@srcLNClass is omit then take "LLN0"
    • Note: If an optional attribute is missing (srcPrefix or srcLnInst), fill the DAI/Val without it
  • with the ExtRef@desc which has the greatest suffix strictly different from the smallest i.e "_1" for:
    • DOI@name="InRefXXX"/DAI@name="setSrcRef"/Val = ExtRef@iedNameExtRef@ldInst/ExtRef@prefixExtRef@lnClassExtRef@lnInst[.]ExtRef@doName
    • if ExtRef@srcCBName exists and is populated then DOI@name="InRefXXX"/DAI@name="setSrcCB"/Val = ExtRef@iedNameExtRef@srcLDInst/ExtRef@srcPrefixExtRef@srcLNClassExtRef@srcLNInst[.]ExtRef@srcCBName. When ExtRef@srcLNClass is omit then take "LLN0".
    • Note: If an optional attribute is missing (srcPrefix or srcLnInst), fill the DAI/Val without it
  • An info message is returned when a DOI@name="InRefXXX" can't be bound with an ExtRef, all DOI@name="InRefXXX" of the SCD file must be processed

 

Error/Info messages:

INFO.01: "The DOI IED=IED@name/LD=LDevice@inst/LN="LLN0"/DOI@name="InRefXXX" can't be bound with an ExtRef"

 

Acceptance criteria:

  • Check that in SCD file, each LDevice@inst/LN0/DOI@name="InRefXXX", when it exists some LDevice@inst/LN0/Inputs/ExtRef@desc which contains the DOI@name="InRefXXX"/DAI@name="purpose"/Val, is bound by using the following attributes populated:
    • with the ExtRef@desc which has the smallest suffix i.e "_1" such as:
      • DOI@name="InRefXXX"/DAI@name="setSrcRef"/Val = ExtRef@iedNameExtRef@ldInst/ExtRef@prefixExtRef@lnClassExtRef@lnInst[.]ExtRef@doName
      • if ExtRef@srcCBName exists and is populated then DOI@name="InRefXXX"/DAI@name="setSrcCB"/Val = ExtRef@iedNameExtRef@srcLDInst/ExtRef@srcPrefixExtRef@srcLNClassExtRef@srcLNInst[.]ExtRef@srcCBName. In this case, if ExtRef@srcLNClass is omit then take "LLN0"
      • Check that if an optional attribute is missing (srcPrefix or srcLnInst), fill the DAI/Val without it
    • with the ExtRef@desc which has the greatest suffix absolutely different from the smallest i.e "_1" such as:
      • DOI@name="InRefXXX"/DAI@name="setTstRef"/Val = ExtRef@iedNameExtRef@ldInst/ExtRef@prefixExtRef@lnClassExtRef@lnInst[.]ExtRef@doName
      • if ExtRef@srcCBName exists and is populated then DOI@name="InRefXXX"/DAI@name="setTstCB"/Val = ExtRef@iedNameExtRef@srcLDInst/ExtRef@srcPrefixExtRef@srcLNClassExtRef@srcLNInst[.]ExtRef@srcCBName. In this case, if ExtRef@srcLNClass is omit then take "LLN0"
      • Check that if an optional attribute is missing (srcPrefix or srcLnInst), fill the DAI/Val without it
    • Check that an info message is returned when a DOI@name="InRefXXX" can't be bound with an ExtRef"
    • Check that all DOI@name="InRefXXX" of the SCD file are processed

 

@DamienPERNET DamienPERNET added the enhancement New feature or request label Jan 30, 2023
@SaintierFr SaintierFr added this to the Release 0.2.4 of CoMPAS SCT milestone Feb 2, 2023
@SaintierFr SaintierFr linked a pull request Feb 3, 2023 that will close this issue
SaintierFr added a commit that referenced this issue Feb 13, 2023
Signed-off-by: SaintierFr <99645240+SaintierFr@users.noreply.github.com>
SaintierFr added a commit that referenced this issue Feb 13, 2023
Signed-off-by: SaintierFr <99645240+SaintierFr@users.noreply.github.com>
samirromdhani added a commit that referenced this issue Feb 15, 2023
…nRef(DOI)

Signed-off-by: Samir Romdhani <samir.romdhani@rte-france.com>
samirromdhani added a commit that referenced this issue Feb 15, 2023
…nRef(DOI)

Signed-off-by: Samir Romdhani <samir.romdhani@rte-france.com>
samirromdhani added a commit that referenced this issue Feb 15, 2023
Signed-off-by: Samir Romdhani <samir.romdhani@rte-france.com>
samirromdhani added a commit that referenced this issue Feb 15, 2023
Signed-off-by: Samir Romdhani <samir.romdhani@rte-france.com>
SaintierFr added a commit that referenced this issue Feb 15, 2023
Signed-off-by: SaintierFr <99645240+SaintierFr@users.noreply.github.com>
SaintierFr added a commit that referenced this issue Feb 27, 2023
Signed-off-by: SaintierFr <99645240+SaintierFr@users.noreply.github.com>
SaintierFr added a commit that referenced this issue Mar 8, 2023
…XSD (#248)

Signed-off-by: SaintierFr <99645240+SaintierFr@users.noreply.github.com>
@AliouDIAITE AliouDIAITE linked a pull request Mar 21, 2023 that will close this issue
@AliouDIAITE AliouDIAITE linked a pull request Apr 5, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment