Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [basyx-dev] Operations & ControlComponent integrations

Dear Nicolas,

> Is it a known bug? How could I make the operations work?
Operations (i.e. functions) are not trivially serializable. In Java this is possible by using the byte code of the function. However, this would imply that the server is also running Java. In general, the client/server structure should be agnostic of the respective used programming languages. Thus, there's no easy way of sending functions besides e.g. sending the source code and compiling/interpreting it on server side. Nevertheless, what the function can do is/should be still heavily restricted due to loosing local scope and security issues.
Maybe there will be in future support for scripting languages but for now this is not within the scope of BaSyx. In consequence, if a submodel should contain a function, for now it has to be there at deployment time. 


> In org.eclipse.basyx.examples.scenarios.device.controllable.RunExampleSimpleControllableTCPDevice example, the control component only puts the address of its TCP server as the endpoint of an empty submodel "ControlComponent".
> I am speculating as the example don't access at all the control component via its AAS, but regarding controlling the device, is this AAS only here to host the address of the TCP server? So the AAS is only used to store the status information of the device and is to be bypassed when controlling the device?
> If I wanted to control the device via its AAS (encapsulating the control component as a submodel for instance), how should I do?
> Is it a normal use of BaSyx or am I missing something?
Control Components are a concept that is not included in the standard of the AAS. Thus, control components need to be wrapped by AAS properties and operations. Currently this wrapping code needs to be generated by hand. In future, we are planning on providing a factory creating a submodel from a control component. It is also possible, as pointed out by you, to use the AAS to host the address. However, this is then not conforming to the standards provided by the Plattform Industrie 4.0 (the entity standardizing the AAS and surrounding concepts).

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: Donnerstag, 5. Dezember 2019 14:49
An: basyx-dev <basyx-dev@xxxxxxxxxxx>
Betreff: [basyx-dev] Operations & ControlComponent integrations

Dear BaSyx development team,

I have been trying to deploy operations on administration shells submodels with no success.
(1) It appears that if the submodel (with operations) is deployed after the servlet was created, the attempts to invoke an operation always return null.
(2) Whereas, it works perfectly if the submodel is deployed at the same time that the servlet is created.
Below the differences in the test implementations for both cases:

(1) BaSyxContext context = new BaSyxContext("/basys.examples", "").
				// Deploy example specific servlets to Tomcat server in this context
				addServletMapping("/Testsuite/components/BaSys/1.0/SampleModel/*",  new SubmodelServlet(new SampleSubModel()));

(2) BaSyxContext context = new BaSyxContext("/basys.examples", "").
				// Deploy example specific servlets to Tomcat server in this context
				addServletMapping("/Testsuite/components/BaSys/1.0/SampleModel/*",  new SubmodelServlet());
    VABConnectionManager vabm = new VABConnectionManager(new AASRegistryProxy("http://localhost:8080/basys.ddpaas/Components/Directory/SQL";), new HTTPConnectorProvider());  // Registry not used
    VABElementProxy vabProxy = vabm.connectToVABElementByPath("http://localhost:8080/basys.examples/Testsuite/components/BaSys/1.0/SampleModel/";); // Endpoint corresponds to submodel servlet (checked already)
    vabProxy.createValue("", new SampleSubModel());

The SampleSubModel is the same as the one used in this snippet: org.eclipse.basyx.examples.snippets.aas.submodels.InvokeSubModelOperationSDK.
The tests performed are also the same than in org.eclipse.basyx.examples.snippets.aas.submodels.InvokeSubModelOperationSDK.

I also tried to invoke operations using the VAB crude calls but I encounter the same problem, the operations return null everytime if the submodel was deployed after the servlet's creation.

Is it a known bug? How could I make the operations work?


Another question: how best to integrate control components into an Administrative Shell?
In org.eclipse.basyx.examples.scenarios.device.controllable.RunExampleSimpleControllableTCPDevice example, the control component only puts the address of its TCP server as the endpoint of an empty submodel "ControlComponent".
I am speculating as the example don't access at all the control component via its AAS, but regarding controlling the device, is this AAS only here to host the address of the TCP server? So the AAS is only used to store the status information of the device and is to be bypassed when controlling the device?

If I wanted to control the device via its AAS (encapsulating the control component as a submodel for instance), how should I do?
Is it a normal use of BaSyx or am I missing something?


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


Back to the top