Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[basyx-dev] R: Basyx Component- Info
  • From: Francesco Lo Piccolo <Francesco.LoPiccolo@xxxxxx>
  • Date: Wed, 9 Oct 2019 08:30:12 +0000
  • Accept-language: it-IT, en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=eng.it; dmarc=pass action=none header.from=eng.it; dkim=pass header.d=eng.it; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=0gyEyn0MWH7MQCZaIAFJxhljZBrcbRRSDKBwHm2tzLk=; b=mszxLA5GwyvdKWQU21Jj6R0jTGmtEJ1Qas+CFfyRo1gSUZWIVccwbX/w177wurgLRnRIoD//GSh6WPf+BoN89FJseN9vr88R+Zdhp2k4AmsXT6/y4hZrq4pVl5w15NuDJ42kcSK5158qGnR1y/N5a6erGWWvSddL3yUEj1g0HTLLMUew3wWEK7crq92f9DSYhvSfYCtbp8TyAIHruqDdbtX/vDG9yrJH6NMpVoqsTdZb+0ztcNQEb5bSXGaT+zdWgWbdEb6wTbvFoyr7jniscq+BJ0g8LJyAeipS/jfbBmUBYP4+5tFSkDfOECFtU3B6oFWkC69/9KL1KGi7qE5Nqw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cONTejcYjsLOH/gPi3qmOxVc76TY57cjNxducvp/xLpb/+pLkIYeAzUbEJVAnUlBCdM86DbL5xrjXQzxtGZ6ZH70HbFtsUyg3dlcz5AiUkCiPieqpBS6zvLntPdvg92fFUxvuabMnPb4qyMNW/enp/FUey3d4AqCm1J4LWDKyq1knb7OXlUZH9M0WBRLSvAqTwrf5Z46yNStb6pPE2IaqyfRMhWmKU3keqo2RcZ9lT5QdgeEWjhibf3j65PMLzEVYIoubQEMIvztC/8cbstCK6/BAazVhyKOpe0B+ylz6PZU6ogQP0FdrpuT2ibEqQlCbGQeGVhFkTYgQSnZLMIQKg==
  • Delivered-to: basyx-dev@xxxxxxxxxxx
  • List-archive: <https://www.eclipse.org/mailman/private/basyx-dev>
  • List-help: <mailto:basyx-dev-request@eclipse.org?subject=help>
  • List-subscribe: <https://www.eclipse.org/mailman/listinfo/basyx-dev>, <mailto:basyx-dev-request@eclipse.org?subject=subscribe>
  • List-unsubscribe: <https://www.eclipse.org/mailman/options/basyx-dev>, <mailto:basyx-dev-request@eclipse.org?subject=unsubscribe>
  • Thread-index: AQH5TvFQhNhym4zb2hX7I9Ua382Lf6cKRv7w
  • Thread-topic: [basyx-dev] Basyx Component- Info

Dear Daniel,

thank you for your reply. I’m getting a little confused since the structure of the examples you provided me(the  createAAS.json file is create using the “org.eclipse.basyx.examples.snippets.aas.CreateAAS::createAAS”), don't match  the structure of my output(AASModel-json.txt), obtained transforming the xml example(detail.xml) found under "org.eclipse.basyx.testsuite.regression.vab.provider.xml.transformers.tests.TransformXMLtags"

 

Can you clarify to me why the structure of the two files is so different? Could you suggest me any example that can produce the same output as mine? Thanks for your time.

Best regards,

Francesco

Da: basyx-dev-bounces@xxxxxxxxxxx [mailto:basyx-dev-bounces@xxxxxxxxxxx] Per conto di Daniel.Espen@xxxxxxxxxxxxxxxxxx
Inviato: Tuesday, October 1, 2019 10:42 AM
A: basyx-dev@xxxxxxxxxxx
Oggetto: Re: [basyx-dev] Basyx Component- Info

 

Dear Francesco,

 

currently, there is no example for excplicitely writing the JSON serialization of the AAS to a file in the Java SDK. The entry in the database is generated by the SQLDirectoryProvider and only contains the Descriptor of the AAS for the registry without the actual AAS and submodels.

 

You can get the content of the serialization from the log, still. Moreover, it is possible to “manually” serialize a created or received

model using the GSONTools. In the following, you can see a short snippet that can be used to write the serialized submodel to a file by modifying the Test snippet at

basyx.examples/src/test/java - org.eclipse.basyx.examples.snippets.aas.submodels.ConnectToAASSubModelVAB::accessSubModel():

 

       Map<String, Object> submodel = (Map<String, Object>) connSubModel1.getModelPropertyValue("/");

       GSONTools serializer = new GSONTools(new DefaultTypeFactory());

       String serializedSubmodel = serializer.serialize(submodel);

       System.out.println("----------------");

       System.out.println("Serialized: " + serializedSubmodel);

       System.out.println("----------------");

       FileWriter fw = new FileWriter("submodelExample.json");

       fw.write(serializedSubmodel);

       fw.close();

 

The same snippet can be used for other examples, e.g. by serializing a local AAS created in the Test snippet at

basyx.examples/src/test/java - org.eclipse.basyx.examples.snippets.aas.CreateAAS::createAAS():

 

String serializedAAS = serializer.serialize(aas);

 

Note, that these examples do not include a full AAS or submodel, because they are meant to demonstrate how the SDK works and not to show the structure of the standardized models. Also, the SDK is still work in progress, so the interfaces and the serialization will change.

You can find more information about this in the standard document for the AAS:

https://www.zvei.org/en/press-media/publications/details-of-the-asset-administration-shell/

 

Best regards,

Daniel Espen

 

--

Espen, Daniel

Engineer Embedded Software Engineering

Fraunhofer IESE

Fraunhofer-Platz 1 | 67663 Kaiserslautern

Tel: +49 631 / 6800-2131 | Fax: +49 631 / 6800-9 2131

www.iese.fraunhofer.de

Mail: Daniel.Espen@xxxxxxxxxxxxxxxxxx

 

 

 

 

From: basyx-dev-bounces@xxxxxxxxxxx <basyx-dev-bounces@xxxxxxxxxxx> On Behalf Of Francesco Lo Piccolo
Sent: Dienstag, 24. September 2019 17:26
To:
basyx-dev@xxxxxxxxxxx
Subject: [basyx-dev] Basyx Component- Info

 

Hi to all basyx development team,

My name is Francesco Lo Piccolo and I work FOR Engineering Ingegneria Informatica R&D department.

I'm currently trying to integrate the Basyx component THAT I'VE JUST compiled according to the info provided at https://wiki.eclipse.org/BaSyx:BaSyx.Documentation.SDK.Java.Build .

 

Now, I'm trying to run the various examples in the Sdk, Examples, and Component components but unfortunately I haven't been able so far to produce an AAS file with data.

For example, I used the RunAASDevice example (basyx.examples component), which writes an AAS file to the postgres database. This AAS file has 3 submodels, but they are empty AND I haven't found any example data.

Maybe I'm wrong to use the RunAASDevice example (basyx.examples components) or other examples. Could you suggest me an Example with which to be able to produce an AAS file HAVING at least one submodel and some data ?

I attach the empty AAS file obtained

Looking forward to your feedback.

 

Best Regards

 

 

Francesco Lo Piccolo

Research & Development Lab

Research & Innovation Division

francesco.lopiccolo@xxxxxx

 

Engineering Ingegneria Informatica spa

Viale Regione Siciliana, 7275 - 90146 Palermo

Tel. 091 - 7511873

Cell. 3297405169

Skype: f_lopic

www.eng.it

 

{
	"assets": [{
		"identification": {
			"idType": "URI",
			"id": "http://pk.festo.com/3s7plfdrs35";
		},
		"idShort": "3s7plfdrs35",
		"hasDataSpecification": [],
		"kind": "Instance",
		"administration": {
			"version": "",
			"hasDataSpecification": [],
			"revision": ""
		},
		"description": "Festo Controller",
		"language": "EN",
		"text": "Festo Controller",
		"category": ""
	}],
	"conceptDescriptions": [{
		"identification": {
			"idType": "IRDI",
			"id": "0173-1#02-BAA120#007"
		},
		"idShort": "",
		"hasDataSpecification": [{
			"keys": [{
				"idType": "URI",
				"type": "GlobalReference",
				"value": "www.admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360",
				"local": false
			}]
		}],
		"administration": {
			"version": "",
			"hasDataSpecification": [],
			"revision": ""
		},
		"isCaseOf": [],
		"description": "",
		"category": ""
	}, {
		"identification": {
			"idType": "URI",
			"id": "www.festo.com/dic/08111234"
		},
		"idShort": "",
		"hasDataSpecification": [{
			"keys": [{
				"idType": "URI",
				"type": "GlobalReference",
				"value": "www.admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360",
				"local": false
			}]
		}],
		"administration": {
			"version": "",
			"hasDataSpecification": [],
			"revision": ""
		},
		"isCaseOf": [],
		"description": "",
		"category": ""
	}],
	"id": "provaflp",
	"type": "provaflp2",
	"assetAdministrationShells": [{
		"conceptDictionary": [{
			"description": [{
				"language": "",
				"text": ""
			}],
			"idShort": "SampleDic",
			"category": "",
			"conceptDescription": [{
				"keys": [{
					"idType": "URI",
					"type": "ConceptDescription",
					"value": "www.festo.com/dic/08111234",
					"local": true
				}]
			}, {
				"keys": [{
					"idType": "IRDI",
					"type": "ConceptDescription",
					"value": "0173-1#02-BAA120#007",
					"local": true
				}]
			}]
		}],
		"identification": {
			"idType": "URI",
			"id": "www.admin-shell.io/aas-sample/1/0"
		},
		"idShort": "",
		"administration": {
			"version": "1",
			"hasDataSpecification": [],
			"revision": "0"
		},
		"hasDataSpecification": [],
		"submodel": [],
		"description": "",
		"category": "",
		"views": [{
			"description": [{
				"language": "",
				"text": ""
			}],
			"idShort": "SampleView",
			"category": "",
			"containedElement": [{
				"keys": [{
					"idType": "URI",
					"type": "Submodel",
					"value": "http://www.zvei.de/demo/submodel/12345679";,
					"local": true
				}, {
					"idType": "idShort",
					"type": "Property",
					"value": "rotationSpeed",
					"local": true
				}]
			}],
			"hasDataSpecification": []
		}],
		"submodels": []
	}],
	"submodels": [{
		"semanticId": {
			"keys": [{
				"idType": "URI",
				"type": "Submodel",
				"value": "http://www.zvei.de/demo/submodelDefinitions/87654346";,
				"local": false
			}]
		},
		"identification": {
			"idType": "URI",
			"id": "http://www.zvei.de/demo/submodel/12345679";
		},
		"operations": {},
		"idShort": "",
		"administration": {
			"version": "",
			"hasDataSpecification": [],
			"revision": ""
		},
		"hasDataSpecification": [],
		"kind": "Instance",
		"description": "",
		"category": "",
		"dataElements": {
			"rotationSpeed": {
				"semanticId": {
					"semanticId": {
						"keys": [{
							"idType": "URI",
							"type": "ConceptDescription",
							"value": "www.festo.com/dic/08111234",
							"local": true
						}]
					}
				},
				"idShort": "rotationSpeed",
				"hasDataSpecification": [],
				"valueType": {
					"dataObjectType": {
						"name": "string"
					}
				},
				"description": [{
					"language": "",
					"text": ""
				}],
				"category": "VARIABLE",
				"value": "2000"
			},
			"NMAX": {
				"semanticId": {
					"semanticId": {
						"keys": [{
							"idType": "IRDI",
							"type": "GlobalReference",
							"value": "0173-1#02-BAA120#007",
							"local": true
						}]
					}
				},
				"idShort": "NMAX",
				"hasDataSpecification": [],
				"valueType": {
					"dataObjectType": {
						"name": "string"
					}
				},
				"description": [{
					"language": "",
					"text": ""
				}],
				"category": "PARAMETER",
				"value": "2000"
			}
		},
		"submodelElement": {
			"rotationSpeed": {
				"semanticId": {
					"semanticId": {
						"keys": [{
							"idType": "URI",
							"type": "ConceptDescription",
							"value": "www.festo.com/dic/08111234",
							"local": true
						}]
					}
				},
				"idShort": "rotationSpeed",
				"hasDataSpecification": [],
				"valueType": {
					"dataObjectType": {
						"name": "string"
					}
				},
				"description": [{
					"language": "",
					"text": ""
				}],
				"category": "VARIABLE",
				"value": "2000"
			},
			"NMAX": {
				"semanticId": {
					"semanticId": {
						"keys": [{
							"idType": "IRDI",
							"type": "GlobalReference",
							"value": "0173-1#02-BAA120#007",
							"local": true
						}]
					}
				},
				"idShort": "NMAX",
				"hasDataSpecification": [],
				"valueType": {
					"dataObjectType": {
						"name": "string"
					}
				},
				"description": [{
					"language": "",
					"text": ""
				}],
				"category": "PARAMETER",
				"value": "2000"
			}
		}
	}]
}
<?xml version="1.0" encoding="UTF-8"?>
<aas:aasenv
    xmlns:aas="http://www.admin-shell.io/aas/1/0";
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
    xmlns:IEC="http://www.admin-shell.io/IEC61360/1/0"; xsi:schemaLocation="http://www.admin-shell.io/aas/1/0 AAS.xsd http://www.admin-shell.io/IEC61360/1/0 IEC61360.xsd ">
    <aas:assetAdministrationShells>
        <aas:assetAdministrationShell>
            <aas:identification idType="URI">www.admin-shell.io/aas-sample/1/0</aas:identification>
            <aas:administration>
                <aas:version>1</aas:version>
                <aas:revision>0</aas:revision>
            </aas:administration>
            <aas:assetRef>
                <aas:keys>
                    <aas:key type="Asset" local="false" idType="URI">http://pk.festo.com/3s7plfdrs35</aas:key>
                </aas:keys>
            </aas:assetRef>
            <aas:submodelRefs>
                <aas:submodelRef>
                    <aas:keys>
                        <aas:key type="Submodel" local="true" idType="URI">"http://www.zvei.de/demo/submodel/12345679";</aas:key>
                    </aas:keys>
                </aas:submodelRef>
            </aas:submodelRefs>
            <aas:views>
                <aas:view>
                    <aas:idShort>SampleView</aas:idShort>
                    <aas:containedElements>
                        <aas:containedElementRef>
                            <aas:keys>
                                <aas:key type="Submodel" local="true" idType="URI">"http://www.zvei.de/demo/submodel/12345679";</aas:key>
                                <aas:key type="Property" local="true" idType="idShort">rotationSpeed</aas:key>
                            </aas:keys>
                        </aas:containedElementRef>
                    </aas:containedElements>
                </aas:view>
            </aas:views>
            <aas:conceptDictionaries>
                <aas:conceptDictionary>
                    <aas:idShort>SampleDic</aas:idShort>
                    <aas:conceptDescriptionRefs>
                        <aas:conceptDescriptionRef>
                            <aas:keys>
                                <aas:key type="ConceptDescription" local="true" idType="URI">www.festo.com/dic/08111234</aas:key>
                            </aas:keys>
                        </aas:conceptDescriptionRef>
                        <aas:conceptDescriptionRef>
                            <aas:keys>
                                <aas:key type="ConceptDescription" local="true" idType="IRDI">0173-1#02-BAA120#007</aas:key>
                            </aas:keys>
                        </aas:conceptDescriptionRef>
                    </aas:conceptDescriptionRefs>
                </aas:conceptDictionary>
            </aas:conceptDictionaries>
        </aas:assetAdministrationShell>
    </aas:assetAdministrationShells>
    <aas:assets>
        <aas:asset>
            <aas:idShort>3s7plfdrs35</aas:idShort>
            <aas:description>
                <aas:langString lang="EN">Festo Controller</aas:langString>
            </aas:description>
            <aas:identification idType="URI">http://pk.festo.com/3s7plfdrs35</aas:identification>
            <aas:kind>Instance</aas:kind>
        </aas:asset>
    </aas:assets>
    <aas:submodels>
        <aas:submodel>
            <aas:identification idType="URI">http://www.zvei.de/demo/submodel/12345679</aas:identification>
            <aas:semanticId >
                <aas:keys>
                    <aas:key idType="URI" local="false" type="Submodel">http://www.zvei.de/demo/submodelDefinitions/87654346</aas:key>
                </aas:keys>
            </aas:semanticId>
            <aas:kind>Instance</aas:kind>
            <aas:submodelElements>
                <aas:submodelElement>
                    <aas:property>
                        <aas:idShort>rotationSpeed</aas:idShort>
                        <aas:category>VARIABLE</aas:category>
                        <aas:semanticId>
                            <aas:keys>
                                <aas:key idType="URI" type="ConceptDescription" local="true">www.festo.com/dic/08111234</aas:key>
                            </aas:keys>
                        </aas:semanticId>
                        <aas:valueType>double</aas:valueType>
						<aas:value>2000</aas:value>
                    </aas:property>
                </aas:submodelElement>
                <aas:submodelElement>
                    <aas:property>
                        <aas:idShort>NMAX</aas:idShort>
                        <aas:category>PARAMETER</aas:category>
                        <aas:semanticId>
                            <aas:keys>
                                <aas:key idType="IRDI" type="GlobalReference" local="true">0173-1#02-BAA120#007</aas:key>
                            </aas:keys>
                        </aas:semanticId>
                        <aas:valueType>double</aas:valueType>
                        <aas:value>2000</aas:value>
                    </aas:property>
                </aas:submodelElement>
            </aas:submodelElements>
        </aas:submodel>
    </aas:submodels>
    <aas:conceptDescriptions>
        <aas:conceptDescription>
            <aas:identification idType="URI">www.festo.com/dic/08111234</aas:identification>
            <aas:embeddedDataSpecification>
                <aas:hasDataSpecification>
                    <aas:keys>
                        <aas:key idType="URI" local="false" type="GlobalReference">www.admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360</aas:key>
                    </aas:keys>
                </aas:hasDataSpecification>
                <aas:dataSpecificationContent>
                    <aas:dataSpecificationIEC61360>
                        <IEC:preferredName>
                            <aas:langString lang="DE">Drehzahl</aas:langString>
                            <aas:langString lang="EN">Rotation Speed</aas:langString>
                        </IEC:preferredName>
                        <IEC:shortName>N</IEC:shortName>
                        <IEC:unitId>
                            <aas:keys>
                                <aas:key local="false" type="GlobalReference" idType="IRDI">0173-1#05-AAA650#002</aas:key>
                            </aas:keys>
                        </IEC:unitId>
                        <IEC:valueFormat>NR1..5</IEC:valueFormat>
                    </aas:dataSpecificationIEC61360>
                </aas:dataSpecificationContent>
            </aas:embeddedDataSpecification>
        </aas:conceptDescription>
        <aas:conceptDescription>
            <aas:identification idType="IRDI">0173-1#02-BAA120#007</aas:identification>
            <aas:embeddedDataSpecification>
                <aas:hasDataSpecification>
                    <aas:keys>
                        <aas:key idType="URI" type="GlobalReference" local="false">www.admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360</aas:key>
                    </aas:keys>
                </aas:hasDataSpecification>
                <aas:dataSpecificationContent>
                    <aas:dataSpecificationIEC61360>
                        <IEC:preferredName>
                            <aas:langString lang="DE">maximale Drehzahl</aas:langString>
                            <aas:langString lang="EN">max rotation speed</aas:langString>
                        </IEC:preferredName>
                        <IEC:shortName>NMax</IEC:shortName>
                        <IEC:unitId>
                            <aas:keys>
                                <aas:key type="GlobalReference" idType="IRDI" local="false">0173-1#05-AAA650#002</aas:key>
                            </aas:keys>
                        </IEC:unitId>
                        <IEC:valueFormat>NR1..5</IEC:valueFormat>
                    </aas:dataSpecificationIEC61360>
                </aas:dataSpecificationContent>
            </aas:embeddedDataSpecification>
        </aas:conceptDescription>
    </aas:conceptDescriptions>
</aas:aasenv>

Attachment: createAAS.json
Description: createAAS.json


Back to the top