Skip to content

Commit e39c560

Browse files
committed
* implement SMT Tech Data 2.0
1 parent 0c84b3d commit e39c560

14 files changed

Lines changed: 1960 additions & 168 deletions

File tree

src/AasxCsharpLibrary/AdminShellBasicExtensions.cs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*
1+
/*
22
Copyright (c) 2018-2023 Festo SE & Co. KG <https://www.festo.com/net/de_de/Forms/web/contact_international>
33
Author: Michael Hoffmeister
44
@@ -44,6 +44,14 @@ public static IEnumerable<T> ForEachSafe<T>(this List<T> list)
4444
yield return x;
4545
}
4646

47+
public static IEnumerable<T> ForEachSafe<T>(this IEnumerable<T> list)
48+
{
49+
if (list == null)
50+
yield break;
51+
foreach (var x in list)
52+
yield return x;
53+
}
54+
4755
public static void ForEach<T>(this IList<T> list, Action <T> action)
4856
{
4957
if (list == null)

src/AasxIntegrationBase/AasxPluginOptionsBase.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*
1+
/*
22
Copyright (c) 2018-2023 Festo SE & Co. KG <https://www.festo.com/net/de_de/Forms/web/contact_international>
33
Author: Michael Hoffmeister
44

src/AasxIntegrationBaseGdi/AnyUI/AnyUiMagickHelper.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -296,13 +296,13 @@ public void Add(
296296
public async Task<bool> TickToLoad(
297297
ISecurityAccessHandler secureAccess)
298298
{
299-
if (_jobs.Count < 1)
300-
return false;
301-
302299
// pick one and start
303300
DelayedFileContentLoadBase job = null;
304301
lock (_jobs)
305302
{
303+
if (_jobs.Count < 1)
304+
return false;
305+
306306
job = _jobs.First();
307307
_jobs.RemoveAt(0);
308308
}

src/AasxPackageExplorer/options-debug.MIHO.json

Lines changed: 96 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
// "AasxToLoad": "C:\\Users\\Micha\\Desktop\\test-smt-on-basyx\\IDTA_02036-1-0_SMT_ProductChangeNotification_Draft_v35_manual_fixes.aasx"
1010
//"AasxToLoad": "C:\\HOMI\\Develop\\Aasx\\SMT\\IDTA 02036-1-0_Submodel_ProductChangeNotification\\IDTA_02036-1-0_SMT_ProductChangeNotification_Draft_v40_add_podman.aasx"
1111
// "AasxToLoad": "http://localhost:8081/shells/aHR0cHM6Ly9hZG1pbi1zaGVsbC1pby9pZHRhL2Fhcy9Qcm9kdWN0Q2hhbmdlTm90aWZpY2F0aW9ucy8xLzA"
12+
"AasxToLoad": "C:\\HOMI\\Develop\\Aasx\\namur\\Example_Namur_SMT_TechDataAsyncMotors\\Example_Namur_SMT_TechDataAsyncMotors_v09_sections_1_2_3.aasx",
1213
/* This file shall be loaded as aux package at start of application | Arg: <path> */
1314
"AuxToLoad": null
1415
/* List of pathes to a JSON, defining a set of AasxPackage-Files, which serve as repository. | Arg: <path> */,
@@ -53,8 +54,8 @@
5354
"AccessInfo": {
5455
"Method": "None" // None, Ask, Basic, CertificateStore, File, InteractiveEntry, Secret
5556
}
56-
},
57-
{
57+
},
58+
{
5859
"BaseAddress": "https://leo-discovery.admin-shell-io.com/api/v2/",
5960
"AccessInfo": {
6061
"Method": "None" // None, Ask, Basic, CertificateStore, File, InteractiveEntry, Secret
@@ -333,96 +334,96 @@
333334
"IntegratedConnectPresets": [
334335
]
335336
/* Contains a list of tuples (filenames, args) of plugins to be loaded. */,
336-
"PluginDll": [
337-
{
338-
"Path": "..\\..\\..\\..\\..\\..\\AasxPluginProductChangeNotifications\\bin\\Debug\\net8.0-windows\\AasxPluginProductChangeNotifications.dll",
339-
"Args": [],
340-
"Options": null,
341-
"DefaultOptions": null
342-
},
343-
{
344-
"Path": "..\\..\\..\\..\\..\\..\\AasxPluginAssetInterfaceDesc\\bin\\Debug\\net8.0-windows\\AasxPluginAssetInterfaceDesc.dll",
345-
"Args": [],
346-
"Options": null,
347-
"DefaultOptions": null
348-
},
349-
{
350-
"Path": "..\\..\\..\\..\\..\\..\\AasxPluginKnownSubmodels\\bin\\Debug\\net8.0-windows\\AasxPluginKnownSubmodels.dll",
351-
"Args": [],
352-
"Options": null,
353-
"DefaultOptions": null
354-
},
355-
{
356-
"Path": "..\\..\\..\\..\\..\\..\\AasxPluginDigitalNameplate\\bin\\Debug\\net8.0-windows\\AasxPluginDigitalNameplate.dll",
357-
"Args": [],
358-
"Options": null,
359-
"DefaultOptions": null
360-
},
361-
{
362-
"Path": "..\\..\\..\\..\\..\\..\\AasxPluginDocumentShelf\\bin\\Debug\\net8.0-windows\\AasxPluginDocumentShelf.dll",
363-
"Args": [],
364-
"Options": null,
365-
"DefaultOptions": null
366-
},
367-
{
368-
"Path": "..\\..\\..\\..\\..\\..\\AasxPluginContactInformation\\bin\\Debug\\net8.0-windows\\AasxPluginContactInformation.dll",
369-
"Args": [],
370-
"Options": null,
371-
"DefaultOptions": null
372-
},
373-
{
374-
"Path": "..\\..\\..\\..\\..\\..\\AasxPluginGenericForms\\bin\\Debug\\net8.0-windows\\AasxPluginGenericForms.dll",
375-
"Args": [],
376-
"Options": null,
377-
"DefaultOptions": null
378-
},
379-
{
380-
"Path": "..\\..\\..\\..\\..\\..\\AasxPluginAdvancedTextEditor\\bin\\Debug\\net8.0-windows\\AasxPluginAdvancedTextEditor.dll",
381-
"Args": [],
382-
"Options": null,
383-
"DefaultOptions": null
384-
},
385-
{
386-
"Path": "..\\..\\..\\..\\..\\..\\AasxPluginTechnicalData\\bin\\Debug\\net8.0-windows\\AasxPluginTechnicalData.dll",
387-
"Args": [],
388-
"Options": null,
389-
"DefaultOptions": null
390-
},
391-
{
392-
"Path": "..\\..\\..\\..\\..\\..\\AasxPluginBomStructure\\bin\\Debug\\net8.0-windows\\AasxPluginBomStructure.dll",
393-
"Args": [],
394-
"Options": null,
395-
"DefaultOptions": null
396-
},
397-
{
398-
"Path": "..\\..\\..\\..\\..\\..\\AasxPluginPlotting\\bin\\Debug\\net8.0-windows\\AasxPluginPlotting.dll",
399-
"Args": [],
400-
"Options": null,
401-
"DefaultOptions": null
402-
},
403-
{
404-
"Path": "..\\..\\..\\..\\..\\..\\AasxPluginImageMap\\bin\\Debug\\net8.0-windows\\AasxPluginImageMap.dll",
405-
"Args": [],
406-
"Options": null,
407-
"DefaultOptions": null
408-
},
409-
{
410-
"Path": "..\\..\\..\\..\\..\\..\\AasxPluginMtpViewer\\bin\\Debug\\net8.0-windows\\AasxPluginMtpViewer.dll",
411-
"Args": [],
412-
"Options": null,
413-
"DefaultOptions": null
414-
},
415-
{
416-
"Path": "..\\..\\..\\..\\..\\..\\AasxPluginExportTable\\bin\\Debug\\net8.0-windows\\AasxPluginExportTable.dll",
417-
"Args": [],
418-
"Options": null,
419-
"DefaultOptions": null
420-
},
421-
{
422-
"Path": "..\\..\\..\\..\\..\\..\\AasxPluginWebBrowser\\bin\\x64\\Debug\\AasxPluginWebBrowser.dll",
423-
"Args": [],
424-
"Options": null,
425-
"DefaultOptions": null
426-
}
427-
]
428-
}
337+
"PluginDll": [
338+
{
339+
"Path": "..\\..\\..\\..\\..\\..\\AasxPluginProductChangeNotifications\\bin\\Debug\\net8.0-windows\\AasxPluginProductChangeNotifications.dll",
340+
"Args": [],
341+
"Options": null,
342+
"DefaultOptions": null
343+
},
344+
{
345+
"Path": "..\\..\\..\\..\\..\\..\\AasxPluginAssetInterfaceDesc\\bin\\Debug\\net8.0-windows\\AasxPluginAssetInterfaceDesc.dll",
346+
"Args": [],
347+
"Options": null,
348+
"DefaultOptions": null
349+
},
350+
{
351+
"Path": "..\\..\\..\\..\\..\\..\\AasxPluginKnownSubmodels\\bin\\Debug\\net8.0-windows\\AasxPluginKnownSubmodels.dll",
352+
"Args": [],
353+
"Options": null,
354+
"DefaultOptions": null
355+
},
356+
{
357+
"Path": "..\\..\\..\\..\\..\\..\\AasxPluginDigitalNameplate\\bin\\Debug\\net8.0-windows\\AasxPluginDigitalNameplate.dll",
358+
"Args": [],
359+
"Options": null,
360+
"DefaultOptions": null
361+
},
362+
{
363+
"Path": "..\\..\\..\\..\\..\\..\\AasxPluginDocumentShelf\\bin\\Debug\\net8.0-windows\\AasxPluginDocumentShelf.dll",
364+
"Args": [],
365+
"Options": null,
366+
"DefaultOptions": null
367+
},
368+
{
369+
"Path": "..\\..\\..\\..\\..\\..\\AasxPluginContactInformation\\bin\\Debug\\net8.0-windows\\AasxPluginContactInformation.dll",
370+
"Args": [],
371+
"Options": null,
372+
"DefaultOptions": null
373+
},
374+
{
375+
"Path": "..\\..\\..\\..\\..\\..\\AasxPluginGenericForms\\bin\\Debug\\net8.0-windows\\AasxPluginGenericForms.dll",
376+
"Args": [],
377+
"Options": null,
378+
"DefaultOptions": null
379+
},
380+
{
381+
"Path": "..\\..\\..\\..\\..\\..\\AasxPluginAdvancedTextEditor\\bin\\Debug\\net8.0-windows\\AasxPluginAdvancedTextEditor.dll",
382+
"Args": [],
383+
"Options": null,
384+
"DefaultOptions": null
385+
},
386+
{
387+
"Path": "..\\..\\..\\..\\..\\..\\AasxPluginTechnicalData\\bin\\Debug\\net8.0-windows\\AasxPluginTechnicalData.dll",
388+
"Args": [],
389+
"Options": null,
390+
"DefaultOptions": null
391+
},
392+
{
393+
"Path": "..\\..\\..\\..\\..\\..\\AasxPluginBomStructure\\bin\\Debug\\net8.0-windows\\AasxPluginBomStructure.dll",
394+
"Args": [],
395+
"Options": null,
396+
"DefaultOptions": null
397+
},
398+
{
399+
"Path": "..\\..\\..\\..\\..\\..\\AasxPluginPlotting\\bin\\Debug\\net8.0-windows\\AasxPluginPlotting.dll",
400+
"Args": [],
401+
"Options": null,
402+
"DefaultOptions": null
403+
},
404+
{
405+
"Path": "..\\..\\..\\..\\..\\..\\AasxPluginImageMap\\bin\\Debug\\net8.0-windows\\AasxPluginImageMap.dll",
406+
"Args": [],
407+
"Options": null,
408+
"DefaultOptions": null
409+
},
410+
{
411+
"Path": "..\\..\\..\\..\\..\\..\\AasxPluginMtpViewer\\bin\\Debug\\net8.0-windows\\AasxPluginMtpViewer.dll",
412+
"Args": [],
413+
"Options": null,
414+
"DefaultOptions": null
415+
},
416+
{
417+
"Path": "..\\..\\..\\..\\..\\..\\AasxPluginExportTable\\bin\\Debug\\net8.0-windows\\AasxPluginExportTable.dll",
418+
"Args": [],
419+
"Options": null,
420+
"DefaultOptions": null
421+
},
422+
{
423+
"Path": "..\\..\\..\\..\\..\\..\\AasxPluginWebBrowser\\bin\\x64\\Debug\\AasxPluginWebBrowser.dll",
424+
"Args": [],
425+
"Options": null,
426+
"DefaultOptions": null
427+
}
428+
]
429+
}

src/AasxPackageExplorer/qualifier-presets.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,24 @@
257257
"valueId": null
258258
}
259259
},
260+
{
261+
"name": "Submodel templates | No definition (experimental)",
262+
"qualifier": {
263+
"kind": "TemplateQualifier",
264+
"semanticId": {
265+
"type": "ExternalReference",
266+
"keys": [
267+
{
268+
"type": "GlobalReference",
269+
"value": "https://admin-shell.io/SubmodelTemplates/NoDefinition/1/0"
270+
}
271+
]
272+
},
273+
"type": "SMT/NoDefinition",
274+
"value": "",
275+
"valueId": null
276+
}
277+
},
260278
{
261279
"name": "Submodel elements | Unit of measure (experimental)",
262280
"qualifier": {
Lines changed: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,51 @@
1-
{
1+
{
22
"Records": [
33
{
44
"AllowSubmodelSemanticId": [
55
{
66
"type": "Submodel",
7-
"value": "http://admin-shell.io/tmp/SG2/TechnicalData/Submodel/1/0",
7+
"value": "http://admin-shell.io/tmp/SG2/TechnicalData/Submodel/1/0"
88
}
99
]
1010
},
1111
{
1212
"AllowSubmodelSemanticId": [
1313
{
1414
"type": "Submodel",
15-
"value": "http://admin-shell.io/sandbox/SG2/TechnicalData/Submodel/1/1",
15+
"value": "http://admin-shell.io/sandbox/SG2/TechnicalData/Submodel/1/1"
1616
}
1717
]
1818
},
1919
{
2020
"AllowSubmodelSemanticId": [
2121
{
2222
"type": "Submodel",
23-
"value": "https://admin-shell.io/ZVEI/TechnicalData/Submodel/1/2",
23+
"value": "https://admin-shell.io/ZVEI/TechnicalData/Submodel/1/2"
2424
}
2525
]
26+
},
27+
{
28+
"AllowSubmodelSemanticId": [
29+
{
30+
"type": "Submodel",
31+
"value": "https://admin-shell.io/idta/SubmodelTemplate/TechnicalData/2/0"
32+
}
33+
]
34+
},
35+
{
36+
"AllowSubmodelSemanticId": [
37+
{
38+
"type": "Submodel",
39+
"value": "0173-1#01-AHX837#002"
40+
}
41+
]
42+
}
43+
],
44+
// EXTRA handling: specified SUPPLEMENTAL semanticId!!
45+
"AllowSupplementalSemanticId": [
46+
{
47+
"type": "Submodel",
48+
"value": "0173-1#01-AHX837#002"
2649
}
2750
]
28-
}
51+
}

src/AasxPluginTechnicalData/Plugin.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,11 @@ public class Session : PluginSessionBase
111111
foreach (var rec in _options.LookupAllIndexKey<TechnicalDataOptionsRecord>(
112112
sm.SemanticId?.GetAsExactlyOneKey()))
113113
found = true;
114+
115+
// EXTRA rule for techical data of NAMUR
116+
found = found || TechnicalDataAnyUiControl.CheckSuppleSemId(sm, _options);
117+
118+
// ok
114119
if (!found)
115120
return null;
116121

0 commit comments

Comments
 (0)