eclipse-aaspe / server

C# based server for AASX packages
Other
70 stars 52 forks source link

How to run custom code with Submodel Element Operation #156

Open vChavezB opened 1 year ago

vChavezB commented 1 year ago

From the swagger api I noticed this:

grafik

I was wondering how can I attach hooks or callbacks on the server so I can call my custom code so it executes an operation related to the PUT request (see screenshot above).

juileetikekar commented 1 year ago

Hi @vChavezB ,

Thank you for your question.

Could you please provide us more information on your custome code, as below:

  1. Does your custom code reside the the same AasxServer?
  2. If not (1), then is it running as a part of external application?
vChavezB commented 1 year ago

Does your custom code reside the the same AasxServer?

  1. This is one possibility. My goal is to recieve the AAS operation request (in the same host machine where the server is running) and reply to the AAS server with the outputVariable described in 5.7.7.10 Operation Attributes of the spec. v3.

If not (1), then is it running as a part of external application?

  1. This is the other possibility. I could have a PLC that should recieve the request via OPC UA for example and process the operation. However, I think if I can have a hook or callback in the same host machine of the server I could implement my business logic and interact with other applications such as a PLC, microcontroller,etc. (which represent the actual asset).

Another question, is the invokation of the Operation Submodel element available in the OPC UA and MQTT interface?

Best regards Victor

vChavezB commented 1 year ago

Has there been any update on the topic?

aorzelskiGH commented 1 year ago

Currently there is no interface to plugin for this. You need to use the source code and create your own custom solution plugging into the request.

vChavezB commented 9 months ago

Thanks for the feedback. Just wanted to mention that this might be a relevant enhancement to the project.

Reason is that part of the idea of operations in the Asset Adminsitration is that one can do remote call procedures such as in OPC UA with the method nodeclass.

It defeats the purpose of the standard if Submodel element operations cannot do well... operations.