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

Test the recovered IEC61850 model using ModelDesign Compiler (mdc.exe) Version: 3.0 #98

Closed
mpostol opened this issue Apr 20, 2022 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@mpostol
Copy link
Owner

mpostol commented Apr 20, 2022

Describe the bug

Partially it contributes to mertyusaatag#14
Partially it contributes to mpostol/OPC-UA-OOI#653.

@mpostol mpostol added the bug Something isn't working label Apr 20, 2022
@mpostol mpostol added this to the Erasmus Internship 22 milestone Apr 20, 2022
@mpostol mpostol self-assigned this Apr 20, 2022
@mpostol mpostol added this to Needs triage in Information Model Validation (IMV) via automation Apr 20, 2022
@mpostol mpostol moved this from Needs triage to High priority in Information Model Validation (IMV) Apr 20, 2022
@eoursel
Copy link

eoursel commented Jul 11, 2022

Hi @mpostol

I am doing some testing with the last model compiler (the last one on the OPCF Members repository) and IEC61850/

The problem is the definition of the reference type HasDataAttribute which is a subclass of HasComponent as described in the IEC61850-7-3 NodeSet.

The generated code looks like

<ObjectType SymbolicName="Prefix3:SPS" BaseType="Prefix3:IEC61850DOBaseObjectType">
    <References>
      <Reference>
        <ReferenceType>Prefix3:HasDataAttribute</ReferenceType>
        <TargetId>Prefix3:stVal</TargetId>
      </Reference>
      <Reference>
        <ReferenceType>Prefix3:HasDataAttribute</ReferenceType>
        <TargetId>Prefix3:q</TargetId>
      </Reference>

but the compiler fails to solve the TargetId's

PS C:\Users\eoursel\source\repos\mpostol\UA-Nodeset\IEC61850\ModelDesign> Opc.Ua.ModelCompiler.exe compile -d2 .\Opc.Ua.IEC61850-7-3.Model.xml -cg .\Opc.Ua.IEC61850-7-3.csv -o2 .\IEC61850-7-3 -version v104
Ignoring InvalidReference SPS => stVal. [The TargetId reference for node SPS is not valid: stVal.]
Ignoring InvalidReference SPS => q. [The TargetId reference for node SPS is not valid: q.]
Ignoring InvalidReference SPS => subEna. [The TargetId reference for node SPS is not valid: subEna.]
Ignoring InvalidReference SPS => subVal. [The TargetId reference for node SPS is not valid: subVal.]
Ignoring InvalidReference SPS => subQ. [The TargetId reference for node SPS is not valid: subQ.]
Ignoring InvalidReference SPS => subID. [The TargetId reference for node SPS is not valid: subID.]
Ignoring InvalidReference SPS => blkEna. [The TargetId reference for node SPS is not valid: blkEna.]
Ignoring InvalidReference SPS => d. [The TargetId reference for node SPS is not valid: d.]
Ignoring InvalidReference SPS => dU. [The TargetId reference for node SPS is not valid: dU.]
Ignoring InvalidReference SPS => cdcNs. [The TargetId reference for node SPS is not valid: cdcNs.]
Ignoring InvalidReference SPS => cdcName. [The TargetId reference for node SPS is not valid: cdcName.]
Ignoring InvalidReference SPS => dataNs. [The TargetId reference for node SPS is not valid: dataNs.]
Ignoring InvalidReference DPS => stVal. [The TargetId reference for node DPS is not valid: stVal.]
Ignoring InvalidReference DPS => q. [The TargetId reference for node DPS is not valid: q.]
Ignoring InvalidReference DPS => subEna. [The TargetId reference for node DPS is not valid: subEna.]
Ignoring InvalidReference DPS => subVal. [The TargetId reference for node DPS is not valid: subVal.]
Ignoring InvalidReference DPS => subQ. [The TargetId reference for node DPS is not valid: subQ.]
Ignoring InvalidReference DPS => subID. [The TargetId reference for node DPS is not valid: subID.]
Ignoring InvalidReference DPS => blkEna. [The TargetId reference for node DPS is not valid: blkEna.]
Ignoring InvalidReference DPS => d. [The TargetId reference for node DPS is not valid: d.]
Ignoring InvalidReference DPS => dU. [The TargetId reference for node DPS is not valid: dU.]


Obviously the generated code should use ObjectType -> Children -> Variable. But in this case the HasDataAttribute references will be changed to HasComponent.

Looks like a conceptual issue.

  1. First the idea to subclass HasComponent buy using HasDataAttribute in the IEC61850 model is questionable.
  2. Second point, the tag in the model compiler has some limitations because it is not possible to change the default HasComponent (or HasProperty) references to variables and properties. This behavior should require a modification of the ModelDesign Schema as well as a change in the model compiler source code.

what is your point of view on the subject?

Regards

@mpostol mpostol moved this from High priority to Erasmus 21-22 summer finalize in Information Model Validation (IMV) Jul 11, 2022
mpostol added a commit that referenced this issue Jul 13, 2022
…) Version: 3.0 #98

- added IEC61850 to the online documentation
@mpostol
Copy link
Owner Author

mpostol commented Jul 14, 2022

Now available is version Rel 3.1.1

mpostol added a commit that referenced this issue Jul 14, 2022
…) Version: 3.0 #98

Tested using the mdc Rel 3.1.1

- added empty *.csv files because the --cg i -g option doesn't work
mpostol added a commit that referenced this issue Jul 14, 2022
…) Version: 3.0 #98

- compiled the recovered models using mdc Rel. 3.1.1. Previously the mdc Rel  3.0.0. was used. The compilation result is similar.
- mdc has inconsistent compilation error warning generation. Some errors are signaled using exceptions but other writing message text directly to the console.
@mpostol
Copy link
Owner Author

mpostol commented Jul 15, 2022

Hi @eoursel, Many thanks for the feedback. Recently I worked on this issue so I will try to answer your question. You will find general information about the project stage/progress and direct answer to your question.

General stage and progress of the project

Thi issue was reported as a result of the project Information Model Validation (IMV) conducted thanks to the Erasmus program (internship and two final projects). The Erasmus Programme is a European Union student exchange program established in 1987. Unfortunately, the program is over and not all issues have been resolved.

To be honest, now all my activity targets my research related to the Object-Oriented Internet but not OPC UA. Still, OPC UA is a reference point and foundation for my research. Of course, in case of topics overlapping my findings could be useful also for the OPC UA community. Today I am closing work on this project so as the result this issue will also be closed after creating a new release to make a final checkpoint. My next step will be project Stand-alone Address Space conducted as a Master Thesis by @MichalSzczekocki. I will try to address this and other issues during this project if applicable.

HasDataAttribute - ModelCompiler error

The model IEC61850 has not been managed properly during the mentioned project for some reasons. It is a reason I reported this issue to:

  1. test the recovered models against mpostol/UA-ModelCompiler
  2. test the recovered models against ASMD and generate missing online documentation

Let me stress I am not using the ModelCompiler originated by OPC Foundation for many reasons. Instead, I am using forked from OPC Foundation ModelCompiler but it was modified.

Therefore my results are different and it is hard to compare my results gathered in the folder ModelDesign.

BTW, I am using the NuGet package OOI.ModelCompiler as compiler core. The main objective for defining the compiler part as the NuGet package is reusability. I am going to use the same package by ASMD and Address Space Prototyping Tool (asp.exe).

It is hard to compare results but it is easy to state that HasDataAttribute can be derived from HasComponent (it is valid) and the ModelCompiler must be able to handle this. Because the Children element doesn't allow defining the reference type we must use the Reference element to accomplish it. As far as I remember my discussion with @randy-armstrong always we can use Reference instead of Children in case the reference is not the default for the members. BTW, I started working on a description of the Model Design - Domain-Specific Language. Hopefully there will be a point in time that I will return to polishing this documentation. My point is that this must be harmonized with the further development of the ModelCompiler.

Hopefully, it helps. Let me know how it works for you.

Best regards,
Mariusz

@eoursel
Copy link

eoursel commented Jul 15, 2022 via email

mpostol added a commit that referenced this issue Jul 16, 2022
…) Version: 3.0 #98

- added MS Word help documentation
- contributes to contributes to mpostol/ASMD#264
@mpostol
Copy link
Owner Author

mpostol commented Jul 16, 2022

  • recreated the Model Design using mdc 3.1.1
  • added online documentation
  • generated the MS word documentation

The further work is postponed and will be covered by separate issues after commencing a new project.

@mpostol mpostol closed this as completed Jul 16, 2022
Information Model Validation (IMV) automation moved this from Erasmus 21-22 summer finalize to Closed Jul 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

2 participants