Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [basyx-dev] BaSyx minimal server example

Dear Nicolas,

> I don't understand how this registry API is used.
> Because in the case of the org.eclipse.basyx.examples.scenarios.device.RunSimpleTCPDevice, it uses a SQL-based registry but don't use those API calls, 
> rather a more simple IAASRegistryService register call.
> This is consistent with the other examples I found that uses either local or SQL-based registry, and seem to only use register/lookUp calls.
> I am deploying the registry and/or using it wrong?

There's an implementation of IAASRegistryService in the SDK in org.eclipse.basyx.aas.registration.proxy.AASRegistryProxy that implements these calls.
Thus, if you have a SQL registry deployed somewhere, you can configure the RegistryProxy to point to this location and let it handle all the REST calls. Nevertheless, you can also use the "raw" calls.


> Another question, once the registry is set up and populated correctly, what is the correct way to read/write data using it?
> The org.eclipse.basyx.examples.scenarios.device.RunSimpleTCPDevice example uses VABElementProxy and calls setModelPropertyValue or getModelPropertyValue. Is ith the best way?
> Or should I retrieve submodels as I am currently doing (ConnectedAssetAdministrationShell with retrieve call) and browse through the submodels/data elements?

There are multiple ways of interacting with the registry and AAS. Using the VABElementProxy is the "raw" way of doing this while the Connected* classes provide you with an abstraction so you don't have to care about what is happening in the background. As a guideline, if you just want to access data from AAS meta-model, our Connected* classes work just fine. If you want to do something that is not supported by the meta-model, you need to use the VABElementProxy.


> In this case, how do I overwrite data elements or add new ones?

You mean overwrite as in create a new sub class of e.g. a Property? While this is possible, you will lose conformity to the AAS meta-model if you do this. You can extend org.eclipse.basyx.submodel.metamodel.map.submodelelement.property.AbstractProperty in the SDK to do this.
Adding new dataElements to a sub model is shown in e.g. org.eclipse.basyx.testsuite.regression.submodel.restapi.SimpleAASSubmodel in the SDK.


> On the same note, I am able to retrieve submodels using ConnectedAssetAdministrationShellManager with the retrieveSubModel call.
> I can also look at its data elements, using ISubModel getDataElements call, but I can't get the values without assuming they are single properties.
> Is there a way to know the structure of a data element, or perhaps data elements with complex structures are not implemented yet?

There's the method getPropertyType() provided by IProperty that tells you which kind of property you are looking at. Nevertheless, a type cast will be necessary after determining the specific variant of the property. For data elements with complex structures, see the org.eclipse.basyx.submodel.metamodel.map.submodelelement.property.ContainerProperty. Please note, that this is an extension of the AAS meta-model that may not be supported by future iterations of the standard.


> Another question, I am able to create AAS and submodels, but I need to have created the AASServlet to deploy them beforehand.
> What is the correct way to deploy multiple AAS on a single already existant AAS server?
> What is the correct way to deploy new AAS each on their specific server? (just adding more apache server with a single AASServlet?)

Your server needs to be prepared in a way so that it is able to handle multiple AAS. This can be done by e.g. using the MultiAASProvider that multiplexes calls to different AAS. For its usage, please refer to its regression test. Another way of doing this is to deploy multiple empty servlets, that then can be filled dynamically at runtime.


> Again thank you for the support you already provided me, I won't have been able to progress that much without you.
I'm always happy to help!

Best regards,
Frank

----------------------------------------------------------------------------------
M.Sc. Frank Schnicke
Abteilung ESW
Fraunhofer IESE 
Fraunhofer-Platz 1 | 67663 Kaiserslautern 
Tel: +49 631 / 6800-2259 | Fax: +49 631 / 6800-9-2259
www.iese.fraunhofer.de 
Mail: frank.schnicke@xxxxxxxxxxxxxxxxxx


-----Ursprüngliche Nachricht-----
Von: basyx-dev-bounces@xxxxxxxxxxx <basyx-dev-bounces@xxxxxxxxxxx> Im Auftrag von Nicolas DUMINY
Gesendet: Mittwoch, 20. November 2019 17:28
An: basyx-dev <basyx-dev@xxxxxxxxxxx>
Betreff: Re: [basyx-dev] BaSyx minimal server example

Dear BaSyx development team,

I don't understand how this registry API is used.
Because in the case of the org.eclipse.basyx.examples.scenarios.device.RunSimpleTCPDevice, it uses a SQL-based registry but don't use those API calls, rather a more simple IAASRegistryService register call.
This is consistent with the other examples I found that uses either local or SQL-based registry, and seem to only use register/lookUp calls.
I am deploying the registry and/or using it wrong?

Another question, once the registry is set up and populated correctly, what is the correct way to read/write data using it?
The org.eclipse.basyx.examples.scenarios.device.RunSimpleTCPDevice example uses VABElementProxy and calls setModelPropertyValue or getModelPropertyValue. Is ith the best way?
Or should I retrieve submodels as I am currently doing (ConnectedAssetAdministrationShell with retrieve call) and browse through the submodels/data elements?
In this case, how do I overwrite data elements or add new ones?

On the same note, I am able to retrieve submodels using ConnectedAssetAdministrationShellManager with the retrieveSubModel call.
I can also look at its data elements, using ISubModel getDataElements call, but I can't get the values without assuming they are single properties.
Is there a way to know the structure of a data element, or perhaps data elements with complex structures are not implemented yet?

Another question, I am able to create AAS and submodels, but I need to have created the AASServlet to deploy them beforehand.
What is the correct way to deploy multiple AAS on a single already existant AAS server?
What is the correct way to deploy new AAS each on their specific server? (just adding more apache server with a single AASServlet?)


Again thank you for the support you already provided me, I won't have been able to progress that much without you.

Best regards,


Nicolas Duminy

----- Mail original -----
De: "Frank Schnicke" <Frank.Schnicke@xxxxxxxxxxxxxxxxxx>
À: "basyx-dev" <basyx-dev@xxxxxxxxxxx>
Envoyé: Mercredi 20 Novembre 2019 09:32:03
Objet: Re: [basyx-dev] BaSyx minimal server example

Dear Nicolas,

I'm happy to hear that this issue is now resolved.

> Can you explain to me how this navigation through AAS/submodels for reading/writing must or should be conducted?

For retrieving all AAS, there's an explicit API call in the registry API (https://wiki.eclipse.org/BaSyx_/_Documentation_/_API_/_Registry): 
HTTP-GET on ${authority}/api/v1/registry will return you a full list of all registered AAS in form of their AASDescriptors.

These AAS descriptors contain all ids and endpoints of the registered AAS. Additionally, they contain the submodel descriptors which again contain their ids and endpoints.
It is also possible to retrieve all submodels from an AAS with the following API call (https://wiki.eclipse.org/BaSyx_/_Documentation_/_API_/_AssetAdministrationShell):
HTTP-GET on ${authority}/aas/submodels will return a list of all submodels of the specific AAS.

In a similar way, you can retrieve all properties and operations with the following API calls (https://wiki.eclipse.org/BaSyx_/_Documentation_/_API_/_Submodel):
HTTP-GET on ${authority}/submodel/dataElements
HTTP-GET on ${authority}/submodel/operations ${authority} is here the location where the submodel is hosted.

Best regards,
Frank

----------------------------------------------------------------------------------
M.Sc. Frank Schnicke
Abteilung ESW
Fraunhofer IESE
Fraunhofer-Platz 1 | 67663 Kaiserslautern
Tel: +49 631 / 6800-2259 | Fax: +49 631 / 6800-9-2259 www.iese.fraunhofer.de
Mail: frank.schnicke@xxxxxxxxxxxxxxxxxx

-----Ursprüngliche Nachricht-----
Von: basyx-dev-bounces@xxxxxxxxxxx <basyx-dev-bounces@xxxxxxxxxxx> Im Auftrag von Nicolas DUMINY
Gesendet: Dienstag, 19. November 2019 17:52
An: basyx-dev <basyx-dev@xxxxxxxxxxx>
Betreff: Re: [basyx-dev] BaSyx minimal server example

Dear BaSyx development team,

This was true, I used an older version of BaSyx (1 month old), and after updating it, I don't have problems with test classes that should be main ones any more.

However, I have questions regarding how to automatically navigate through deployed AAS.
In the examples, the AAS ids, submodel ids and properties paths and ids are always known in advance and used as such.
I wonder, how a device, such as a AAS/submodels dashboard, could automatically detect every AAS connected and their structure (submodels, properties) without such prior knowledge.
Such dashboard would need to read these structures dynamically, but other devices could need to write in these too.
I'm looking at a generic case, where the registry is a SQL based-one, and the AAS/submodels can be either self-hosted or deployed on a AAS central repository (not known beforehand).

Can you explain to me how this navigation through AAS/submodels for reading/writing must or should be conducted?

Best regards,


Nicolas Duminy

----- Mail original -----
De: "Frank Schnicke" <Frank.Schnicke@xxxxxxxxxxxxxxxxxx>
À: "basyx-dev" <basyx-dev@xxxxxxxxxxx>
Envoyé: Jeudi 14 Novembre 2019 14:45:09
Objet: Re: [basyx-dev] BaSyx minimal server example

Dear Nicolas,

> But I'm stuck at the moment, as I don't know how to avoid the 
> org.eclipse.basyx.examples.contexts.BaSyxExamplesContext_1MemoryAASServer_1SQLDirectory class to create the network infrastructure for handling the AAS server and the registry or even avoiding org.eclipse.basyx.testsuite.support.backend.servers.BaSyxContext.
> Isn't there any other way (simpler way) to create the basic network infrastructure, than to use those test classes?

Is it possible that you are running an older version of the SDK? BaSyxContext is not located any more within the test suite. It currently resides in org.eclipse.basyx.vab.protocol.http.server within the SDK. Thus, you can easily use or extend it without the need to rely on test code.

Best regards,
Frank

----------------------------------------------------------------------------------
M.Sc. Frank Schnicke
Abteilung ESW
Fraunhofer IESE
Fraunhofer-Platz 1 | 67663 Kaiserslautern
Tel: +49 631 / 6800-2259 | Fax: +49 631 / 6800-9-2259 www.iese.fraunhofer.de
Mail: frank.schnicke@xxxxxxxxxxxxxxxxxx


-----Ursprüngliche Nachricht-----
Von: basyx-dev-bounces@xxxxxxxxxxx <basyx-dev-bounces@xxxxxxxxxxx> Im Auftrag von Nicolas DUMINY
Gesendet: Mittwoch, 13. November 2019 19:02
An: basyx-dev <basyx-dev@xxxxxxxxxxx>
Betreff: [basyx-dev] BaSyx minimal server example

Dear BaSyx development team,

I'm having great difficulty to create a simple and minimal example that uses BaSyx with a simple asset (only contains a status that can change).
Indeed, I just don't know what classes to use.
Are some classes in the test source folders core functionalities (sdk/test, or components/test)?

I would simply like to have AAS deployed on a server, with a registry that show how to access it, special components that integrate my legacy devices into BaSyx (updating AAS submodels when device status changes).
I want to mimic the org.eclipse.basyx.examples.scenarios.device.RunSimpleTCPDevice test, but without TCP connection to the device.
So I'm trying to create a subclass of org.eclipse.basyx.components.devicemanager.DeviceManagerComponent that will handle the integration of my devices to BaSyx.
And I want to be sure that my implementation uses as few functionalities as possible, and no test-specific classes.

But I'm stuck at the moment, as I don't know how to avoid the org.eclipse.basyx.examples.contexts.BaSyxExamplesContext_1MemoryAASServer_1SQLDirectory class to create the network infrastructure for handling the AAS server and the registry or even avoiding org.eclipse.basyx.testsuite.support.backend.servers.BaSyxContext.
Isn't there any other way (simpler way) to create the basic network infrastructure, than to use those test classes?


Best regards,


Nicolas Duminy
_______________________________________________
basyx-dev mailing list
basyx-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/basyx-dev
_______________________________________________
basyx-dev mailing list
basyx-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/basyx-dev
_______________________________________________
basyx-dev mailing list
basyx-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/basyx-dev
_______________________________________________
basyx-dev mailing list
basyx-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/basyx-dev
_______________________________________________
basyx-dev mailing list
basyx-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/basyx-dev

Back to the top