Skip to content

Commit

Permalink
Features and fixes: SAMM, IEC61360, AsciiDoc, Fixes, no empty lists, …
Browse files Browse the repository at this point in the history
…package format (#217)

* * progress

* * more working

* * background worker
  for OPC UA client is
  difficult ..

* * opc ua working ok
   w/ subscriptions

* * introduce update freq
   and polling time

* * menu actions for
   background operation

* * need improve predef
   export

* * update

* * some updates

* * update
* introduce plugin for
   product change notifications
* export AsciiDoc

* * update after switch origins

* * update again

* * small update to generic
   object mapper

* * update

* * mapping of PCN
   working

* * PCN panel navigate buttons

* * not the best attempt
   for PCN display

* * update

* * start refactor predefined concepts

* * after refactor of predefined concepts

* * update markdown

* * updates
* plugin PCN feature complete

* fixing issues with SmdExporter

* * update before refactor
   showContent

* * import of PCN XML
* start serialize AAS elements
   from mapped classes

* * update
* serialize C# to AAS classes
   works w/ small design
   flaws. More work required.,

* * improvment SMT export

* * issue #152

* * update

* * some fixes for AID; however to be
   replaced by new branch from
    Siemens team
* fix for OPC format (might be
   depulicate with fixes in other
   branches?!)

* * working on issue 193

* * fix issue #193
* see notes there for detail
* changed behaviour in
   FormInstance.cs:1203

* * improvement for issue # 170

* * fix issue # 33
* export generic forms with
   idShort Preset "{00}

* * fix issue # 30

* * fix issue # 23

* * fix issue # 10 (duplicate)

* * fix issue # 112
* table import should work again

* * fix issue # 112
* table import semanticIds
   with gGlobalReference

* * fix issue # 196
* bug: wrong URI for
   data specification

* * quick fix for issue # 174

* * some bugfixes

* * bug fix for new Spec for Package format

* * test

* * update

* * update

* * updates

* * update

* * after merge with main

* * try fixing mix of main and
   this branch w.r.t. to package
   management

* Update README.md

Updated the links and badges

* Update README.md

Updated the links and badges

* Update README.md

Updated the links and badges

* * fixes to SaveAs...

* * intermediate save

* * continue softening empty
   lists (supplSemId, Qualifiers,
   Extensions)

* Create Contributors.md

* update contributors and companies

* Add contributors links to other information files

* Fix minor issue with OperationVariable

* Instantiate submodel list

* *fix for supplementary files not appearing (#219)

* * update

* * continue avoid empty list
* polish Operation

* * polish RefElelem, RelElem

* * polish SME

* * various updates
* fix order of paste into
* Note: sequence of selection
  does matter

* * fixes to package saving

* * update before changing
  Submodels management

* * update edinting of
   potentially null lists

* * refacture Env.Submodels, AAS, CDs,
   AAS.Submodels to have accessor-methods
   in super-ordinate entities to provide
   empty-list / null - behaviour.

* * update before going to
  SMC null / empty list challenged

* * update

* * update

* * fixes w.r.t. to the AsciiDoc
   generation

* Set Submodel/Kind as per action (#225)

* Fixes the issue 226 (#228)

* * updates for product change
  notifications
* use more preferred name than
   short names from CDs
* refactor use of Aas.IEnvironment
   instead Aas.Environment

* * add PCN plugin to release

* * again: build script

* * improve BOM plugin
   functionality

* * remove MsAglControl
* right-click menu

* * wasted another 2h in trying to export
   SVG. Very unsatisfying MSAGL lib!!

* * options for suppl.
   semanticIds

* * finalize BOM editing

* * try change to new OPC UA
   client library

* * resolve merge duplicated

* * add SMT HierStruct V1.1
* fix BOM plugin

* * migrate (copy) new OPC UA lib
  to MTP
* basically running

* * ported antique Read OPC values into Submodel
  to ne OPC UA client lib

* * remove OPCF client references

* * remove OPCF UA server
* remove BlazorUI (not BlazorExplorer)
* remove AasxCsharpLib_bkp

* * remove superfluous
   Opc.Ua.SampleClient.Config.xml

* * remove menu commands
  for OPC UA server

* * improve scripting
   for integration testing

* Fix for the issue 235 (#236)

* * a little scripting for
  testing

* Fix for GitHub Issue 201

* Instantiate Submodel List

* * work on empty list
   for CDs
* find statistics fixed

* * small fixes

* Instantiate list of CDs

* Support for AID and AIMC Submodel Templates (#211)

* A commit for AID and AIMC implementations

This commit combines all implementation based on AID and AIMC.
AASXPluginAID is for AID and AASXPluginAssetInterfaceDesc is majorly for AIMC.

* some newlines added for code readability

* * remove Lucene.Net

* Revert "Support for AID and AIMC Submodel Templates (#211)" (#243)

This reverts commit 51d7192.

* Update README.md

* * update binary files changed
   by CR/LF flasg
* fix bugs in predefined data
* show AAS/thumbnail

* * initial tinkering

* * more SAMM models
* CD sort order structured
* box icons

* * more SAMM details
* editing
* import TTL

* * first SAMM ttl imported

* * colorize Characteristics

* * before refactoring becaus
  of anonymous instances

* * de-serialize and combo box
   of enum types in Constraints

* * editing of constraints

* * temporary stage

* * SAMM import extended
* SAMM export to Turtle
   works initally

* * more export
* rework import
* edit preferred names
* create Submodel instance

* * multiple SAMM versions
* creat SM instance

* * adding Qualifiers to the
   Samm SM instance creation

* * update

* * SMT value validation
  in 1st degree in UI

* * checking based on CDs
   works first time

* * fix SMT organizes
* add SMT elements
* working on add SAMM

* * just update

* * update

* * create Submodel from SMT/SAMM CDs

* * update sources

* * update sources

* * load repositories resident
  to find CDs for SAMM/ SMT

* * bug fixes

* * bugfix menu

* * have Cardinality for SME but
   put it in Organizes as well

* Add documentation (#670) (#671)

Documentation is added including background information on SAMM and ESMF + Step by Step documentation how to guide Submodel creation via an aspect model.

* * bug fix for SM Documents in some cases

* Add new chapters to documentation (#675)

* Add documentation (#670)

Documentation is added including background information on SAMM and ESMF + Step by Step documentation how to guide Submodel creation via an aspect model.

* Add new chapters to documentation (#674)

* add documentation to src/AASxCore_Samm2_2_0

* add link to source of Movement.ttl example used in document

* Add new chapter "Edit new SAMM aspect model" and new chapter "Background on Implementation" explaining data specifications and extensions

* * small enhancements
  of guidance

* Update docu with SMT-attribute-set extensions (#683)

* Delete src/AasxCore.Samm2_2_0/docs directory

Directory will be renamed to "documentation"

* Create folder "documentation"

file temp.txt will be removed later

* Extend Documentation with SMT-attribute-Extensions

Documentation updated, common parts extracted. SAMM and SMT-attribute extensions described

* Delete src/AasxCore.Samm2_2_0/documentation/temp.txt

was only created for creating a folder

* Create temp.txt

* Createfolder examples

* Delete src/AasxCore.Samm2_2_0/documentation/src/temp.txt

was for creating folder only

* Add examples aasx and ttl

Examples added that are used in documentation

* Delete src/AasxCore.Samm2_2_0/documentation/examples/temp.txt

was created to create folder only

* Create folder src

* Upload figures 

Figures for documentation added

* fix table format in Annex

Annex SMT Attributes Sets: fix table

* Fix table of content

Table of content did not match with chapter structure.

* * temp commit

* * issue with compiling

* * .suo file was defect

* * modbus v0.1 working

* * HTTP and Modbus

* * investigate dll error for MQTT

* * continous run
  for http 1st gen

* * first steps in async

* * progress

* * more working

* * background worker
  for OPC UA client is
  difficult ..

* * opc ua working ok
   w/ subscriptions

* * introduce update freq
   and polling time

* * menu actions for
   background operation

* * need improve predef
   export

* * update

* * some updates

* * update
* introduce plugin for
   product change notifications
* export AsciiDoc

* * update after switch origins

* * update again

* * small update to generic
   object mapper

* * update

* * mapping of PCN
   working

* * PCN panel navigate buttons

* * not the best attempt
   for PCN display

* * update

* * start refactor predefined concepts

* * after refactor of predefined concepts

* * update markdown

* * update before refactor
   showContent

* * updates
* plugin PCN feature complete

* fixing issues with SmdExporter

* * import of PCN XML
* start serialize AAS elements
   from mapped classes

* * update
* serialize C# to AAS classes
   works w/ small design
   flaws. More work required.,

* * improvment SMT export

* * issue #152

* * update

* * some fixes for AID; however to be
   replaced by new branch from
    Siemens team
* fix for OPC format (might be
   depulicate with fixes in other
   branches?!)

* * working on issue 193

* * fix issue #193
* see notes there for detail
* changed behaviour in
   FormInstance.cs:1203

* * improvement for issue # 170

* * fix issue # 33
* export generic forms with
   idShort Preset "{00}

* * fix issue # 30

* * fix issue # 23

* * fix issue # 10 (duplicate)

* * fix issue # 112
* table import should work again

* * fix issue # 112
* table import semanticIds
   with gGlobalReference

* * fix issue # 196
* bug: wrong URI for
   data specification

* * quick fix for issue # 174

* * some bugfixes

* * bug fix for new Spec for Package format

* * update

* * test

* * update

* * updates

* * update

* * after merge with main

* * try fixing mix of main and
   this branch w.r.t. to package
   management

* * fixes to SaveAs...

* * intermediate save

* * continue softening empty
   lists (supplSemId, Qualifiers,
   Extensions)

* * update

* * continue avoid empty list
* polish Operation

* * polish RefElelem, RelElem

* * polish SME

* * various updates
* fix order of paste into
* Note: sequence of selection
  does matter

* * fixes to package saving

* * update before changing
  Submodels management

* * update edinting of
   potentially null lists

* * refacture Env.Submodels, AAS, CDs,
   AAS.Submodels to have accessor-methods
   in super-ordinate entities to provide
   empty-list / null - behaviour.

* * update before going to
  SMC null / empty list challenged

* * update

* * update

* * fixes w.r.t. to the AsciiDoc
   generation

* * updates for product change
  notifications
* use more preferred name than
   short names from CDs
* refactor use of Aas.IEnvironment
   instead Aas.Environment

* * add PCN plugin to release

* * again: build script

* * improve BOM plugin
   functionality

* * try change to new OPC UA
   client library

* * remove MsAglControl
* right-click menu

* * wasted another 2h in trying to export
   SVG. Very unsatisfying MSAGL lib!!

* * options for suppl.
   semanticIds

* * finalize BOM editing

* * resolve merge duplicated

* * add SMT HierStruct V1.1
* fix BOM plugin

* * migrate (copy) new OPC UA lib
  to MTP
* basically running

* * ported antique Read OPC values into Submodel
  to ne OPC UA client lib

* * remove OPCF client references

* * remove OPCF UA server
* remove BlazorUI (not BlazorExplorer)
* remove AasxCsharpLib_bkp

* * remove superfluous
   Opc.Ua.SampleClient.Config.xml

* * remove menu commands
  for OPC UA server

* * improve scripting
   for integration testing

* * a little scripting for
  testing

* * work on empty list
   for CDs
* find statistics fixed

* * small fixes

* * remove Lucene.Net

* * after rebase to main (without
   AID update) and merges, push
   back to PR

* * pending fixes from merge

* * remove exception from
   text find/replace
* add support for script
   log access

* * trying to script
   copy/paste
* screenshot by script

* * fix for activate actions
  by scripting

* * options for auto-size
   behavior of window

* * select first plugin in SM
   for scripting

---------

Co-authored-by: Michael Hoffmeister <michael.hoffmeister@festo.com>
Co-authored-by: AlexanderWollbrink <alexander.wollbrink@iosb-ina.fraunhofer.de>
Co-authored-by: MichaHofft <michahofft2@googlemail.com>
Co-authored-by: Marta <84308731+martafullen@users.noreply.github.com>
Co-authored-by: martaf <marta.fullen@iosb-ina.fraunhofer.de>
Co-authored-by: Oliver <info@oliver-fries.de>
Co-authored-by: juileetikekar <juilee.tikekar@idtwin.org>
Co-authored-by: AlexanderWollbrink <68860592+AlexanderWollbrink@users.noreply.github.com>
Co-authored-by: juileetikekar <99317579+juileetikekar@users.noreply.github.com>
Co-authored-by: Kazeem Oladipupo <67549739+Kaz040@users.noreply.github.com>
Co-authored-by: Birgit Boss <59824205+BirgitBoss@users.noreply.github.com>
  • Loading branch information
12 people committed Aug 30, 2024
1 parent 4a9ef04 commit e9d8917
Show file tree
Hide file tree
Showing 412 changed files with 32,873 additions and 33,155 deletions.
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
* core.autocrlf=true

*.cs text eol=crlf
.xaml diff
.xaml diff
Binary file removed .vs/AASXPackageExplorer/v17/.wsuo
Binary file not shown.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
> Current development of AASX Package Explorer only supports AAS V3.
> If you need to view AAS V2 files, see the branch [here](https://github.com/eclipse-aaspe/aaspe/tree/V2).
# Eclipse AASX Package Explorer
# Eclipse AASX Package Explorer

![GitHub Downloads (all assets, all releases)](https://img.shields.io/github/downloads/eclipse-aaspe/package-explorer/total)
[![Contributors](https://img.shields.io/github/contributors/eclipse-aaspe/package-explorer)](https://github.com/badges/eclipse-aaspe/package-explorer/contributors)
Expand All @@ -23,7 +23,7 @@
[![Release](https://img.shields.io/github/v/release/eclipse-aaspe/package-explorer?include_prereleases)](https://github.com/eclipse-aaspe/package-explorer/releases)
[![Status](https://img.shields.io/github/checks-status/eclipse-aaspe/package-explorer/v2024-05-08.alpha)]()

Eclipse AASX Package Explorer is a C# based viewer and editor for the
Eclipse AASX Package Explorer is a C# based viewer and editor for the
Asset Administration Shell.

![screenshot](screenshot.png)
Expand Down
21 changes: 11 additions & 10 deletions src/AasxAmlImExport/AmlExport.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ This source code may use other Open Source software components (see LICENSE.txt)
using System.Collections.Generic;
using System.Reflection;
using System.Text.RegularExpressions;
using Aas = AasCore.Aas3_0;

namespace AasxAmlImExport
{
Expand Down Expand Up @@ -313,7 +314,7 @@ private static void SetQualifiers(
}

private static void ExportReferenceWithSme(
AasCore.Aas3_0.Environment env,
Aas.IEnvironment env,
List<AmlInternalLinkEntity> internalLinksToCreate,
InternalElementType ie,
IReferable referable,
Expand Down Expand Up @@ -376,7 +377,7 @@ private static void ExportReferenceWithSme(

private static void ExportListOfSme(
AasAmlMatcher matcher, List<AmlInternalLinkEntity> internalLinksToCreate,
SystemUnitClassType parent, AasCore.Aas3_0.Environment env,
SystemUnitClassType parent, Aas.IEnvironment env,
List<ISubmodelElement> wrappers, bool tryUseCompactProperties = false,
bool aasStyleAttributes = false, bool amlStyleAttributes = true)
{
Expand Down Expand Up @@ -647,7 +648,7 @@ private static void ExportListOfSme(
private static void ExportSubmodelIntoElement(
AasAmlMatcher matcher, List<AmlInternalLinkEntity> internalLinksToCreate,
SystemUnitClassType parent,
AasCore.Aas3_0.Environment env,
IEnvironment env,
ISubmodel sm,
bool tryUseCompactProperties = false,
bool exportShallow = false)
Expand Down Expand Up @@ -678,7 +679,7 @@ private static void ExportSubmodelIntoElement(
private static InternalElementType ExportSubmodel(
AasAmlMatcher matcher,
List<AmlInternalLinkEntity> internalLinksToCreate, InternalElementSequence ieseq,
AasCore.Aas3_0.Environment env,
Aas.IEnvironment env,
ISubmodel sm,
bool tryUseCompactProperties = false,
bool exportShallow = false)
Expand All @@ -698,7 +699,7 @@ private static InternalElementType ExportSubmodel(
}

private static void ExportAsset(
InternalElementSequence ieseq, AasCore.Aas3_0.Environment env, IAssetInformation asset)
InternalElementSequence ieseq, Aas.IEnvironment env, Aas.IAssetInformation asset)
{
if (ieseq == null || env == null || asset == null)
return;
Expand Down Expand Up @@ -776,7 +777,7 @@ private static void ExportAsset(
// dead-csharp on
private static void ExportAAS(
AasAmlMatcher matcher, InstanceHierarchyType insthier, SystemUnitClassLibType suchier,
AasCore.Aas3_0.Environment env, IAssetAdministrationShell aas,
IEnvironment env, IAssetAdministrationShell aas,
bool tryUseCompactProperties = false)
{
// access
Expand Down Expand Up @@ -816,7 +817,7 @@ private static void ExportAAS(
//
// Submodels can be of kind Type/ Instance
//
foreach (var smref in aas.Submodels)
foreach (var smref in aas.AllSubmodels())
{
// ref -> Submodel
var sm = env.FindSubmodel(smref);
Expand Down Expand Up @@ -1026,14 +1027,14 @@ private static void SetAttributesForConceptDescription(


private static void ExportConceptDescriptionsWithExtraContentToIHT(
InstanceHierarchyType lib, AasCore.Aas3_0.Environment env)
InstanceHierarchyType lib, Aas.IEnvironment env)
{
// acceess
if (lib == null || env == null)
return;

// over CDs
foreach (var cd in env.ConceptDescriptions)
foreach (var cd in env.AllConceptDescriptions())
{
// make IE for CD itself (outer IE)
string name = "TODO-CD";
Expand Down Expand Up @@ -1164,7 +1165,7 @@ public static bool ExportTo(AdminShellPackageEnv package, string amlfn, bool try
var matcher = new AasAmlMatcher();

// over all AAS
foreach (var aas in package.AasEnv.AssetAdministrationShells)
foreach (var aas in package.AasEnv.AllAssetAdministrationShells())
{
ExportAAS(matcher, insthier, suchier, package.AasEnv, aas, tryUseCompactProperties);
}
Expand Down
30 changes: 9 additions & 21 deletions src/AasxAmlImExport/AmlImport.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1096,7 +1096,7 @@ public void ParseInternalElementsForAasEntities(
Debug(indentation, " AAS with required attributes recognised. Starting new AAS..");

// make temporary object official
this.package.AasEnv.AssetAdministrationShells.Add(aas);
this.package.AasEnv.Add(aas);
currentAas = aas;
matcher.AddMatch(aas, ie);
}
Expand Down Expand Up @@ -1173,12 +1173,8 @@ public void ParseInternalElementsForAasEntities(
// Remark: add only, if not a SM with the same ID is existing. This could have the
// consequences that additional properties in the 2nd SM with the same SM get lost!
if (null == this.package.AasEnv.FindSubmodelById(sm.Id))
this.package.AasEnv.Submodels.Add(sm);
if (currentAas.Submodels == null)
{
currentAas.Submodels = new List<IReference>();
}
currentAas.Submodels.Add(sm.GetReference());
this.package.AasEnv.Add(sm);
currentAas.Add(sm.GetReference());
currentSmeCollection = sm;
}
else
Expand All @@ -1195,13 +1191,9 @@ public void ParseInternalElementsForAasEntities(
{
// try use Identification to find existing Submodel
var existSm = package.AasEnv.FindSubmodelById(targetSm.Id);
if (currentAas.Submodels == null)
{
currentAas.Submodels = new List<IReference>();
}

// if so, add a SubmodelRef
currentAas.Submodels.Add(existSm.GetReference());
currentAas.Add(existSm.GetReference());
}
}

Expand Down Expand Up @@ -1448,7 +1440,7 @@ public void ParseSystemUnits(
aas = existAas;
else
// add
this.package.AasEnv.AssetAdministrationShells.Add(aas);
this.package.AasEnv.Add(aas);

// remember
currentAas = aas;
Expand Down Expand Up @@ -1481,12 +1473,8 @@ public void ParseSystemUnits(
currentSubmodel = sm;

// this will be the parent for child elements
this.package.AasEnv.Submodels.Add(sm);
if (currentAas.Submodels == null)
{
currentAas.Submodels = new List<IReference>();
}
currentAas.Submodels.Add(sm.GetReference());
this.package.AasEnv.Add(sm);
currentAas.Add(sm.GetReference());
currentSmeCollection = sm;
}
else
Expand Down Expand Up @@ -1530,7 +1518,7 @@ public void ParseIEsForConceptDescriptions(
{
// add
Debug(indentation, " .. added as {0}", cd.Id);
this.package.AasEnv.ConceptDescriptions.Add(cd);
this.package.AasEnv.Add(cd);

// look for direct descendants = Data Specifcations
if (ie.InternalElement != null)
Expand Down Expand Up @@ -1671,7 +1659,7 @@ public static void ImportInto(AdminShellPackageEnv package, string amlfn)
parser.ParseSystemUnits(x.SystemUnitClass);

// the following steps will require valid parent information
foreach (var sm in package.AasEnv.Submodels)
foreach (var sm in package.AasEnv.AllSubmodels())
sm.SetAllParents();

// do the late population of views
Expand Down
8 changes: 4 additions & 4 deletions src/AasxBammRdfImExport/RDFimport.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public static class BAMMRDFimport
public static AdminShellNS.AdminShellPackageEnv thePackageEnv;

public static void ImportInto(
string rdffn, Aas.Environment env, Aas.ISubmodel sm,
string rdffn, Aas.IEnvironment env, Aas.ISubmodel sm,
Aas.Reference smref)
{
thePackageEnv = new AdminShellNS.AdminShellPackageEnv();
Expand Down Expand Up @@ -75,7 +75,7 @@ public static void ImportInto(

var msemanticID = ExtendReference.CreateFromKey(Aas.KeyTypes.GlobalReference, t.Subject.ToString());
sm.SemanticId = msemanticID;
thePackageEnv.AasEnv.Submodels.Add(sm);
thePackageEnv.AasEnv.Add(sm);
}
}

Expand Down Expand Up @@ -373,7 +373,7 @@ public static void ImportInto(

{
var cd = new Aas.ConceptDescription(idShort: property_Name, id: semantic);
env.ConceptDescriptions.Add(cd);
env.Add(cd);
cd.SetIEC61360Spec(
preferredNames: new[] { "EN", property_PreferredName },
shortName: null,
Expand Down Expand Up @@ -445,7 +445,7 @@ public static void ImportInto(

{
var cd = new Aas.ConceptDescription(idShort: "" + name, id: semantic);
env.ConceptDescriptions.Add(cd);
env.Add(cd);
cd.SetIEC61360Spec(
preferredNames: new[] { "EN", preferred_name },
shortName: null,
Expand Down
17 changes: 17 additions & 0 deletions src/AasxCore.Samm2_2_0/AasxCore.Samm2_2_0.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<OutputType>Library</OutputType>
<RootNamespace>AasCore.Samm</RootNamespace>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\AasCore.Aas3_0\AasCore.Aas3_0.csproj" />
<ProjectReference Include="..\AasxCsharpLibrary\AasxCsharpLibrary.csproj" />
</ItemGroup>

</Project>
Loading

0 comments on commit e9d8917

Please sign in to comment.