From a54a87eebe78baae19757d426766cc4378a755a2 Mon Sep 17 00:00:00 2001 From: Daniel Kluge Date: Wed, 20 Dec 2023 19:02:28 +0100 Subject: [PATCH] Follow AID spec more --- Submodel_AssetInterfacesDescription.json | 934 +++++++---- ...l_AssetInterfacesMappingConfiguration.json | 541 +++--- lib/src/AIMCMapper.ts | 88 +- lib/src/multimessageBroker.ts | 2 +- lib/src/parser/AIDParser.ts | 64 +- lib/src/parser/AIMCParser.ts | 18 +- lib/src/types/aidConf.ts | 4 +- lib/src/types/aimcConf.ts | 3 +- lib/src/types/common.ts | 4 +- owntest.json | 1475 ++++++++++------- 10 files changed, 1788 insertions(+), 1345 deletions(-) diff --git a/Submodel_AssetInterfacesDescription.json b/Submodel_AssetInterfacesDescription.json index f047e34..764c4cb 100644 --- a/Submodel_AssetInterfacesDescription.json +++ b/Submodel_AssetInterfacesDescription.json @@ -2,426 +2,688 @@ "idShort": "AssetInterfacesDescription", "id": "www.example.com/ids/sm/7142_2140_7032_7989", "kind": "Instance", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/idta/AssetInterfaceDescription/1/0/Submodel" + } + ] + }, "submodelElements": [ { - "idShort": "MQTT", - "typeValueListElement": "SubmodelElement", + "idShort": "Interface01", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://www.w3.org/2019/wot/td#" + } + ] + }, + "embeddedDataSpecifications": [], "value": [ { - "idShort": "DEL-00", + "idShort": "EndpointMetadata", "semanticId": { "type": "ExternalReference", - "keys": [] + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/idta/AssetInterfacesDescription/1/0/EndpointMetadata" + } + ] }, "embeddedDataSpecifications": [], "value": [ { - "idShort": "EndpointMetadata", + "idShort": "titles", + "value": [ + { + "language": "en", + "text": "AID and AIMC Test" + } + ], + "modelType": "MultiLanguageProperty" + }, + { + "idShort": "base", "semanticId": { "type": "ExternalReference", "keys": [] }, "embeddedDataSpecifications": [], + "valueType": "xs:string", + "value": "mqtt://127.0.0.1:1883", + "modelType": "Property" + }, + { + "idShort": "mqv:version", + "semanticId": { + "type": "ExternalReference", + "keys": [] + }, + "embeddedDataSpecifications": [], + "valueType": "xs:string", + "value": "5.0", + "modelType": "Property" + }, + { + "idShort": "contentType", + "semanticId": { + "type": "ExternalReference", + "keys": [] + }, + "embeddedDataSpecifications": [], + "valueType": "xs:string", + "value": "application/json", + "modelType": "Property" + } + ], + "modelType": "SubmodelElementCollection" + }, + { + "idShort": "InterfaceMetadata", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/idta/AssetInterfacesDescription/1/0/InterfaceMetadata" + } + ] + }, + "embeddedDataSpecifications": [], + "value": [ + { + "idShort": "Properties", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://www.w3.org/2019/wot/td#hasPropertyAffordance" + } + ] + }, "value": [ { - "idShort": "titles", + "idShort": "Property01", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/idta/AssetInterfacesDescription/1/0/InterfaceMetadata/Properties/Property" + } + ] + }, "value": [ { - "language": "en", - "text": "AID and AIMC Test" - } - ], - "modelType": "MultiLanguageProperty" - }, - { - "idShort": "base", - "semanticId": { - "type": "ExternalReference", - "keys": [] - }, - "embeddedDataSpecifications": [], - "valueType": "xs:string", - "value": "mqtt://127.0.0.1:1883", - "modelType": "Property" - }, - { - "idShort": "mqv:version", - "semanticId": { - "type": "ExternalReference", - "keys": [] - }, - "embeddedDataSpecifications": [], - "valueType": "xs:string", - "value": "5.0", - "modelType": "Property" - }, - { - "idShort": "contentType", - "semanticId": { - "type": "ExternalReference", - "keys": [] - }, - "embeddedDataSpecifications": [], - "valueType": "xs:string", - "value": "application/json", - "modelType": "Property" - }, - { - "idShort": "securityDefinitions", - "semanticId": { - "type": "ExternalReference", - "keys": [] - }, - "embeddedDataSpecifications": [], - "value": [ - { - "idShort": "basic", + "idShort": "title", "semanticId": { "type": "ExternalReference", - "keys": [] + "keys": [ + { + "type": "GlobalReference", + "value": "https://www.w3.org/2019/wot/td#title" + } + ] }, - "embeddedDataSpecifications": [], + "valueType": "xs:string", + "value": "TestingParameter01", + "modelType": "Property" + }, + { + "idShort": "observable", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://www.w3.org/2019/wot/td#isObservable" + } + ] + }, + "valueType": "xs:boolean", + "value": "true", + "modelType": "Property" + }, + { + "idShort": "type", + "valueType": "xs:string", + "value": "integer", + "modelType": "Property" + }, + { + "idShort": "forms", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://www.w3.org/2019/wot/td#hasForm" + } + ] + }, + "typeValueListElement": "SubmodelElementCollection", "value": [ { - "idShort": "in", - "semanticId": { - "type": "ExternalReference", - "keys": [] - }, - "embeddedDataSpecifications": [], - "valueType": "xs:string", - "value": "header", - "modelType": "Property" + "idShort": "", + "value": [ + { + "idShort": "href", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://www.w3.org/2019/wot/hypermedia#hasTarget" + } + ] + }, + "valueType": "xs:string", + "value": "/testasset/testparam1", + "modelType": "Property" + }, + { + "idShort": "contentType", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://www.w3.org/2019/wot/hypermedia#forContentType" + } + ] + }, + "valueType": "xs:string", + "value": "application/json", + "modelType": "Property" + }, + { + "idShort": "op", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://www.w3.org/2019/wot/td#OperationType" + } + ] + }, + "valueType": "xs:string", + "value": "readProperty", + "modelType": "Property" + } + ], + "modelType": "SubmodelElementCollection" } ], - "modelType": "SubmodelElementCollection" + "modelType": "SubmodelElementList" } ], "modelType": "SubmodelElementCollection" }, { - "idShort": "AssetsReservedClientName", - "valueType": "xs:string", - "value": "thisandthat", - "modelType": "Property" + "idShort": "Property02", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/idta/AssetInterfacesDescription/1/0/InterfaceMetadata/Properties/Property" + } + ] + }, + "value": [ + { + "idShort": "title", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://www.w3.org/2019/wot/td#title" + } + ] + }, + "valueType": "xs:string", + "value": "TestingParameter02", + "modelType": "Property" + }, + { + "idShort": "observable", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://www.w3.org/2019/wot/td#isObservable" + } + ] + }, + "valueType": "xs:boolean", + "value": "false", + "modelType": "Property" + }, + { + "idShort": "type", + "valueType": "xs:string", + "value": "boolean", + "modelType": "Property" + }, + { + "idShort": "forms", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://www.w3.org/2019/wot/td#hasForm" + } + ] + }, + "typeValueListElement": "SubmodelElementCollection", + "value": [ + { + "idShort": "", + "value": [ + { + "idShort": "href", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://www.w3.org/2019/wot/hypermedia#hasTarget" + } + ] + }, + "valueType": "xs:string", + "value": "mqtt://127.0.0.1:1883/testasset/testparam2", + "modelType": "Property" + }, + { + "idShort": "contentType", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://www.w3.org/2019/wot/hypermedia#forContentType" + } + ] + }, + "valueType": "xs:string", + "value": "application/json", + "modelType": "Property" + }, + { + "idShort": "op", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://www.w3.org/2019/wot/td#OperationType" + } + ] + }, + "valueType": "xs:string", + "value": "readProperty", + "modelType": "Property" + } + ], + "modelType": "SubmodelElementCollection" + }, + { + "idShort": "", + "value": [ + { + "idShort": "href", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://www.w3.org/2019/wot/hypermedia#hasTarget" + } + ] + }, + "valueType": "xs:string", + "value": "mqtt://127.0.0.1:1883/testasset/testparam2/write", + "modelType": "Property" + }, + { + "idShort": "contentType", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://www.w3.org/2019/wot/hypermedia#forContentType" + } + ] + }, + "valueType": "xs:string", + "value": "application/json", + "modelType": "Property" + }, + { + "idShort": "op", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://www.w3.org/2019/wot/td#OperationType" + } + ] + }, + "valueType": "xs:string", + "value": "writeProperty", + "modelType": "Property" + } + ], + "modelType": "SubmodelElementCollection" + } + ], + "modelType": "SubmodelElementList" + } + ], + "modelType": "SubmodelElementCollection" } ], "modelType": "SubmodelElementCollection" }, { - "idShort": "InterfaceMetadata", + "idShort": "Actions", "semanticId": { "type": "ExternalReference", - "keys": [] + "keys": [ + { + "type": "GlobalReference", + "value": "https://www.w3.org/2019/wot/td#ActionAffordance" + } + ] }, - "embeddedDataSpecifications": [], "value": [ { - "idShort": "Properties", - "semanticId": { - "type": "ExternalReference", - "keys": [] - }, - "embeddedDataSpecifications": [], - "typeValueListElement": "SubmodelElementCollection", + "idShort": "Action01", "value": [ { - "idShort": "DEL-00", - "value": [ - { - "idShort": "title", - "valueType": "xs:string", - "value": "TestingParameter01", - "modelType": "Property" - }, - { - "idShort": "observable", - "valueType": "xs:boolean", - "value": "true", - "modelType": "Property" - }, - { - "idShort": "type", - "valueType": "xs:string", - "value": "integer", - "modelType": "Property" - }, - { - "idShort": "forms", - "typeValueListElement": "SubmodelElementCollection", - "value": [ - { - "idShort": "", - "value": [ - { - "idShort": "href", - "valueType": "xs:string", - "value": "/testtopic/testparam1", - "modelType": "Property" - }, - { - "idShort": "contentType", - "valueType": "xs:string", - "value": "application/json", - "modelType": "Property" - }, - { - "idShort": "op", - "valueType": "xs:string", - "value": "readProperty", - "modelType": "Property" - } - ], - "modelType": "SubmodelElementCollection" - } - ], - "modelType": "SubmodelElementList" - } - ], - "modelType": "SubmodelElementCollection" + "idShort": "async", + "valueType": "xs:boolean", + "value": "false", + "modelType": "Property" }, { - "idShort": "DEL-01", + "idShort": "forms", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://www.w3.org/2019/wot/td#hasForm" + } + ] + }, + "typeValueListElement": "SubmodelElementCollection", "value": [ { - "idShort": "title", - "valueType": "xs:string", - "value": "TestingParameter02", - "modelType": "Property" - }, - { - "idShort": "observable", - "valueType": "xs:boolean", - "value": "false", - "modelType": "Property" - }, - { - "idShort": "type", - "valueType": "xs:string", - "value": "boolean", - "modelType": "Property" - }, - { - "idShort": "forms", - "typeValueListElement": "SubmodelElementCollection", + "idShort": "", "value": [ { - "idShort": "", - "value": [ - { - "idShort": "href", - "valueType": "xs:string", - "value": "mqtt://127.0.0.1:1883/testtopic/testparam2", - "modelType": "Property" - }, - { - "idShort": "contentType", - "valueType": "xs:string", - "value": "application/json", - "modelType": "Property" - }, - { - "idShort": "op", - "valueType": "xs:string", - "value": "readProperty", - "modelType": "Property" - } - ], - "modelType": "SubmodelElementCollection" + "idShort": "href", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://www.w3.org/2019/wot/hypermedia#hasTarget" + } + ] + }, + "valueType": "xs:string", + "value": "/testasset/testoperation1", + "modelType": "Property" }, { - "idShort": "", - "value": [ - { - "idShort": "href", - "valueType": "xs:string", - "value": "mqtt://127.0.0.1:1883/testtopic/testparam2/write", - "modelType": "Property" - }, - { - "idShort": "contentType", - "valueType": "xs:string", - "value": "application/json", - "modelType": "Property" - }, - { - "idShort": "op", - "valueType": "xs:string", - "value": "writeProperty", - "modelType": "Property" - } - ], - "modelType": "SubmodelElementCollection" + "idShort": "contentType", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://www.w3.org/2019/wot/hypermedia#forContentType" + } + ] + }, + "valueType": "xs:string", + "value": "application/json", + "modelType": "Property" + }, + { + "idShort": "op", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://www.w3.org/2019/wot/td#OperationType" + } + ] + }, + "valueType": "xs:string", + "value": "invokeAction", + "modelType": "Property" } ], - "modelType": "SubmodelElementList" + "modelType": "SubmodelElementCollection" } ], - "modelType": "SubmodelElementCollection" + "modelType": "SubmodelElementList" } ], - "modelType": "SubmodelElementList" + "modelType": "SubmodelElementCollection" }, { - "idShort": "Actions", - "semanticId": { - "type": "ExternalReference", - "keys": [] - }, - "embeddedDataSpecifications": [], - "typeValueListElement": "SubmodelElementCollection", + "idShort": "Action02", "value": [ { - "idShort": "DEL-00", - "value": [ - { - "idShort": "async", - "valueType": "xs:boolean", - "value": "false", - "modelType": "Property" - }, - { - "idShort": "forms", - "typeValueListElement": "SubmodelElementCollection", - "value": [ - { - "idShort": "", - "value": [ - { - "idShort": "href", - "valueType": "xs:string", - "value": "/testtopic/testoperation1", - "modelType": "Property" - }, - { - "idShort": "contentType", - "valueType": "xs:string", - "value": "application/json", - "modelType": "Property" - }, - { - "idShort": "op", - "valueType": "xs:string", - "value": "invokeAction", - "modelType": "Property" - } - ], - "modelType": "SubmodelElementCollection" - } - ], - "modelType": "SubmodelElementList" - } - ], - "modelType": "SubmodelElementCollection" + "idShort": "async", + "valueType": "xs:boolean", + "value": "false", + "modelType": "Property" }, { - "idShort": "DEL-01", + "idShort": "forms", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://www.w3.org/2019/wot/td#hasForm" + } + ] + }, + "typeValueListElement": "SubmodelElementCollection", "value": [ { - "idShort": "async", - "valueType": "xs:boolean", - "value": "false", - "modelType": "Property" - }, - { - "idShort": "forms", - "typeValueListElement": "SubmodelElementCollection", + "idShort": "", "value": [ { - "idShort": "", - "value": [ - { - "idShort": "href", - "valueType": "xs:string", - "value": "/testtopic/testoperation2", - "modelType": "Property" - }, - { - "idShort": "contentType", - "valueType": "xs:string", - "value": "application/json", - "modelType": "Property" - }, - { - "idShort": "op", - "valueType": "xs:string", - "value": "invokeAction", - "modelType": "Property" - } - ], - "modelType": "SubmodelElementCollection" - } - ], - "modelType": "SubmodelElementList" - } - ], - "modelType": "SubmodelElementCollection" - }, - { - "idShort": "DEL-02", - "value": [ - { - "idShort": "async", - "valueType": "xs:boolean", - "value": "false", - "modelType": "Property" - }, - { - "idShort": "forms", - "typeValueListElement": "SubmodelElementCollection", - "value": [ + "idShort": "href", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://www.w3.org/2019/wot/hypermedia#hasTarget" + } + ] + }, + "valueType": "xs:string", + "value": "/testasset/testoperation2", + "modelType": "Property" + }, { - "idShort": "", - "value": [ - { - "idShort": "href", - "valueType": "xs:string", - "value": "/testtopic/testoperation3", - "modelType": "Property" - }, - { - "idShort": "contentType", - "valueType": "xs:string", - "value": "application/json", - "modelType": "Property" - }, - { - "idShort": "op", - "valueType": "xs:string", - "value": "invokeAction", - "modelType": "Property" - } - ], - "modelType": "SubmodelElementCollection" + "idShort": "contentType", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://www.w3.org/2019/wot/hypermedia#forContentType" + } + ] + }, + "valueType": "xs:string", + "value": "application/json", + "modelType": "Property" + }, + { + "idShort": "op", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://www.w3.org/2019/wot/td#OperationType" + } + ] + }, + "valueType": "xs:string", + "value": "invokeAction", + "modelType": "Property" } ], - "modelType": "SubmodelElementList" + "modelType": "SubmodelElementCollection" } ], - "modelType": "SubmodelElementCollection" + "modelType": "SubmodelElementList" } ], - "modelType": "SubmodelElementList" + "modelType": "SubmodelElementCollection" }, { - "idShort": "Events", - "semanticId": { - "type": "ExternalReference", - "keys": [] - }, - "embeddedDataSpecifications": [], - "typeValueListElement": "SubmodelElementCollection", - "value": [], - "modelType": "SubmodelElementList" + "idShort": "Action03", + "value": [ + { + "idShort": "async", + "valueType": "xs:boolean", + "value": "false", + "modelType": "Property" + }, + { + "idShort": "forms", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://www.w3.org/2019/wot/td#hasForm" + } + ] + }, + "typeValueListElement": "SubmodelElementCollection", + "value": [ + { + "idShort": "", + "value": [ + { + "idShort": "href", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://www.w3.org/2019/wot/hypermedia#hasTarget" + } + ] + }, + "valueType": "xs:string", + "value": "/testasset/testoperation3", + "modelType": "Property" + }, + { + "idShort": "contentType", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://www.w3.org/2019/wot/hypermedia#forContentType" + } + ] + }, + "valueType": "xs:string", + "value": "application/json", + "modelType": "Property" + }, + { + "idShort": "op", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://www.w3.org/2019/wot/td#OperationType" + } + ] + }, + "valueType": "xs:string", + "value": "invokeAction", + "modelType": "Property" + } + ], + "modelType": "SubmodelElementCollection" + } + ], + "modelType": "SubmodelElementList" + } + ], + "modelType": "SubmodelElementCollection" } ], "modelType": "SubmodelElementCollection" + }, + { + "idShort": "Events", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://www.w3.org/2019/wot/td#EventAffordance" + } + ] + }, + "modelType": "SubmodelElementCollection" } ], "modelType": "SubmodelElementCollection" + }, + { + "idShort": "title", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://www.w3.org/2019/wot/td#title" + } + ] + }, + "valueType": "xs:string", + "value": "Titel", + "modelType": "Property" } ], - "modelType": "SubmodelElementList" + "modelType": "SubmodelElementCollection" } ], "modelType": "Submodel" diff --git a/Submodel_AssetInterfacesMappingConfiguration.json b/Submodel_AssetInterfacesMappingConfiguration.json index 34045be..4dc078d 100644 --- a/Submodel_AssetInterfacesMappingConfiguration.json +++ b/Submodel_AssetInterfacesMappingConfiguration.json @@ -4,337 +4,302 @@ "kind": "Instance", "submodelElements": [ { - "idShort": "MQTT", - "typeValueListElement": "SubmodelElementCollection", + "idShort": "Mapping01", "value": [ { - "idShort": "DEL-00", + "idShort": "EndpointMetaDataReference", + "value": { + "type": "ModelReference", + "keys": [ + { + "type": "Submodel", + "value": "www.example.com/ids/sm/7142_2140_7032_7989" + }, + { + "type": "SubmodelElementCollection", + "value": "Interface01" + }, + { + "type": "SubmodelElementCollection", + "value": "EndpointMetadata" + } + ] + }, + "modelType": "ReferenceElement" + }, + { + "idShort": "MappingConfiguration", + "typeValueListElement": "SubmodelElementCollection", "value": [ { - "idShort": "EndpointMetaDataReference", - "value": { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "www.example.com/ids/sm/7142_2140_7032_7989" - }, - { - "type": "SubmodelElementList", - "value": "MQTT" - }, - { - "type": "SubmodelElementCollection", - "value": "DEL-00" - }, - { - "type": "SubmodelElementCollection", - "value": "EndpointMetadata" - } - ] - }, - "modelType": "ReferenceElement" - }, - { - "idShort": "MappingConfiguration", - "typeValueListElement": "SubmodelElement", + "idShort": "DEL-00", "value": [ { - "idShort": "DEL-00", + "idShort": "InterfaceMetaDataReference", + "value": { + "type": "ModelReference", + "keys": [ + { + "type": "Submodel", + "value": "www.example.com/ids/sm/7142_2140_7032_7989" + }, + { + "type": "SubmodelElementCollection", + "value": "Interface01" + }, + { + "type": "SubmodelElementCollection", + "value": "InterfaceMetadata" + } + ] + }, + "modelType": "ReferenceElement" + }, + { + "idShort": "SourceSinkMappings", + "typeValueListElement": "SubmodelElement", "value": [ { - "idShort": "InterfaceMetaDataReference", - "value": { + "idShort": "DEL-00", + "first": { "type": "ModelReference", "keys": [ { "type": "Submodel", "value": "www.example.com/ids/sm/7142_2140_7032_7989" }, - { - "type": "SubmodelElementList", - "value": "MQTT" - }, { "type": "SubmodelElementCollection", - "value": "DEL-00" + "value": "Interface01" }, { "type": "SubmodelElementCollection", "value": "InterfaceMetadata" + }, + { + "type": "SubmodelElementCollection", + "value": "Properties" + }, + { + "type": "SubmodelElementCollection", + "value": "Property01" } ] }, - "modelType": "ReferenceElement" + "second": { + "type": "ModelReference", + "keys": [ + { + "type": "Submodel", + "value": "https://example.com/ids/sm/8055_9060_7032_0793" + }, + { + "type": "SubmodelElementCollection", + "value": "Params" + }, + { + "type": "Property", + "value": "TestParam1" + } + ] + }, + "modelType": "RelationshipElement" }, { - "idShort": "SourceSinkMappings", - "typeValueListElement": "SubmodelElement", - "value": [ - { - "idShort": "DEL-00", - "first": { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "www.example.com/ids/sm/7142_2140_7032_7989" - }, - { - "type": "SubmodelElementList", - "value": "MQTT" - }, - { - "type": "SubmodelElementCollection", - "value": "DEL-00" - }, - { - "type": "SubmodelElementCollection", - "value": "InterfaceMetadata" - }, - { - "type": "SubmodelElementList", - "value": "Properties" - }, - { - "type": "SubmodelElementCollection", - "value": "DEL-00" - } - ] + "idShort": "DEL-01", + "first": { + "type": "ModelReference", + "keys": [ + { + "type": "Submodel", + "value": "www.example.com/ids/sm/7142_2140_7032_7989" }, - "second": { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "https://example.com/ids/sm/8055_9060_7032_0793" - }, - { - "type": "SubmodelElementCollection", - "value": "Params" - }, - { - "type": "Property", - "value": "TestParam1" - } - ] + { + "type": "SubmodelElementCollection", + "value": "Interface01" }, - "modelType": "RelationshipElement" - }, - { - "idShort": "DEL-01", - "first": { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "www.example.com/ids/sm/7142_2140_7032_7989" - }, - { - "type": "SubmodelElementList", - "value": "MQTT" - }, - { - "type": "SubmodelElementCollection", - "value": "DEL-00" - }, - { - "type": "SubmodelElementCollection", - "value": "InterfaceMetadata" - }, - { - "type": "SubmodelElementList", - "value": "Properties" - }, - { - "type": "SubmodelElementCollection", - "value": "DEL-01" - } - ] + { + "type": "SubmodelElementCollection", + "value": "InterfaceMetadata" }, - "second": { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "https://example.com/ids/sm/8055_9060_7032_0793" - }, - { - "type": "SubmodelElementCollection", - "value": "Params" - }, - { - "type": "Property", - "value": "TestParam2" - } - ] + { + "type": "SubmodelElementCollection", + "value": "Properties" }, - "modelType": "RelationshipElement" - }, - { - "idShort": "DEL-02", - "first": { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "www.example.com/ids/sm/7142_2140_7032_7989" - }, - { - "type": "SubmodelElementList", - "value": "MQTT" - }, - { - "type": "SubmodelElementCollection", - "value": "DEL-00" - }, - { - "type": "SubmodelElementCollection", - "value": "InterfaceMetadata" - }, - { - "type": "SubmodelElementList", - "value": "Actions" - }, - { - "type": "SubmodelElementCollection", - "value": "DEL-00" - } - ] + { + "type": "SubmodelElementCollection", + "value": "Property02" + } + ] + }, + "second": { + "type": "ModelReference", + "keys": [ + { + "type": "Submodel", + "value": "https://example.com/ids/sm/8055_9060_7032_0793" }, - "second": { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "https://example.com/ids/sm/8055_9060_7032_0793" - }, - { - "type": "SubmodelElementCollection", - "value": "Operations" - }, - { - "type": "Operation", - "value": "TestOperation1" - } - ] + { + "type": "SubmodelElementCollection", + "value": "Params" }, - "modelType": "RelationshipElement" - }, - { - "idShort": "DEL-03", - "first": { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "www.example.com/ids/sm/7142_2140_7032_7989" - }, - { - "type": "SubmodelElementList", - "value": "MQTT" - }, - { - "type": "SubmodelElementCollection", - "value": "DEL-00" - }, - { - "type": "SubmodelElementCollection", - "value": "InterfaceMetadata" - }, - { - "type": "SubmodelElementList", - "value": "Actions" - }, - { - "type": "SubmodelElementCollection", - "value": "DEL-01" - } - ] + { + "type": "Property", + "value": "TestParam2" + } + ] + }, + "modelType": "RelationshipElement" + }, + { + "idShort": "DEL-02", + "first": { + "type": "ModelReference", + "keys": [ + { + "type": "Submodel", + "value": "www.example.com/ids/sm/7142_2140_7032_7989" }, - "second": { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "https://example.com/ids/sm/8055_9060_7032_0793" - }, - { - "type": "SubmodelElementCollection", - "value": "Operations" - }, - { - "type": "Operation", - "value": "TestOperation2" - } - ] + { + "type": "SubmodelElementCollection", + "value": "Interface01" }, - "modelType": "RelationshipElement" - }, - { - "idShort": "DEL-04", - "first": { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "www.example.com/ids/sm/7142_2140_7032_7989" - }, - { - "type": "SubmodelElementList", - "value": "MQTT" - }, - { - "type": "SubmodelElementCollection", - "value": "DEL-00" - }, - { - "type": "SubmodelElementCollection", - "value": "InterfaceMetadata" - }, - { - "type": "SubmodelElementList", - "value": "Actions" - }, - { - "type": "SubmodelElementCollection", - "value": "DEL-02" - } - ] + { + "type": "SubmodelElementCollection", + "value": "InterfaceMetadata" }, - "second": { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "https://example.com/ids/sm/8055_9060_7032_0793" - }, - { - "type": "SubmodelElementCollection", - "value": "Operations" - }, - { - "type": "Operation", - "value": "TestOperation3" - } - ] + { + "type": "SubmodelElementCollection", + "value": "Actions" }, - "modelType": "RelationshipElement" - } - ], - "modelType": "SubmodelElementList" + { + "type": "SubmodelElementCollection", + "value": "Action01" + } + ] + }, + "second": { + "type": "ModelReference", + "keys": [ + { + "type": "Submodel", + "value": "https://example.com/ids/sm/8055_9060_7032_0793" + }, + { + "type": "SubmodelElementCollection", + "value": "Operations" + }, + { + "type": "Operation", + "value": "TestOperation1" + } + ] + }, + "modelType": "RelationshipElement" + }, + { + "idShort": "DEL-03", + "first": { + "type": "ModelReference", + "keys": [ + { + "type": "Submodel", + "value": "www.example.com/ids/sm/7142_2140_7032_7989" + }, + { + "type": "SubmodelElementCollection", + "value": "Interface01" + }, + { + "type": "SubmodelElementCollection", + "value": "InterfaceMetadata" + }, + { + "type": "SubmodelElementCollection", + "value": "Actions" + }, + { + "type": "SubmodelElementCollection", + "value": "Action02" + } + ] + }, + "second": { + "type": "ModelReference", + "keys": [ + { + "type": "Submodel", + "value": "https://example.com/ids/sm/8055_9060_7032_0793" + }, + { + "type": "SubmodelElementCollection", + "value": "Operations" + }, + { + "type": "Operation", + "value": "TestOperation2" + } + ] + }, + "modelType": "RelationshipElement" + }, + { + "idShort": "DEL-04", + "first": { + "type": "ModelReference", + "keys": [ + { + "type": "Submodel", + "value": "www.example.com/ids/sm/7142_2140_7032_7989" + }, + { + "type": "SubmodelElementCollection", + "value": "Interface01" + }, + { + "type": "SubmodelElementCollection", + "value": "InterfaceMetadata" + }, + { + "type": "SubmodelElementCollection", + "value": "Actions" + }, + { + "type": "SubmodelElementCollection", + "value": "Action03" + } + ] + }, + "second": { + "type": "ModelReference", + "keys": [ + { + "type": "Submodel", + "value": "https://example.com/ids/sm/8055_9060_7032_0793" + }, + { + "type": "SubmodelElementCollection", + "value": "Operations" + }, + { + "type": "Operation", + "value": "TestOperation3" + } + ] + }, + "modelType": "RelationshipElement" } ], - "modelType": "SubmodelElementCollection" + "modelType": "SubmodelElementList" } ], - "modelType": "SubmodelElementList" + "modelType": "SubmodelElementCollection" } ], - "modelType": "SubmodelElementCollection" + "modelType": "SubmodelElementList" } ], - "modelType": "SubmodelElementList" + "modelType": "SubmodelElementCollection" } ], "modelType": "Submodel" diff --git a/lib/src/AIMCMapper.ts b/lib/src/AIMCMapper.ts index 12a30fb..ec1d810 100644 --- a/lib/src/AIMCMapper.ts +++ b/lib/src/AIMCMapper.ts @@ -37,28 +37,46 @@ export default class AIMCMapper { const aimc = AIMCParser.parse(this.env); if (aimc === null) return; - for (const endpointConf of Object.values(aimc)) { - for (const entry of endpointConf) { - const ep = AIDParser.parseEndpointMetaData(entry.EndpointMetaDataReference); - if (ep === null) continue; - - for (const mapping of entry.MappingConfiguration) { - //const ifm = AIDParser.parseInterfaceMetaData(mapping.InterfaceMetaDataReference); - //if (ifm === null) continue; - // Why do we need this? We already have the interface metadata reference in every ssm + for (const entry of aimc) { + const ep = AIDParser.parseEndpointMetaData(entry.EndpointMetaDataReference); + if (ep === null) continue; + + for (const mapping of entry.MappingConfiguration) { + //const ifm = AIDParser.parseInterfaceMetaData(mapping.InterfaceMetaDataReference); + //if (ifm === null) continue; + // Why do we need this? We already have the interface metadata reference in every ssm - for (const ssm of mapping.SourceSinkMappings) { - const resolved = Traverser.resolveRelationship(this.env, ssm); - if (resolved === null) continue; + for (const ssm of mapping.SourceSinkMappings) { + const resolved = Traverser.resolveRelationship(this.env, ssm); + if (resolved === null) continue; - // To know if we currently view a property, action or event, they reference keys can help us. - // We know the third to last must be the "InterfaceMetadata" and the second to last must be the "Properties", "Actions" or "Events". - // As we _maybe_ don't know if the first and second reference are switched we can check for the third to last. - const elemType = (ssm as types.RelationshipElement).first.keys.at(-3)?.value.toLocaleLowerCase() === "interfacemetadata" ? (ssm as types.RelationshipElement).first.keys.at(-2)?.value : (ssm as types.RelationshipElement).second.keys.at(-2)?.value; + // To know if we currently view a property, action or event, they reference keys can help us. + // We know the third to last must be the "InterfaceMetadata" and the second to last must be the "Properties", "Actions" or "Events". + // As we _maybe_ don't know if the first and second reference are switched we can check for the third to last. + const elemType = (ssm as types.RelationshipElement).first.keys.at(-3)?.value.toLocaleLowerCase() === "interfacemetadata" ? (ssm as types.RelationshipElement).first.keys.at(-2)?.value : (ssm as types.RelationshipElement).second.keys.at(-2)?.value; - let {first, second} = resolved; + let {first, second} = resolved; - let parsedPropConf: InterfaceProperty | InterfaceAction | InterfaceEvent | null = null; + let parsedPropConf: InterfaceProperty | InterfaceAction | InterfaceEvent | null = null; + + switch (elemType?.toLocaleLowerCase()) { + case "properties": + parsedPropConf = AIDParser.parseInterfaceMetadataProperty(first as types.SubmodelElementCollection); + break; + case "actions": + parsedPropConf = AIDParser.parseInterfaceMetadataAction(first as types.SubmodelElementCollection); + break; + case "events": + parsedPropConf = AIDParser.parseInterfaceMetadataEvent(first as types.SubmodelElementCollection); + break; + default: + // Error. We have not found a valid type of element to parse. + continue; + } + + if (parsedPropConf === null) { + // maybe the property is in the first element + [first, second] = [second, first]; switch (elemType?.toLocaleLowerCase()) { case "properties": @@ -70,35 +88,15 @@ export default class AIMCMapper { case "events": parsedPropConf = AIDParser.parseInterfaceMetadataEvent(first as types.SubmodelElementCollection); break; - default: - // Error. We have not found a valid type of element to parse. - continue; } - - if (parsedPropConf === null) { - // maybe the property is in the first element - [first, second] = [second, first]; - - switch (elemType?.toLocaleLowerCase()) { - case "properties": - parsedPropConf = AIDParser.parseInterfaceMetadataProperty(first as types.SubmodelElementCollection); - break; - case "actions": - parsedPropConf = AIDParser.parseInterfaceMetadataAction(first as types.SubmodelElementCollection); - break; - case "events": - parsedPropConf = AIDParser.parseInterfaceMetadataEvent(first as types.SubmodelElementCollection); - break; - } - } - - if (parsedPropConf === null) continue; - - this.map.set(second, ({ - ...ep, - ...parsedPropConf - } as any as ConnectionConfiguration)); } + + if (parsedPropConf === null) continue; + + this.map.set(second, ({ + ...ep, + ...parsedPropConf + } as any as ConnectionConfiguration)); } } } diff --git a/lib/src/multimessageBroker.ts b/lib/src/multimessageBroker.ts index 5688d7c..229fc6a 100644 --- a/lib/src/multimessageBroker.ts +++ b/lib/src/multimessageBroker.ts @@ -122,7 +122,7 @@ export default class MultiMessageBroker { const interfaceDescription = AIDParser.parse(registration.aas); if (!interfaceDescription) continue; - const endpoints = Object.values(interfaceDescription).flatMap(idEntries => idEntries.map(entry => entry.EndPointMetadata)); + const endpoints = interfaceDescription.map(entry => entry.EndPointMetadata); const uniqueProtocols: Record = {}; endpoints.forEach(endpoint => { diff --git a/lib/src/parser/AIDParser.ts b/lib/src/parser/AIDParser.ts index e087076..7ef3aab 100644 --- a/lib/src/parser/AIDParser.ts +++ b/lib/src/parser/AIDParser.ts @@ -19,19 +19,13 @@ export default class AIDParser { const sm = Traverser.findSMByIdShort(env, "AssetInterfacesDescription"); if (sm === null || sm.submodelElements === null) return null; - const parsed = {} as AssetInterfacesDescription; + const parsed = [] as AssetInterfacesDescription; sm.submodelElements.forEach(e => { - if (!aasCore.types.isSubmodelElementList(e) || !e.idShort || !e.value) return; - - const endpointProto = endpointAvailable(e.idShort); - if (!endpointProto) return; - - parsed[endpointProto] = e.value.map(element => { - if (!aasCore.types.isSubmodelElementCollection(element)) return null; - - return AIDParser.parseAIDEntry(element, endpointProto); - }).filter(e => e !== null) as InterfaceDescription[]; + if (!aasCore.types.isSubmodelElementCollection(e) || !e.value) return; + const parsedInterface = AIDParser.parseAIDEntry(e); + if (parsedInterface === null) return; + parsed.push(parsedInterface); }); return parsed; @@ -43,7 +37,7 @@ export default class AIDParser { * @param endpointProtocol Protocol used in the endpoint, so additional properties can be parsed * @returns Description for one interface or null if not parsable */ - private static parseAIDEntry(entry: aasCore.types.SubmodelElementCollection, endpointProtocol?: AvailableEndpoint): InterfaceDescription | null { + private static parseAIDEntry(entry: aasCore.types.SubmodelElementCollection): InterfaceDescription | null { const title = Traverser.findElement(entry, element => (element as any).idShort?.toLocaleLowerCase() === "title"); const titleString = title !== null && aasCore.types.isProperty(title) && title.value ? title.value : ""; @@ -51,7 +45,9 @@ export default class AIDParser { const im = Traverser.findElement(entry, element => (element as any).idShort?.toLocaleLowerCase() === "interfacemetadata"); if (ep === null || !aasCore.types.isSubmodelElementCollection(ep) || !ep.value || im === null || !aasCore.types.isSubmodelElementCollection(im) || !im.value) return null; - const parsedEp = AIDParser.parseEndpointMetaData(ep, endpointProtocol); + const parsedEp = AIDParser.parseEndpointMetaData(ep); + const endpointProtocol = endpointAvailable(parsedEp?.base ?? ""); + const parsedIm = AIDParser.parseInterfaceMetaData(im, endpointProtocol); if (parsedEp === null || parsedIm === null) return null; @@ -69,7 +65,7 @@ export default class AIDParser { * @param endpointProtocol Protocol used in the endpoint, so additional properties can be parsed * @returns Parsed EndpointMetaData or null if not parsable */ - public static parseEndpointMetaData(endpoint: aasCore.types.SubmodelElementCollection, endpointProtocol?: AvailableEndpoint): EndpointMetadata | null { + public static parseEndpointMetaData(endpoint: aasCore.types.SubmodelElementCollection): EndpointMetadata | null { if (!endpoint.value || endpoint.idShort?.toLocaleLowerCase() !== "endpointmetadata") return null; const parsed = {} as EndpointMetadata; @@ -82,6 +78,7 @@ export default class AIDParser { // TODO // Other values based on endpoint protocol + // Protocol is set in base string return parsed; } @@ -106,30 +103,33 @@ export default class AIDParser { } as InterfaceMetadata; const prop = Traverser.findElement(interfaceMeta, element => (element as any).idShort?.toLocaleLowerCase() === "properties"); - if (prop === null || !aasCore.types.isSubmodelElementList(prop) || !prop.value) return null; // Mandatory - for (const element of prop.overValueOrEmpty()) { - if (!aasCore.types.isSubmodelElementCollection(element)) continue; - const parsedProp = AIDParser.parseInterfaceMetadataProperty(element, endpointProtocol); - if (parsedProp === null) continue; - parsed.properties.push(parsedProp); + if (prop !== null && aasCore.types.isSubmodelElementCollection(prop)) { + for (const element of prop.overValueOrEmpty()) { + if (!aasCore.types.isSubmodelElementCollection(element)) continue; + const parsedProp = AIDParser.parseInterfaceMetadataProperty(element, endpointProtocol); + if (parsedProp === null) continue; + parsed.properties.push(parsedProp); + } } const actions = Traverser.findElement(interfaceMeta, element => (element as any).idShort?.toLocaleLowerCase() === "actions"); - if (actions === null || !aasCore.types.isSubmodelElementList(actions) || !actions.value) return null; // Mandatory - for (const element of actions.overValueOrEmpty()) { - if (!aasCore.types.isSubmodelElementCollection(element)) continue; - const parsedAction = AIDParser.parseInterfaceMetadataAction(element, endpointProtocol); - if (parsedAction === null) continue; - parsed.actions.push(parsedAction); + if (actions !== null && aasCore.types.isSubmodelElementCollection(actions)) { + for (const element of actions.overValueOrEmpty()) { + if (!aasCore.types.isSubmodelElementCollection(element)) continue; + const parsedAction = AIDParser.parseInterfaceMetadataAction(element, endpointProtocol); + if (parsedAction === null) continue; + parsed.actions.push(parsedAction); + } } const events = Traverser.findElement(interfaceMeta, element => (element as any).idShort?.toLocaleLowerCase() === "events"); - if (events === null || !aasCore.types.isSubmodelElementList(events) || !events.value) return null; // Mandatory - for (const element of events.overValueOrEmpty()) { - if (!aasCore.types.isSubmodelElementCollection(element)) continue; - const parsedEvent = AIDParser.parseInterfaceMetadataEvent(element, endpointProtocol); - if (parsedEvent === null) continue; - parsed.events.push(parsedEvent); + if (events !== null && aasCore.types.isSubmodelElementCollection(events)) { + for (const element of events.overValueOrEmpty()) { + if (!aasCore.types.isSubmodelElementCollection(element)) continue; + const parsedEvent = AIDParser.parseInterfaceMetadataEvent(element, endpointProtocol); + if (parsedEvent === null) continue; + parsed.events.push(parsedEvent); + } } return parsed as InterfaceMetadata; diff --git a/lib/src/parser/AIMCParser.ts b/lib/src/parser/AIMCParser.ts index 7749ae2..5a1321b 100644 --- a/lib/src/parser/AIMCParser.ts +++ b/lib/src/parser/AIMCParser.ts @@ -19,19 +19,13 @@ export default class AIMCParser { const sm = Traverser.findSMByIdShort(env, "AssetInterfacesMappingConfiguration"); if (sm === null || sm.submodelElements === null) return null; - const parsed = {} as AssetInterfacesMappingConfiguration; + const parsed = [] as AssetInterfacesMappingConfiguration; - sm.submodelElements.forEach(e => { - if (!aasCore.types.isSubmodelElementList(e) || !e.idShort || !e.value) return; - - const endpointProto = endpointAvailable(e.idShort); - if (!endpointProto) return; - - parsed[endpointProto] = e.value.map(element => { - if (!aasCore.types.isSubmodelElementCollection(element)) return null; - - return AIMCParser.parseAIMCEntry(element, env); - }).filter(e => e !== null) as MappingConfEntry[]; + sm.submodelElements.forEach(mapping => { + if (!aasCore.types.isSubmodelElementCollection(mapping) || !mapping.value) return; + const parsedMapping = AIMCParser.parseAIMCEntry(mapping, env); + if (parsedMapping === null) return; + parsed.push(parsedMapping); }); return parsed; diff --git a/lib/src/types/aidConf.ts b/lib/src/types/aidConf.ts index 158ac66..a06ca20 100644 --- a/lib/src/types/aidConf.ts +++ b/lib/src/types/aidConf.ts @@ -1,8 +1,6 @@ import type { AvailableEndpoint } from "./common"; -export type AssetInterfacesDescription = { - [key in AvailableEndpoint]?: InterfaceDescription[]; -}; +export type AssetInterfacesDescription = InterfaceDescription[]; export type InterfaceDescription = { title: string; diff --git a/lib/src/types/aimcConf.ts b/lib/src/types/aimcConf.ts index be88dff..bb6e3e7 100644 --- a/lib/src/types/aimcConf.ts +++ b/lib/src/types/aimcConf.ts @@ -1,8 +1,7 @@ import type { types } from "@aas-core-works/aas-core3.0-typescript"; -import type { AvailableEndpoint } from "./common"; import type { ConnectionConfiguration } from "./requests"; -export type AssetInterfacesMappingConfiguration = Record; +export type AssetInterfacesMappingConfiguration = MappingConfEntry[]; export type MappingConfEntry = { EndpointMetaDataReference:types.SubmodelElementCollection; diff --git a/lib/src/types/common.ts b/lib/src/types/common.ts index ff5a571..d533a22 100644 --- a/lib/src/types/common.ts +++ b/lib/src/types/common.ts @@ -3,9 +3,9 @@ import type { types } from "@aas-core-works/aas-core3.0-typescript"; export const availableEndpoints = ["HTTP", "MQTT"] as const; export type AvailableEndpoint = typeof availableEndpoints[number]; -export function endpointAvailable(endpoint: string): AvailableEndpoint | null { +export function endpointAvailable(endpoint: string): AvailableEndpoint | undefined { const idx = availableEndpoints.map(e => e.toLocaleLowerCase()).findIndex(e => e === endpoint.toLocaleLowerCase()); - if (idx === -1) return null; + if (idx === -1) return undefined; return availableEndpoints[idx]; } diff --git a/owntest.json b/owntest.json index 545e5a0..af6cba4 100644 --- a/owntest.json +++ b/owntest.json @@ -44,426 +44,688 @@ "idShort": "AssetInterfacesDescription", "id": "www.example.com/ids/sm/7142_2140_7032_7989", "kind": "Instance", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/idta/AssetInterfaceDescription/1/0/Submodel" + } + ] + }, "submodelElements": [ { - "idShort": "MQTT", - "typeValueListElement": "SubmodelElement", + "idShort": "Interface01", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://www.w3.org/2019/wot/td#" + } + ] + }, + "embeddedDataSpecifications": [], "value": [ { - "idShort": "DEL-00", + "idShort": "EndpointMetadata", "semanticId": { "type": "ExternalReference", - "keys": [] + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/idta/AssetInterfacesDescription/1/0/EndpointMetadata" + } + ] }, "embeddedDataSpecifications": [], "value": [ { - "idShort": "EndpointMetadata", + "idShort": "titles", + "value": [ + { + "language": "en", + "text": "AID and AIMC Test" + } + ], + "modelType": "MultiLanguageProperty" + }, + { + "idShort": "base", "semanticId": { "type": "ExternalReference", "keys": [] }, "embeddedDataSpecifications": [], + "valueType": "xs:string", + "value": "mqtt://127.0.0.1:1883", + "modelType": "Property" + }, + { + "idShort": "mqv:version", + "semanticId": { + "type": "ExternalReference", + "keys": [] + }, + "embeddedDataSpecifications": [], + "valueType": "xs:string", + "value": "5.0", + "modelType": "Property" + }, + { + "idShort": "contentType", + "semanticId": { + "type": "ExternalReference", + "keys": [] + }, + "embeddedDataSpecifications": [], + "valueType": "xs:string", + "value": "application/json", + "modelType": "Property" + } + ], + "modelType": "SubmodelElementCollection" + }, + { + "idShort": "InterfaceMetadata", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/idta/AssetInterfacesDescription/1/0/InterfaceMetadata" + } + ] + }, + "embeddedDataSpecifications": [], + "value": [ + { + "idShort": "Properties", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://www.w3.org/2019/wot/td#hasPropertyAffordance" + } + ] + }, "value": [ { - "idShort": "titles", + "idShort": "Property01", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/idta/AssetInterfacesDescription/1/0/InterfaceMetadata/Properties/Property" + } + ] + }, "value": [ { - "language": "en", - "text": "AID and AIMC Test" - } - ], - "modelType": "MultiLanguageProperty" - }, - { - "idShort": "base", - "semanticId": { - "type": "ExternalReference", - "keys": [] - }, - "embeddedDataSpecifications": [], - "valueType": "xs:string", - "value": "mqtt://127.0.0.1:1883", - "modelType": "Property" - }, - { - "idShort": "mqv:version", - "semanticId": { - "type": "ExternalReference", - "keys": [] - }, - "embeddedDataSpecifications": [], - "valueType": "xs:string", - "value": "5.0", - "modelType": "Property" - }, - { - "idShort": "contentType", - "semanticId": { - "type": "ExternalReference", - "keys": [] - }, - "embeddedDataSpecifications": [], - "valueType": "xs:string", - "value": "application/json", - "modelType": "Property" - }, - { - "idShort": "securityDefinitions", - "semanticId": { - "type": "ExternalReference", - "keys": [] - }, - "embeddedDataSpecifications": [], - "value": [ - { - "idShort": "basic", + "idShort": "title", "semanticId": { "type": "ExternalReference", - "keys": [] + "keys": [ + { + "type": "GlobalReference", + "value": "https://www.w3.org/2019/wot/td#title" + } + ] }, - "embeddedDataSpecifications": [], + "valueType": "xs:string", + "value": "TestingParameter01", + "modelType": "Property" + }, + { + "idShort": "observable", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://www.w3.org/2019/wot/td#isObservable" + } + ] + }, + "valueType": "xs:boolean", + "value": "true", + "modelType": "Property" + }, + { + "idShort": "type", + "valueType": "xs:string", + "value": "integer", + "modelType": "Property" + }, + { + "idShort": "forms", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://www.w3.org/2019/wot/td#hasForm" + } + ] + }, + "typeValueListElement": "SubmodelElementCollection", "value": [ { - "idShort": "in", - "semanticId": { - "type": "ExternalReference", - "keys": [] - }, - "embeddedDataSpecifications": [], - "valueType": "xs:string", - "value": "header", - "modelType": "Property" + "idShort": "", + "value": [ + { + "idShort": "href", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://www.w3.org/2019/wot/hypermedia#hasTarget" + } + ] + }, + "valueType": "xs:string", + "value": "/testasset/testparam1", + "modelType": "Property" + }, + { + "idShort": "contentType", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://www.w3.org/2019/wot/hypermedia#forContentType" + } + ] + }, + "valueType": "xs:string", + "value": "application/json", + "modelType": "Property" + }, + { + "idShort": "op", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://www.w3.org/2019/wot/td#OperationType" + } + ] + }, + "valueType": "xs:string", + "value": "readProperty", + "modelType": "Property" + } + ], + "modelType": "SubmodelElementCollection" } ], - "modelType": "SubmodelElementCollection" + "modelType": "SubmodelElementList" } ], "modelType": "SubmodelElementCollection" }, { - "idShort": "AssetsReservedClientName", - "valueType": "xs:string", - "value": "thisandthat", - "modelType": "Property" + "idShort": "Property02", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://admin-shell.io/idta/AssetInterfacesDescription/1/0/InterfaceMetadata/Properties/Property" + } + ] + }, + "value": [ + { + "idShort": "title", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://www.w3.org/2019/wot/td#title" + } + ] + }, + "valueType": "xs:string", + "value": "TestingParameter02", + "modelType": "Property" + }, + { + "idShort": "observable", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://www.w3.org/2019/wot/td#isObservable" + } + ] + }, + "valueType": "xs:boolean", + "value": "false", + "modelType": "Property" + }, + { + "idShort": "type", + "valueType": "xs:string", + "value": "boolean", + "modelType": "Property" + }, + { + "idShort": "forms", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://www.w3.org/2019/wot/td#hasForm" + } + ] + }, + "typeValueListElement": "SubmodelElementCollection", + "value": [ + { + "idShort": "", + "value": [ + { + "idShort": "href", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://www.w3.org/2019/wot/hypermedia#hasTarget" + } + ] + }, + "valueType": "xs:string", + "value": "mqtt://127.0.0.1:1883/testasset/testparam2", + "modelType": "Property" + }, + { + "idShort": "contentType", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://www.w3.org/2019/wot/hypermedia#forContentType" + } + ] + }, + "valueType": "xs:string", + "value": "application/json", + "modelType": "Property" + }, + { + "idShort": "op", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://www.w3.org/2019/wot/td#OperationType" + } + ] + }, + "valueType": "xs:string", + "value": "readProperty", + "modelType": "Property" + } + ], + "modelType": "SubmodelElementCollection" + }, + { + "idShort": "", + "value": [ + { + "idShort": "href", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://www.w3.org/2019/wot/hypermedia#hasTarget" + } + ] + }, + "valueType": "xs:string", + "value": "mqtt://127.0.0.1:1883/testasset/testparam2/write", + "modelType": "Property" + }, + { + "idShort": "contentType", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://www.w3.org/2019/wot/hypermedia#forContentType" + } + ] + }, + "valueType": "xs:string", + "value": "application/json", + "modelType": "Property" + }, + { + "idShort": "op", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://www.w3.org/2019/wot/td#OperationType" + } + ] + }, + "valueType": "xs:string", + "value": "writeProperty", + "modelType": "Property" + } + ], + "modelType": "SubmodelElementCollection" + } + ], + "modelType": "SubmodelElementList" + } + ], + "modelType": "SubmodelElementCollection" } ], "modelType": "SubmodelElementCollection" }, { - "idShort": "InterfaceMetadata", + "idShort": "Actions", "semanticId": { "type": "ExternalReference", - "keys": [] + "keys": [ + { + "type": "GlobalReference", + "value": "https://www.w3.org/2019/wot/td#ActionAffordance" + } + ] }, - "embeddedDataSpecifications": [], "value": [ { - "idShort": "Properties", - "semanticId": { - "type": "ExternalReference", - "keys": [] - }, - "embeddedDataSpecifications": [], - "typeValueListElement": "SubmodelElementCollection", + "idShort": "Action01", "value": [ { - "idShort": "DEL-00", - "value": [ - { - "idShort": "title", - "valueType": "xs:string", - "value": "TestingParameter01", - "modelType": "Property" - }, - { - "idShort": "observable", - "valueType": "xs:boolean", - "value": "true", - "modelType": "Property" - }, - { - "idShort": "type", - "valueType": "xs:string", - "value": "integer", - "modelType": "Property" - }, - { - "idShort": "forms", - "typeValueListElement": "SubmodelElementCollection", - "value": [ - { - "idShort": "", - "value": [ - { - "idShort": "href", - "valueType": "xs:string", - "value": "/testasset/testparam1/value", - "modelType": "Property" - }, - { - "idShort": "contentType", - "valueType": "xs:string", - "value": "application/json", - "modelType": "Property" - }, - { - "idShort": "op", - "valueType": "xs:string", - "value": "readProperty", - "modelType": "Property" - } - ], - "modelType": "SubmodelElementCollection" - } - ], - "modelType": "SubmodelElementList" - } - ], - "modelType": "SubmodelElementCollection" + "idShort": "async", + "valueType": "xs:boolean", + "value": "false", + "modelType": "Property" }, { - "idShort": "DEL-01", + "idShort": "forms", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://www.w3.org/2019/wot/td#hasForm" + } + ] + }, + "typeValueListElement": "SubmodelElementCollection", "value": [ { - "idShort": "title", - "valueType": "xs:string", - "value": "TestingParameter02", - "modelType": "Property" - }, - { - "idShort": "observable", - "valueType": "xs:boolean", - "value": "false", - "modelType": "Property" - }, - { - "idShort": "type", - "valueType": "xs:string", - "value": "boolean", - "modelType": "Property" - }, - { - "idShort": "forms", - "typeValueListElement": "SubmodelElementCollection", + "idShort": "", "value": [ { - "idShort": "", - "value": [ - { - "idShort": "href", - "valueType": "xs:string", - "value": "mqtt://127.0.0.1:1883/testasset/testparam2/value", - "modelType": "Property" - }, - { - "idShort": "contentType", - "valueType": "xs:string", - "value": "application/json", - "modelType": "Property" - }, - { - "idShort": "op", - "valueType": "xs:string", - "value": "readProperty", - "modelType": "Property" - } - ], - "modelType": "SubmodelElementCollection" + "idShort": "href", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://www.w3.org/2019/wot/hypermedia#hasTarget" + } + ] + }, + "valueType": "xs:string", + "value": "/testasset/testoperation1", + "modelType": "Property" }, { - "idShort": "", - "value": [ - { - "idShort": "href", - "valueType": "xs:string", - "value": "mqtt://127.0.0.1:1883/testasset/testparam2/set", - "modelType": "Property" - }, - { - "idShort": "contentType", - "valueType": "xs:string", - "value": "application/json", - "modelType": "Property" - }, - { - "idShort": "op", - "valueType": "xs:string", - "value": "writeProperty", - "modelType": "Property" - } - ], - "modelType": "SubmodelElementCollection" + "idShort": "contentType", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://www.w3.org/2019/wot/hypermedia#forContentType" + } + ] + }, + "valueType": "xs:string", + "value": "application/json", + "modelType": "Property" + }, + { + "idShort": "op", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://www.w3.org/2019/wot/td#OperationType" + } + ] + }, + "valueType": "xs:string", + "value": "invokeAction", + "modelType": "Property" } ], - "modelType": "SubmodelElementList" + "modelType": "SubmodelElementCollection" } ], - "modelType": "SubmodelElementCollection" + "modelType": "SubmodelElementList" } ], - "modelType": "SubmodelElementList" + "modelType": "SubmodelElementCollection" }, { - "idShort": "Actions", - "semanticId": { - "type": "ExternalReference", - "keys": [] - }, - "embeddedDataSpecifications": [], - "typeValueListElement": "SubmodelElementCollection", + "idShort": "Action02", "value": [ { - "idShort": "DEL-00", - "value": [ - { - "idShort": "async", - "valueType": "xs:boolean", - "value": "false", - "modelType": "Property" - }, - { - "idShort": "forms", - "typeValueListElement": "SubmodelElementCollection", - "value": [ - { - "idShort": "", - "value": [ - { - "idShort": "href", - "valueType": "xs:string", - "value": "/testasset/testoperation1", - "modelType": "Property" - }, - { - "idShort": "contentType", - "valueType": "xs:string", - "value": "application/json", - "modelType": "Property" - }, - { - "idShort": "op", - "valueType": "xs:string", - "value": "invokeAction", - "modelType": "Property" - } - ], - "modelType": "SubmodelElementCollection" - } - ], - "modelType": "SubmodelElementList" - } - ], - "modelType": "SubmodelElementCollection" + "idShort": "async", + "valueType": "xs:boolean", + "value": "false", + "modelType": "Property" }, { - "idShort": "DEL-01", + "idShort": "forms", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://www.w3.org/2019/wot/td#hasForm" + } + ] + }, + "typeValueListElement": "SubmodelElementCollection", "value": [ { - "idShort": "async", - "valueType": "xs:boolean", - "value": "false", - "modelType": "Property" - }, - { - "idShort": "forms", - "typeValueListElement": "SubmodelElementCollection", + "idShort": "", "value": [ { - "idShort": "", - "value": [ - { - "idShort": "href", - "valueType": "xs:string", - "value": "/testasset/testoperation2", - "modelType": "Property" - }, - { - "idShort": "contentType", - "valueType": "xs:string", - "value": "application/json", - "modelType": "Property" - }, - { - "idShort": "op", - "valueType": "xs:string", - "value": "invokeAction", - "modelType": "Property" - } - ], - "modelType": "SubmodelElementCollection" - } - ], - "modelType": "SubmodelElementList" - } - ], - "modelType": "SubmodelElementCollection" - }, - { - "idShort": "DEL-02", - "value": [ - { - "idShort": "async", - "valueType": "xs:boolean", - "value": "false", - "modelType": "Property" - }, - { - "idShort": "forms", - "typeValueListElement": "SubmodelElementCollection", - "value": [ + "idShort": "href", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://www.w3.org/2019/wot/hypermedia#hasTarget" + } + ] + }, + "valueType": "xs:string", + "value": "/testasset/testoperation2", + "modelType": "Property" + }, { - "idShort": "", - "value": [ - { - "idShort": "href", - "valueType": "xs:string", - "value": "/testasset/testoperation3", - "modelType": "Property" - }, - { - "idShort": "contentType", - "valueType": "xs:string", - "value": "application/json", - "modelType": "Property" - }, - { - "idShort": "op", - "valueType": "xs:string", - "value": "invokeAction", - "modelType": "Property" - } - ], - "modelType": "SubmodelElementCollection" + "idShort": "contentType", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://www.w3.org/2019/wot/hypermedia#forContentType" + } + ] + }, + "valueType": "xs:string", + "value": "application/json", + "modelType": "Property" + }, + { + "idShort": "op", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://www.w3.org/2019/wot/td#OperationType" + } + ] + }, + "valueType": "xs:string", + "value": "invokeAction", + "modelType": "Property" } ], - "modelType": "SubmodelElementList" + "modelType": "SubmodelElementCollection" } ], - "modelType": "SubmodelElementCollection" + "modelType": "SubmodelElementList" } ], - "modelType": "SubmodelElementList" + "modelType": "SubmodelElementCollection" }, { - "idShort": "Events", - "semanticId": { - "type": "ExternalReference", - "keys": [] - }, - "embeddedDataSpecifications": [], - "typeValueListElement": "SubmodelElementCollection", - "value": [], - "modelType": "SubmodelElementList" + "idShort": "Action03", + "value": [ + { + "idShort": "async", + "valueType": "xs:boolean", + "value": "false", + "modelType": "Property" + }, + { + "idShort": "forms", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://www.w3.org/2019/wot/td#hasForm" + } + ] + }, + "typeValueListElement": "SubmodelElementCollection", + "value": [ + { + "idShort": "", + "value": [ + { + "idShort": "href", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://www.w3.org/2019/wot/hypermedia#hasTarget" + } + ] + }, + "valueType": "xs:string", + "value": "/testasset/testoperation3", + "modelType": "Property" + }, + { + "idShort": "contentType", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://www.w3.org/2019/wot/hypermedia#forContentType" + } + ] + }, + "valueType": "xs:string", + "value": "application/json", + "modelType": "Property" + }, + { + "idShort": "op", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://www.w3.org/2019/wot/td#OperationType" + } + ] + }, + "valueType": "xs:string", + "value": "invokeAction", + "modelType": "Property" + } + ], + "modelType": "SubmodelElementCollection" + } + ], + "modelType": "SubmodelElementList" + } + ], + "modelType": "SubmodelElementCollection" } ], "modelType": "SubmodelElementCollection" + }, + { + "idShort": "Events", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://www.w3.org/2019/wot/td#EventAffordance" + } + ] + }, + "modelType": "SubmodelElementCollection" } ], "modelType": "SubmodelElementCollection" + }, + { + "idShort": "title", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "https://www.w3.org/2019/wot/td#title" + } + ] + }, + "valueType": "xs:string", + "value": "Titel", + "modelType": "Property" } ], - "modelType": "SubmodelElementList" + "modelType": "SubmodelElementCollection" } ], "modelType": "Submodel" @@ -474,337 +736,302 @@ "kind": "Instance", "submodelElements": [ { - "idShort": "MQTT", - "typeValueListElement": "SubmodelElementCollection", + "idShort": "Mapping01", "value": [ { - "idShort": "DEL-00", + "idShort": "EndpointMetaDataReference", + "value": { + "type": "ModelReference", + "keys": [ + { + "type": "Submodel", + "value": "www.example.com/ids/sm/7142_2140_7032_7989" + }, + { + "type": "SubmodelElementCollection", + "value": "Interface01" + }, + { + "type": "SubmodelElementCollection", + "value": "EndpointMetadata" + } + ] + }, + "modelType": "ReferenceElement" + }, + { + "idShort": "MappingConfiguration", + "typeValueListElement": "SubmodelElementCollection", "value": [ { - "idShort": "EndpointMetaDataReference", - "value": { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "www.example.com/ids/sm/7142_2140_7032_7989" - }, - { - "type": "SubmodelElementList", - "value": "MQTT" - }, - { - "type": "SubmodelElementCollection", - "value": "DEL-00" - }, - { - "type": "SubmodelElementCollection", - "value": "EndpointMetadata" - } - ] - }, - "modelType": "ReferenceElement" - }, - { - "idShort": "MappingConfiguration", - "typeValueListElement": "SubmodelElement", + "idShort": "DEL-00", "value": [ { - "idShort": "DEL-00", + "idShort": "InterfaceMetaDataReference", + "value": { + "type": "ModelReference", + "keys": [ + { + "type": "Submodel", + "value": "www.example.com/ids/sm/7142_2140_7032_7989" + }, + { + "type": "SubmodelElementCollection", + "value": "Interface01" + }, + { + "type": "SubmodelElementCollection", + "value": "InterfaceMetadata" + } + ] + }, + "modelType": "ReferenceElement" + }, + { + "idShort": "SourceSinkMappings", + "typeValueListElement": "SubmodelElement", "value": [ { - "idShort": "InterfaceMetaDataReference", - "value": { + "idShort": "DEL-00", + "first": { "type": "ModelReference", "keys": [ { "type": "Submodel", "value": "www.example.com/ids/sm/7142_2140_7032_7989" }, - { - "type": "SubmodelElementList", - "value": "MQTT" - }, { "type": "SubmodelElementCollection", - "value": "DEL-00" + "value": "Interface01" }, { "type": "SubmodelElementCollection", "value": "InterfaceMetadata" + }, + { + "type": "SubmodelElementCollection", + "value": "Properties" + }, + { + "type": "SubmodelElementCollection", + "value": "Property01" } ] }, - "modelType": "ReferenceElement" + "second": { + "type": "ModelReference", + "keys": [ + { + "type": "Submodel", + "value": "https://example.com/ids/sm/8055_9060_7032_0793" + }, + { + "type": "SubmodelElementCollection", + "value": "Params" + }, + { + "type": "Property", + "value": "TestParam1" + } + ] + }, + "modelType": "RelationshipElement" }, { - "idShort": "SourceSinkMappings", - "typeValueListElement": "SubmodelElement", - "value": [ - { - "idShort": "DEL-00", - "first": { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "www.example.com/ids/sm/7142_2140_7032_7989" - }, - { - "type": "SubmodelElementList", - "value": "MQTT" - }, - { - "type": "SubmodelElementCollection", - "value": "DEL-00" - }, - { - "type": "SubmodelElementCollection", - "value": "InterfaceMetadata" - }, - { - "type": "SubmodelElementList", - "value": "Properties" - }, - { - "type": "SubmodelElementCollection", - "value": "DEL-00" - } - ] + "idShort": "DEL-01", + "first": { + "type": "ModelReference", + "keys": [ + { + "type": "Submodel", + "value": "www.example.com/ids/sm/7142_2140_7032_7989" }, - "second": { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "https://example.com/ids/sm/8055_9060_7032_0793" - }, - { - "type": "SubmodelElementCollection", - "value": "Params" - }, - { - "type": "Property", - "value": "TestParam1" - } - ] + { + "type": "SubmodelElementCollection", + "value": "Interface01" }, - "modelType": "RelationshipElement" - }, - { - "idShort": "DEL-01", - "first": { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "www.example.com/ids/sm/7142_2140_7032_7989" - }, - { - "type": "SubmodelElementList", - "value": "MQTT" - }, - { - "type": "SubmodelElementCollection", - "value": "DEL-00" - }, - { - "type": "SubmodelElementCollection", - "value": "InterfaceMetadata" - }, - { - "type": "SubmodelElementList", - "value": "Properties" - }, - { - "type": "SubmodelElementCollection", - "value": "DEL-01" - } - ] + { + "type": "SubmodelElementCollection", + "value": "InterfaceMetadata" }, - "second": { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "https://example.com/ids/sm/8055_9060_7032_0793" - }, - { - "type": "SubmodelElementCollection", - "value": "Params" - }, - { - "type": "Property", - "value": "TestParam2" - } - ] + { + "type": "SubmodelElementCollection", + "value": "Properties" }, - "modelType": "RelationshipElement" - }, - { - "idShort": "DEL-02", - "first": { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "www.example.com/ids/sm/7142_2140_7032_7989" - }, - { - "type": "SubmodelElementList", - "value": "MQTT" - }, - { - "type": "SubmodelElementCollection", - "value": "DEL-00" - }, - { - "type": "SubmodelElementCollection", - "value": "InterfaceMetadata" - }, - { - "type": "SubmodelElementList", - "value": "Actions" - }, - { - "type": "SubmodelElementCollection", - "value": "DEL-00" - } - ] + { + "type": "SubmodelElementCollection", + "value": "Property02" + } + ] + }, + "second": { + "type": "ModelReference", + "keys": [ + { + "type": "Submodel", + "value": "https://example.com/ids/sm/8055_9060_7032_0793" }, - "second": { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "https://example.com/ids/sm/8055_9060_7032_0793" - }, - { - "type": "SubmodelElementCollection", - "value": "Operations" - }, - { - "type": "Operation", - "value": "TestOperation1" - } - ] + { + "type": "SubmodelElementCollection", + "value": "Params" }, - "modelType": "RelationshipElement" - }, - { - "idShort": "DEL-03", - "first": { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "www.example.com/ids/sm/7142_2140_7032_7989" - }, - { - "type": "SubmodelElementList", - "value": "MQTT" - }, - { - "type": "SubmodelElementCollection", - "value": "DEL-00" - }, - { - "type": "SubmodelElementCollection", - "value": "InterfaceMetadata" - }, - { - "type": "SubmodelElementList", - "value": "Actions" - }, - { - "type": "SubmodelElementCollection", - "value": "DEL-01" - } - ] + { + "type": "Property", + "value": "TestParam2" + } + ] + }, + "modelType": "RelationshipElement" + }, + { + "idShort": "DEL-02", + "first": { + "type": "ModelReference", + "keys": [ + { + "type": "Submodel", + "value": "www.example.com/ids/sm/7142_2140_7032_7989" }, - "second": { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "https://example.com/ids/sm/8055_9060_7032_0793" - }, - { - "type": "SubmodelElementCollection", - "value": "Operations" - }, - { - "type": "Operation", - "value": "TestOperation2" - } - ] + { + "type": "SubmodelElementCollection", + "value": "Interface01" }, - "modelType": "RelationshipElement" - }, - { - "idShort": "DEL-04", - "first": { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "www.example.com/ids/sm/7142_2140_7032_7989" - }, - { - "type": "SubmodelElementList", - "value": "MQTT" - }, - { - "type": "SubmodelElementCollection", - "value": "DEL-00" - }, - { - "type": "SubmodelElementCollection", - "value": "InterfaceMetadata" - }, - { - "type": "SubmodelElementList", - "value": "Actions" - }, - { - "type": "SubmodelElementCollection", - "value": "DEL-02" - } - ] + { + "type": "SubmodelElementCollection", + "value": "InterfaceMetadata" }, - "second": { - "type": "ModelReference", - "keys": [ - { - "type": "Submodel", - "value": "https://example.com/ids/sm/8055_9060_7032_0793" - }, - { - "type": "SubmodelElementCollection", - "value": "Operations" - }, - { - "type": "Operation", - "value": "TestOperation3" - } - ] + { + "type": "SubmodelElementCollection", + "value": "Actions" }, - "modelType": "RelationshipElement" - } - ], - "modelType": "SubmodelElementList" + { + "type": "SubmodelElementCollection", + "value": "Action01" + } + ] + }, + "second": { + "type": "ModelReference", + "keys": [ + { + "type": "Submodel", + "value": "https://example.com/ids/sm/8055_9060_7032_0793" + }, + { + "type": "SubmodelElementCollection", + "value": "Operations" + }, + { + "type": "Operation", + "value": "TestOperation1" + } + ] + }, + "modelType": "RelationshipElement" + }, + { + "idShort": "DEL-03", + "first": { + "type": "ModelReference", + "keys": [ + { + "type": "Submodel", + "value": "www.example.com/ids/sm/7142_2140_7032_7989" + }, + { + "type": "SubmodelElementCollection", + "value": "Interface01" + }, + { + "type": "SubmodelElementCollection", + "value": "InterfaceMetadata" + }, + { + "type": "SubmodelElementCollection", + "value": "Actions" + }, + { + "type": "SubmodelElementCollection", + "value": "Action02" + } + ] + }, + "second": { + "type": "ModelReference", + "keys": [ + { + "type": "Submodel", + "value": "https://example.com/ids/sm/8055_9060_7032_0793" + }, + { + "type": "SubmodelElementCollection", + "value": "Operations" + }, + { + "type": "Operation", + "value": "TestOperation2" + } + ] + }, + "modelType": "RelationshipElement" + }, + { + "idShort": "DEL-04", + "first": { + "type": "ModelReference", + "keys": [ + { + "type": "Submodel", + "value": "www.example.com/ids/sm/7142_2140_7032_7989" + }, + { + "type": "SubmodelElementCollection", + "value": "Interface01" + }, + { + "type": "SubmodelElementCollection", + "value": "InterfaceMetadata" + }, + { + "type": "SubmodelElementCollection", + "value": "Actions" + }, + { + "type": "SubmodelElementCollection", + "value": "Action03" + } + ] + }, + "second": { + "type": "ModelReference", + "keys": [ + { + "type": "Submodel", + "value": "https://example.com/ids/sm/8055_9060_7032_0793" + }, + { + "type": "SubmodelElementCollection", + "value": "Operations" + }, + { + "type": "Operation", + "value": "TestOperation3" + } + ] + }, + "modelType": "RelationshipElement" } ], - "modelType": "SubmodelElementCollection" + "modelType": "SubmodelElementList" } ], - "modelType": "SubmodelElementList" + "modelType": "SubmodelElementCollection" } ], - "modelType": "SubmodelElementCollection" + "modelType": "SubmodelElementList" } ], - "modelType": "SubmodelElementList" + "modelType": "SubmodelElementCollection" } ], "modelType": "Submodel"