aasx-package-explorer icon indicating copy to clipboard operation
aasx-package-explorer copied to clipboard

Investigate Package Central approach 2nd attempty

Open MichaelHoffmeisterFesto opened this issue 4 years ago • 1 comments

DO NOT MERGE IMMEDIATELY -- PR IS TO BE CHECKED FURTHER!!

This PR collects the necessary changes to investigate the possibilities of having a integrated and transparent handling of multiple AASX packages in the Package Explorer. The ultimate goal is to re-unify Package Explorer and AASX Server. At the same time, dealing with file lists, repositories and registries is a very interesting demonstration scenario for the 2021 capabilities of the AAS.

As low hanging fruit, last recently used files were implemented. Multiple file lists are visually presented in the lower/ left corner of the main window.

Conntected to the idea of transparent network ressource access is the ideas of AAS events asynchronously reporting on value updates, structural changes and more. This idea was already described in the AAS in Deteails Part 1 V2.0.1 and was prototyped here. So, emitting of events, routing of events to different containers and visually indicating them is also part of the story. This lead to the creation of an Plotting plugin to visually show trends and be the basis of the Time Series Data Submodel support.

All these investigations were found inter- connected and are therefore integrated in the PR.

Not everything is already perfect:

  • automatic load of AAS-ENVs (LoadResident) for ContainerLists
  • event routing is still incomplete
  • structural events are missing
  • OPC UA, REST servers and MQTT are to be implemented as PackageConnectors

In historical order, the main changes:

Extend and modify PackageCentral

  • test in App.xaml.cs
  • more classes
  • adopt main app (initially)
  • plan to have folder

Continue PackageCentral

  • guess PackageContainer via Factory
  • download HTTP (sync)

Develop ConnectIntegrated

  • 3rd approach of better connect dialogue
  • to be integrated with PackageCentral
  • to show Log
  • to be able to ask questions back

Work on network loading with progress

  • factory of PackageCentral
  • fiddling with async
  • IntegratedConnect dialogue
  • still not perfect
  • code needs to be cleaned

Update sources

  • get PackageCentral called from main application
  • more fiddling with async
  • repository basically able to load HTTP locations

Merge PackExpl. and Server

  • WinMerge both AdminShell.cs
  • some diffs SE -> PE, many diffs PE -> SE

Merge PackExpl. and Server

  • necessary fixes to compile again

Fix issues with load/save

  • while trying to work with some AAS, multiple load/ save glitches from new function show up and are fixed incrementally

Work on event messages

  • esp. update value event
  • event handling in PakcageCentral
  • trigger REST Update (by timer) and convert to event
  • update event dispatch within editor and redisplay

Investigate application of update REST events

  • put updating of AAS directly in SimulateUpdateValuesEventByGetAsync()
  • working, but not considered helpful in the long run

Work on REST event message handling

  • now REST updats will be consumed by the ContainerBase

This is very much to be thought of. This approach will mean, that all connectors will only emit UpdateEvents but will not update the AAS themselves. This is kind of attractive, but will mean, that all updates to AAS must be (complicated) channeled through the update events and might increase the complexity.

Further idea is to mark the event as "AlreadyUpdatedToAAS" and let the above mechanism only work on demand.

Add new plugin for plotting

  • project, mostly taken over from TechnicalData
  • data grid for plot items is rendered
  • 1st version of plugin works
  • grouping of plot items according arguments
  • autoscroll, synchronized movements
  • some 1st state reached
  • not working: lang-ComboBox
  • not working: zoom of WpfPlot-s

Update event definition

  • event message is now an envelope
  • carries multiple payloads
  • "update values" is a payload
  • works like a charm!

Investigate markup for message details

  • RTF, HTML, XAML with FlowDocument
  • all difficult
  • considered: Microsoft.Toolkit.Uwp.Markdown
  • but too fat

Work on markup for messages

  • added MiniMarkup-classes
  • cumbersome reendering, but somehow ok
  • work "fairly good enough"

Work on PUT AASX on REST

  • very 1st version of PUT as "save" in PackageCentral
  • but needs to get more async ..

Work on progressbar

  • refactor code for better quality

Uppdate sources

  • try to implement collectoin changed for list of repo controls, but seems to be wrong pattern

Work on file repositories

  • instead of 1, have the possibility to maintain multiple repos
  • in future: of different type, such as registry and repo via HTTP
  • View&Model approach
  • Context-menu in single repo items
  • all (old) functions still available

Work on file repository items

A item shall be 1:1 with an AASX package, therefore multiple AasIds and AssetIds shall be facilitated. In future also: SubmodelIds, as they can be addressed direclty (without leading AAS) in References.

Work on File repository

  • refactor FileItem to be outside the repository class for clarity

Refactor AasxFileRepository

Differentiate file positories in 3 kinds: local, from repository, from registry to allow a better functionality, espacially for connected repositories.

Update sources

  • bug fixed: drag&drop of file repos
  • MessageBox: nicer buttons

Refactor AASX file repo classes

Aim to ist unify the AasxFileRepo* classes with the PackageContainer* classes. Both are now associated with AASX packages and the unified ones (PackageContainerRepoItem) combine the capabilities of detailing, WHERE a packe is stored, WHICH Ids it is responsibele for with the actual Environment for this package and the capability of online retrieval, update and AAS event handling.

The goal is to have PackageCentral to index all contemporary known AASX packages and to give exactly one place to access, update and persist them to all other functionalities of AASX Package Explorer.

The further goal is to provide a List of Packages to the AASX Server, such that in long term, the AASX Server will use PackageCentral as central data structure.

MichaelHoffmeisterFesto avatar Jan 21 '21 18:01 MichaelHoffmeisterFesto

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Feb 21 '21 09:02 CLAassistant