diff --git a/AID-AIMC-Full-Example-20230911T1608.json b/AID-AIMC-Full-Example-20230911T1608.json new file mode 100755 index 0000000..b5876fe --- /dev/null +++ b/AID-AIMC-Full-Example-20230911T1608.json @@ -0,0 +1,1147 @@ +{ + "assetAdministrationShells": [ + { + "idShort": "AASwithAIDandAIMC", + "id": "https://example.com/ids/sm/6560_0160_7032_0896", + "assetInformation": { + "assetKind": "Instance", + "globalAssetId": "draft" + }, + "submodels": [ + { + "type": "ExternalReference", + "keys": [ + { + "type": "Submodel", + "value": "www.example.com/ids/sm/7142_2140_7032_7989" + } + ] + }, + { + "type": "ModelReference", + "keys": [ + { + "type": "Submodel", + "value": "https://example.com/ids/sm/4342_8060_7032_0872" + } + ] + }, + { + "type": "ModelReference", + "keys": [ + { + "type": "Submodel", + "value": "https://example.com/ids/sm/8055_9060_7032_0793" + } + ] + } + ], + "modelType": "AssetAdministrationShell" + } + ], + "submodels": [ + { + "idShort": "AssetInterfacesDescription", + "id": "www.example.com/ids/sm/7142_2140_7032_7989", + "submodelElements": [ + { + "idShort": "MQTT", + "typeValueListElement": "SubmodelElement", + "value": [ + { + "idShort": "DEL-00", + "semanticId": { + "type": "ExternalReference", + "keys": [] + }, + "embeddedDataSpecifications": [], + "value": [ + { + "idShort": "EndpointMetadata", + "semanticId": { + "type": "ExternalReference", + "keys": [] + }, + "embeddedDataSpecifications": [], + "value": [ + { + "idShort": "titles", + "value": [ + { + "language": "en", + "text": "Time series coordinates from X" + } + ], + "modelType": "MultiLanguageProperty" + }, + { + "idShort": "base", + "semanticId": { + "type": "ExternalReference", + "keys": [] + }, + "embeddedDataSpecifications": [], + "valueType": "xs:string", + "value": "mqtt://172.16.160.171: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", + "semanticId": { + "type": "ExternalReference", + "keys": [] + }, + "embeddedDataSpecifications": [], + "value": [ + { + "idShort": "in", + "semanticId": { + "type": "ExternalReference", + "keys": [] + }, + "embeddedDataSpecifications": [], + "valueType": "xs:string", + "value": "header", + "modelType": "Property" + } + ], + "modelType": "SubmodelElementCollection" + } + ], + "modelType": "SubmodelElementCollection" + }, + { + "idShort": "AssetsReservedClientName", + "valueType": "xs:string", + "value": "thisandthat", + "modelType": "Property" + } + ], + "modelType": "SubmodelElementCollection" + }, + { + "idShort": "InterfaceMetadata", + "semanticId": { + "type": "ExternalReference", + "keys": [] + }, + "embeddedDataSpecifications": [], + "value": [ + { + "idShort": "Properties", + "semanticId": { + "type": "ExternalReference", + "keys": [] + }, + "embeddedDataSpecifications": [], + "typeValueListElement": "SubmodelElement", + "value": [ + { + "idShort": "DEL-00", + "semanticId": { + "type": "ExternalReference", + "keys": [] + }, + "embeddedDataSpecifications": [], + "value": [ + { + "idShort": "content", + "value": [ + { + "idShort": "nonObjects", + "typeValueListElement": "SubmodelElement", + "value": [ + { + "idShort": "DEL-00", + "value": [ + { + "idShort": "key", + "valueType": "xs:string", + "value": "timestamp", + "modelType": "Property" + }, + { + "idShort": "type", + "valueType": "xs:string", + "value": "string", + "modelType": "Property" + }, + { + "idShort": "format", + "value": { + "type": "ModelReference", + "keys": [ + { + "type": "ConceptDescription", + "value": "https://example.com/ids/cd/3505_8080_9032_2713" + } + ] + }, + "modelType": "ReferenceElement" + } + ], + "modelType": "SubmodelElementCollection" + } + ], + "modelType": "SubmodelElementList" + }, + { + "idShort": "objects", + "typeValueListElement": "SubmodelElement", + "value": [ + { + "idShort": "DEL-00", + "value": [ + { + "idShort": "key", + "valueType": "xs:string", + "value": "coordinates", + "modelType": "Property" + }, + { + "idShort": "content", + "value": [ + { + "idShort": "nonObjects", + "typeValueListElement": "SubmodelElement", + "value": [ + { + "idShort": "DEL-00", + "value": [ + { + "idShort": "key", + "valueType": "xs:string", + "value": "x", + "modelType": "Property" + }, + { + "idShort": "type", + "valueType": "xs:string", + "value": "number", + "modelType": "Property" + }, + { + "idShort": "format", + "value": { + "type": "ModelReference", + "keys": [ + { + "type": "ConceptDescription", + "value": "https://example.com/ids/cd/3505_8080_9032_2713" + } + ] + }, + "modelType": "ReferenceElement" + } + ], + "modelType": "SubmodelElementCollection" + }, + { + "idShort": "DEL-01", + "value": [ + { + "idShort": "key", + "valueType": "xs:string", + "value": "y", + "modelType": "Property" + }, + { + "idShort": "type", + "valueType": "xs:string", + "value": "number", + "modelType": "Property" + }, + { + "idShort": "format", + "value": { + "type": "ModelReference", + "keys": [ + { + "type": "ConceptDescription", + "value": "https://example.com/ids/cd/3505_8080_9032_2713" + } + ] + }, + "modelType": "ReferenceElement" + } + ], + "modelType": "SubmodelElementCollection" + } + ], + "modelType": "SubmodelElementList" + }, + { + "idShort": "objects", + "typeValueListElement": "SubmodelElement", + "value": [ + { + "idShort": "DEL-00", + "value": [ + { + "idShort": "key", + "valueType": "xs:string", + "value": "subcoordinates", + "modelType": "Property" + }, + { + "idShort": "content", + "value": [ + { + "idShort": "nonObjects", + "typeValueListElement": "SubmodelElement", + "value": [ + { + "idShort": "DEL-00", + "value": [ + { + "idShort": "key", + "valueType": "xs:string", + "value": "xs", + "modelType": "Property" + }, + { + "idShort": "type", + "valueType": "xs:string", + "value": "number", + "modelType": "Property" + }, + { + "idShort": "format", + "value": { + "type": "ModelReference", + "keys": [ + { + "type": "ConceptDescription", + "value": "https://example.com/ids/cd/3505_8080_9032_2713" + } + ] + }, + "modelType": "ReferenceElement" + } + ], + "modelType": "SubmodelElementCollection" + }, + { + "idShort": "DEL-01", + "value": [ + { + "idShort": "key", + "valueType": "xs:string", + "value": "ys", + "modelType": "Property" + }, + { + "idShort": "type", + "valueType": "xs:string", + "value": "number", + "modelType": "Property" + }, + { + "idShort": "format", + "value": { + "type": "ModelReference", + "keys": [ + { + "type": "ConceptDescription", + "value": "https://example.com/ids/cd/3505_8080_9032_2713" + } + ] + }, + "modelType": "ReferenceElement" + } + ], + "modelType": "SubmodelElementCollection" + } + ], + "modelType": "SubmodelElementList" + } + ], + "modelType": "SubmodelElementCollection" + } + ], + "modelType": "SubmodelElementCollection" + } + ], + "modelType": "SubmodelElementList" + } + ], + "modelType": "SubmodelElementCollection" + } + ], + "modelType": "SubmodelElementCollection" + } + ], + "modelType": "SubmodelElementList" + } + ], + "modelType": "SubmodelElementCollection" + }, + { + "idShort": "forms", + "semanticId": { + "type": "ExternalReference", + "keys": [] + }, + "embeddedDataSpecifications": [], + "value": [ + { + "idShort": "mqv:topic", + "semanticId": { + "type": "ExternalReference", + "keys": [] + }, + "embeddedDataSpecifications": [], + "valueType": "xs:string", + "value": "randomTopic", + "modelType": "Property" + }, + { + "idShort": "mqv:controlPacket", + "semanticId": { + "type": "ExternalReference", + "keys": [] + }, + "embeddedDataSpecifications": [], + "valueType": "xs:string", + "value": "mqv:publish", + "modelType": "Property" + } + ], + "modelType": "SubmodelElementCollection" + } + ], + "modelType": "SubmodelElementCollection" + } + ], + "modelType": "SubmodelElementList" + }, + { + "idShort": "Actions", + "semanticId": { + "type": "ExternalReference", + "keys": [] + }, + "embeddedDataSpecifications": [], + "typeValueListElement": "SubmodelElement", + "value": [], + "modelType": "SubmodelElementList" + }, + { + "idShort": "Events", + "semanticId": { + "type": "ExternalReference", + "keys": [] + }, + "embeddedDataSpecifications": [], + "typeValueListElement": "SubmodelElement", + "value": [], + "modelType": "SubmodelElementList" + } + ], + "modelType": "SubmodelElementCollection" + } + ], + "modelType": "SubmodelElementCollection" + } + ], + "modelType": "SubmodelElementList" + } + ], + "modelType": "Submodel" + }, + { + "idShort": "AssetInterfacesMappingConfiguration", + "id": "https://example.com/ids/sm/4342_8060_7032_0872", + "submodelElements": [ + { + "idShort": "MQTT", + "typeValueListElement": "SubmodelElement", + "value": [ + { + "idShort": "DEL-00", + "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", + "value": [ + { + "idShort": "DEL-00", + "value": [ + { + "idShort": "InterfaceMetaDataReference", + "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": "InterfaceMetadata" + } + ] + }, + "modelType": "ReferenceElement" + }, + { + "idShort": "Source_Sink_Mappings", + "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" + }, + { + "type": "SubmodelElementCollection", + "value": "content" + }, + { + "type": "SubmodelElementList", + "value": "nonObjects" + }, + { + "type": "SubmodelElementCollection", + "value": "DEL-00" + } + ] + }, + "second": { + "type": "ModelReference", + "keys": [ + { + "type": "Submodel", + "value": "https://example.com/ids/sm/8055_9060_7032_0793" + }, + { + "type": "SubmodelElementCollection", + "value": "Coordinates" + }, + { + "type": "Property", + "value": "Timestamp" + } + ] + }, + "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-00" + }, + { + "type": "SubmodelElementCollection", + "value": "content" + }, + { + "type": "SubmodelElementList", + "value": "objects" + }, + { + "type": "SubmodelElementCollection", + "value": "DEL-00" + }, + { + "type": "SubmodelElementCollection", + "value": "content" + }, + { + "type": "SubmodelElementList", + "value": "nonObjects" + }, + { + "type": "SubmodelElementCollection", + "value": "DEL-00" + } + ] + }, + "second": { + "type": "ModelReference", + "keys": [ + { + "type": "Submodel", + "value": "https://example.com/ids/sm/8055_9060_7032_0793" + }, + { + "type": "SubmodelElementCollection", + "value": "Coordinates" + }, + { + "type": "Property", + "value": "X" + } + ] + }, + "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": "Properties" + }, + { + "type": "SubmodelElementCollection", + "value": "DEL-00" + }, + { + "type": "SubmodelElementCollection", + "value": "content" + }, + { + "type": "SubmodelElementList", + "value": "objects" + }, + { + "type": "SubmodelElementCollection", + "value": "DEL-00" + }, + { + "type": "SubmodelElementCollection", + "value": "content" + }, + { + "type": "SubmodelElementList", + "value": "nonObjects" + }, + { + "type": "SubmodelElementCollection", + "value": "DEL-01" + } + ] + }, + "second": { + "type": "ModelReference", + "keys": [ + { + "type": "Submodel", + "value": "https://example.com/ids/sm/8055_9060_7032_0793" + }, + { + "type": "SubmodelElementCollection", + "value": "Coordinates" + }, + { + "type": "Property", + "value": "Y" + } + ] + }, + "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": "Properties" + }, + { + "type": "SubmodelElementCollection", + "value": "DEL-00" + }, + { + "type": "SubmodelElementCollection", + "value": "content" + }, + { + "type": "SubmodelElementList", + "value": "nonObjects" + }, + { + "type": "SubmodelElementCollection", + "value": "DEL-00" + } + ] + }, + "second": { + "type": "ModelReference", + "keys": [ + { + "type": "Submodel", + "value": "https://example.com/ids/sm/8055_9060_7032_0793" + }, + { + "type": "SubmodelElementCollection", + "value": "Subcoordinates" + }, + { + "type": "Property", + "value": "Timestamp" + } + ] + }, + "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": "Properties" + }, + { + "type": "SubmodelElementCollection", + "value": "DEL-00" + }, + { + "type": "SubmodelElementCollection", + "value": "content" + }, + { + "type": "SubmodelElementList", + "value": "objects" + }, + { + "type": "SubmodelElementCollection", + "value": "DEL-00" + }, + { + "type": "SubmodelElementCollection", + "value": "content" + }, + { + "type": "SubmodelElementList", + "value": "objects" + }, + { + "type": "SubmodelElementCollection", + "value": "DEL-00" + }, + { + "type": "SubmodelElementCollection", + "value": "content" + }, + { + "type": "SubmodelElementList", + "value": "nonObjects" + }, + { + "type": "SubmodelElementCollection", + "value": "DEL-00" + } + ] + }, + "second": { + "type": "ModelReference", + "keys": [ + { + "type": "Submodel", + "value": "https://example.com/ids/sm/8055_9060_7032_0793" + }, + { + "type": "SubmodelElementCollection", + "value": "Subcoordinates" + }, + { + "type": "Property", + "value": "X" + } + ] + }, + "modelType": "RelationshipElement" + }, + { + "idShort": "DEL-05", + "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" + }, + { + "type": "SubmodelElementCollection", + "value": "content" + }, + { + "type": "SubmodelElementList", + "value": "objects" + }, + { + "type": "SubmodelElementCollection", + "value": "DEL-00" + }, + { + "type": "SubmodelElementCollection", + "value": "content" + }, + { + "type": "SubmodelElementList", + "value": "objects" + }, + { + "type": "SubmodelElementCollection", + "value": "DEL-00" + }, + { + "type": "SubmodelElementCollection", + "value": "content" + }, + { + "type": "SubmodelElementList", + "value": "nonObjects" + }, + { + "type": "SubmodelElementCollection", + "value": "DEL-01" + } + ] + }, + "second": { + "type": "ModelReference", + "keys": [ + { + "type": "Submodel", + "value": "https://example.com/ids/sm/8055_9060_7032_0793" + }, + { + "type": "SubmodelElementCollection", + "value": "Subcoordinates" + }, + { + "type": "Property", + "value": "Y" + } + ] + }, + "modelType": "RelationshipElement" + } + ], + "modelType": "SubmodelElementList" + } + ], + "modelType": "SubmodelElementCollection" + } + ], + "modelType": "SubmodelElementList" + } + ], + "modelType": "SubmodelElementCollection" + } + ], + "modelType": "SubmodelElementList" + } + ], + "modelType": "Submodel" + }, + { + "idShort": "OperationalData", + "id": "https://example.com/ids/sm/8055_9060_7032_0793", + "submodelElements": [ + { + "idShort": "Coordinates", + "value": [ + { + "idShort": "Timestamp", + "valueType": "xs:string", + "modelType": "Property" + }, + { + "idShort": "X", + "valueType": "xs:string", + "modelType": "Property" + }, + { + "idShort": "Y", + "valueType": "xs:string", + "modelType": "Property" + } + ], + "modelType": "SubmodelElementCollection" + }, + { + "idShort": "Subcoordinates", + "value": [ + { + "idShort": "Timestamp", + "valueType": "xs:string", + "modelType": "Property" + }, + { + "idShort": "X", + "valueType": "xs:string", + "modelType": "Property" + }, + { + "idShort": "Y", + "valueType": "xs:string", + "modelType": "Property" + } + ], + "modelType": "SubmodelElementCollection" + } + ], + "modelType": "Submodel" + }, + { + "idShort": "Control", + "id": "https://example.com/ids/sm/6560_0160_7032_5896", + "submodelElements": [ + { + "idShort": "OperationMode", + "value": [ + { + "idShort": "Value", + "valueType": "xs:string", + "modelType": "Property" + }, + { + "idShort": "Timestamp", + "valueType": "xs:string", + "modelType": "Property" + } + ], + "modelType": "SubmodelElementCollection" + } + ], + "modelType": "Submodel" + } + ], + "conceptDescriptions": [ + { + "id": "https://example.com/ids/cd/3505_8080_9032_2713", + "embeddedDataSpecifications": [ + { + "dataSpecification": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "http://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/3/0" + } + ] + }, + "dataSpecificationContent": { + "preferredName": [ + { + "language": "en?", + "text": "" + } + ], + "unit": "Watt", + "symbol": "W", + "dataType": "INTEGER_MEASURE", + "modelType": "DataSpecificationIec61360" + } + } + ], + "modelType": "ConceptDescription" + }, + { + "id": "https://example.com/ids/cd/9285_8080_9032_4909", + "embeddedDataSpecifications": [ + { + "dataSpecification": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "http://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/3/0" + } + ] + }, + "dataSpecificationContent": { + "preferredName": [ + { + "language": "en?", + "text": "" + } + ], + "unit": "Datetime ISO 8601", + "modelType": "DataSpecificationIec61360" + } + } + ], + "modelType": "ConceptDescription" + } + ] +} \ No newline at end of file diff --git a/AID-AIMC-MQTT-20230710T1345.json b/AID-AIMC-MQTT-20230710T1345.json new file mode 100755 index 0000000..be2ddf9 --- /dev/null +++ b/AID-AIMC-MQTT-20230710T1345.json @@ -0,0 +1 @@ +{"assetAdministrationShells":[{"idShort":"draft","id":"https://example.com/ids/sm/6560_0160_7032_0896","assetInformation":{"assetKind":"Instance","globalAssetId":"draft"},"submodels":[{"type":"ExternalReference","keys":[{"type":"Submodel","value":"www.example.com/ids/sm/7142_2140_7032_7989"}]},{"type":"ExternalReference","keys":[{"type":"Submodel","value":"https://example.com/ids/sm/4342_8060_7032_0872"}]},{"type":"ExternalReference","keys":[{"type":"Submodel","value":"https://example.com/ids/sm/8055_9060_7032_0793"}]},{"type":"ExternalReference","keys":[{"type":"Submodel","value":"https://example.com/ids/sm/6560_0160_7032_5896"}]}],"modelType":"AssetAdministrationShell"}],"submodels":[{"idShort":"AssetInterfacesDescription","id":"www.example.com/ids/sm/7142_2140_7032_7989","submodelElements":[{"idShort":"MQTT","typeValueListElement":"SubmodelElement","value":[{"idShort":"DEL-00","value":[{"idShort":"EndpointMetaData","value":[{"idShort":"AssetsReservedClientName","valueType":"xs:string","value":"InjectionMouldingMachine","modelType":"Property"},{"idShort":"Base","valueType":"xs:string","value":"172.16.160.171:1883","modelType":"Property"},{"idShort":"MQTTVersion","valueType":"xs:string","value":"5.0","modelType":"Property"},{"idShort":"SecurityDefinitions","valueType":"xs:string","value":"UsernamePassword","modelType":"Property"}],"modelType":"SubmodelElementCollection"},{"idShort":"InterfacesMetaData","typeValueListElement":"SubmodelElement","value":[{"idShort":"DEL-00","qualifiers":[],"value":[{"idShort":"Topic","valueType":"xs:string","value":"Power1-Events","modelType":"Property"},{"idShort":"AssetsConnectionMethod","valueType":"xs:string","value":"publish","modelType":"Property"},{"idShort":"ContentType","valueType":"xs:string","value":"application/json or stringify/json","modelType":"Property"},{"idShort":"Payload","value":[{"idShort":"Power1","valueType":"xs:string","value":"urn:...:power1","modelType":"Property"},{"idShort":"Timestamp","valueType":"xs:string","value":"urn:...:timestamp","modelType":"Property"}],"modelType":"SubmodelElementCollection"},{"idShort":"EncryptionDefinitions","valueType":"xs:string","modelType":"Property"},{"idShort":"SecurityDefinitions_Necessary?","valueType":"xs:string","modelType":"Property"}],"modelType":"SubmodelElementCollection"},{"idShort":"DEL-01","qualifiers":[],"value":[{"idShort":"Topic","valueType":"xs:string","value":"Power2-Events","modelType":"Property"},{"idShort":"AssetsConnectionMethod","valueType":"xs:string","value":"publish","modelType":"Property"},{"idShort":"ContentType","valueType":"xs:string","value":"application/json or stringify/json","modelType":"Property"},{"idShort":"Payload","value":[{"idShort":"Power2","valueType":"xs:string","value":"urn:...:power2","modelType":"Property"},{"idShort":"Timestamp","valueType":"xs:string","value":"urn:...:timestamp","modelType":"Property"}],"modelType":"SubmodelElementCollection"},{"idShort":"EncryptionDefinitions","valueType":"xs:string","modelType":"Property"},{"idShort":"SecurityDefinitions_Necessary?","valueType":"xs:string","modelType":"Property"}],"modelType":"SubmodelElementCollection"},{"idShort":"DEL-02","qualifiers":[],"value":[{"idShort":"Topic","valueType":"xs:string","value":"OperationMode-Events","modelType":"Property"},{"idShort":"AssetsConnectionMethod","valueType":"xs:string","value":"subscribe","modelType":"Property"},{"idShort":"ContentType","valueType":"xs:string","value":"application/json or stringify/json","modelType":"Property"},{"idShort":"Payload","value":[{"idShort":"OperationMode","valueType":"xs:string","value":"urn:...:operationmode","modelType":"Property"},{"idShort":"Timestamp","valueType":"xs:string","value":"urn:...:timestamp","modelType":"Property"}],"modelType":"SubmodelElementCollection"},{"idShort":"EncryptionDefinitions","valueType":"xs:string","modelType":"Property"},{"idShort":"SecurityDefinitions_Necessary?","valueType":"xs:string","modelType":"Property"}],"modelType":"SubmodelElementCollection"}],"modelType":"SubmodelElementList"}],"modelType":"SubmodelElementCollection"}],"modelType":"SubmodelElementList"}],"modelType":"Submodel"},{"idShort":"AssetInterfacesMappingConfiguration","id":"https://example.com/ids/sm/4342_8060_7032_0872","submodelElements":[{"idShort":"MQTT","typeValueListElement":"SubmodelElement","value":[{"idShort":"DEL-00","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","value":[{"idShort":"DEL-00","value":[{"idShort":"InterfaceMetaDataReference","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":"SubmodelElementList","value":"InterfacesMetaData"},{"type":"SubmodelElementCollection","value":"DEL-00"}]},"modelType":"ReferenceElement"},{"idShort":"Source_Sink_Mappings","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":"SubmodelElementList","value":"InterfacesMetaData"},{"type":"SubmodelElementCollection","value":"DEL-00"},{"type":"SubmodelElementCollection","value":"Payload"},{"type":"Property","value":"Power1"}]},"second":{"type":"ModelReference","keys":[{"type":"Submodel","value":"https://example.com/ids/sm/8055_9060_7032_0793"},{"type":"SubmodelElementCollection","value":"Power1"},{"type":"Property","value":"Value"}]},"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":"SubmodelElementList","value":"InterfacesMetaData"},{"type":"SubmodelElementCollection","value":"DEL-00"},{"type":"SubmodelElementCollection","value":"Payload"},{"type":"Property","value":"Timestamp"}]},"second":{"type":"ModelReference","keys":[{"type":"Submodel","value":"https://example.com/ids/sm/8055_9060_7032_0793"},{"type":"SubmodelElementCollection","value":"Power1"},{"type":"Property","value":"Timestamp"}]},"modelType":"RelationshipElement"}],"modelType":"SubmodelElementList"}],"modelType":"SubmodelElementCollection"},{"idShort":"DEL-01","value":[{"idShort":"InterfaceMetaDataReference","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":"SubmodelElementList","value":"InterfacesMetaData"},{"type":"SubmodelElementCollection","value":"DEL-01"}]},"modelType":"ReferenceElement"},{"idShort":"Source_Sink_Mappings","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":"SubmodelElementList","value":"InterfacesMetaData"},{"type":"SubmodelElementCollection","value":"DEL-01"},{"type":"SubmodelElementCollection","value":"Payload"},{"type":"Property","value":"Power2"}]},"second":{"type":"ModelReference","keys":[{"type":"Submodel","value":"https://example.com/ids/sm/8055_9060_7032_0793"},{"type":"SubmodelElementCollection","value":"Power2"},{"type":"Property","value":"Value"}]},"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":"SubmodelElementList","value":"InterfacesMetaData"},{"type":"SubmodelElementCollection","value":"DEL-01"},{"type":"SubmodelElementCollection","value":"Payload"},{"type":"Property","value":"Timestamp"}]},"second":{"type":"ModelReference","keys":[{"type":"Submodel","value":"https://example.com/ids/sm/8055_9060_7032_0793"},{"type":"SubmodelElementCollection","value":"Power2"},{"type":"Property","value":"Timestamp"}]},"modelType":"RelationshipElement"}],"modelType":"SubmodelElementList"}],"modelType":"SubmodelElementCollection"},{"idShort":"DEL-02","value":[{"idShort":"InterfaceMetaDataReference","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":"SubmodelElementList","value":"InterfacesMetaData"},{"type":"SubmodelElementCollection","value":"DEL-02"}]},"modelType":"ReferenceElement"},{"idShort":"Source_Sink_Mappings","typeValueListElement":"SubmodelElement","value":[{"idShort":"DEL-00","first":{"type":"ModelReference","keys":[{"type":"Submodel","value":"https://example.com/ids/sm/6560_0160_7032_5896"},{"type":"SubmodelElementCollection","value":"OperationMode"},{"type":"Property","value":"Value"}]},"second":{"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":"SubmodelElementList","value":"InterfacesMetaData"},{"type":"SubmodelElementCollection","value":"DEL-02"},{"type":"SubmodelElementCollection","value":"Payload"},{"type":"Property","value":"OperationMode"}]},"modelType":"RelationshipElement"},{"idShort":"DEL-01","first":{"type":"ModelReference","keys":[{"type":"Submodel","value":"https://example.com/ids/sm/6560_0160_7032_5896"},{"type":"SubmodelElementCollection","value":"OperationMode"},{"type":"Property","value":"Timestamp"}]},"second":{"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":"SubmodelElementList","value":"InterfacesMetaData"},{"type":"SubmodelElementCollection","value":"DEL-02"},{"type":"SubmodelElementCollection","value":"Payload"},{"type":"Property","value":"Timestamp"}]},"modelType":"RelationshipElement"}],"modelType":"SubmodelElementList"}],"modelType":"SubmodelElementCollection"}],"modelType":"SubmodelElementList"}],"modelType":"SubmodelElementCollection"}],"modelType":"SubmodelElementList"}],"modelType":"Submodel"},{"idShort":"OperationalData","id":"https://example.com/ids/sm/8055_9060_7032_0793","submodelElements":[{"idShort":"Power1","value":[{"idShort":"Value","valueType":"xs:string","modelType":"Property"},{"idShort":"Timestamp","valueType":"xs:string","modelType":"Property"}],"modelType":"SubmodelElementCollection"},{"idShort":"Power2","value":[{"idShort":"Value","valueType":"xs:string","modelType":"Property"},{"idShort":"Timestamp","valueType":"xs:string","modelType":"Property"}],"modelType":"SubmodelElementCollection"}],"modelType":"Submodel"},{"idShort":"Control","id":"https://example.com/ids/sm/6560_0160_7032_5896","submodelElements":[{"idShort":"OperationMode","value":[{"idShort":"Value","valueType":"xs:string","modelType":"Property"},{"idShort":"Timestamp","valueType":"xs:string","modelType":"Property"}],"modelType":"SubmodelElementCollection"}],"modelType":"Submodel"}],"conceptDescriptions":[]} \ No newline at end of file diff --git a/lib/src/index.ts b/lib/src/index.ts index e69de29..e7516b8 100644 --- a/lib/src/index.ts +++ b/lib/src/index.ts @@ -0,0 +1,23 @@ +import { readFileSync } from "fs"; +import * as aasCore from "@aas-core-works/aas-core3.0-typescript"; + +const aasFile = readFileSync("../AID-AIMC-Full-Example-20230911T1608.json", {encoding: "utf-8"}); +const aasJSON = JSON.parse(aasFile); + +const env = aasCore.jsonization.environmentFromJsonable(aasJSON); + +if (env.error || !env.value || !env.value.assetAdministrationShells || !env.value.submodels) throw new Error("Invalid AAS file"); + +const aas = env.value.assetAdministrationShells[0]; +const submodels = env.value.submodels; + +const aid = submodels[0].submodelElements +if (aid === null) throw new Error("Invalid AAS file"); + +console.log(((aid[0] as aasCore.types.SubmodelElementList).value as aasCore.types.SubmodelElementCollection[])[0]) + +/* +for (const something of aas.descend()) { + console.log(something); + console.log("---------------------------------------"); +}*/