Home » Eclipse Projects » 4DIAC - Framework for Distributed Industrial Automation and Control » 4Diac-Arrowhead framework (Arrowhead Function Blocks)
|
Re: 4Diac-Arrowhead framework [message #1820743 is a reply to message #1820740] |
Tue, 28 January 2020 04:48   |
Eclipse User |
|
|
|
Hi,
When using Arrowhead, the best practice is not to query the service yourself, but ask the orchestrator for the service. But for testing, of course you could query yourself.
The main documentation is here: https://www.eclipse.org/4diac/en_help.php?helppage=html/communication/arrowhead.html
At the end of the page, you have a link to examples: https://git.eclipse.org/c/4diac/org.eclipse.4diac.examples.git
The easiest way I'd say is to use "QueryServiceHTTPSubFull" which has all the fields to be defined by you. You should take care of the types of the data input/ouput. CHeck the type and the description of the inputs and outputs. The output for example is an array of ServiceRegistryEntry. You could get the specific position of an array using the FB called GET_AT_INDEX and then like you did, use GetEndpointFromServiceRegistryEntry to get the endpoint (IP:PORT/URI). How you use this endpoint, depends on your application. If this is for example an HTTP endpoint, then you should check the HTTP layer for forte, and build the ID string for the CLIENT FB.
|
|
|
Re: 4Diac-Arrowhead framework [message #1820813 is a reply to message #1820743] |
Wed, 29 January 2020 08:50   |
Eclipse User |
|
|
|
Hi,
Thank you. Looks like I am going in the right direction.
What should be the entries of the fields?
Using (IP:PORT/serviceregistry/mgmt/id) as address. The id is 22. primarily, using POSTMAN to register the services.
Registering the end point URL address of OPC UA for Client and publish blocks.
I am using this procedure to first test the application and if it works twill implement the orchestrator for the service (as you mentioned).
BR,
Ahsan
......................................................................................................................................
{
"id": 22,
"serviceDefinition": {
"id": 23,
"serviceDefinition": "valve102",
"createdAt": "2020-01-27 13:15:40",
"updatedAt": "2020-01-27 13:15:40"
},
"provider": {
"id": 14,
"systemName": "NAME",
"address": "iec61499",
"port": 0,
"authenticationInfo": "string",
"createdAt": "2020-01-27 12:35:27",
"updatedAt": "2020-01-27 12:35:27"
},
"serviceUri": "opc_ua[opc.tcp://localhost:IP#/Objects/2:PLC1/2:eq_states/2:EQ_V102]",
"secure": "NOT_SECURE",
"metadata": {},
"version": 0,
"interfaces": [
{
"id": 3,
"interfaceName": "HTTPS-SECURE-JSON",
"createdAt": "2019-12-27 06:45:42",
"updatedAt": "2019-12-27 06:45:42"
}
],
"createdAt": "2020-01-27 13:15:40",
"updatedAt": "2020-01-27 13:15:40"
}
................................................................................................................................
|
|
| | | |
Re: 4Diac-Arrowhead framework [message #1821140 is a reply to message #1821100] |
Thu, 06 February 2020 04:42  |
Eclipse User |
|
|
|
HI,
the serviceUri refers to the part after the endpoint separated by a slash. So you normally have IP:PORT/SERVICE_URI. It's basically the information you need to access the specific service inside the device.
In OPC UA you could thing as being Objects/PLC/eq_states/EQ_V102. But since you need the namespace of the browsename, you could put there "#/Objects/2:PLC1/2:eq_states/2:EQ_V102", that means that the client consuming this service should know what the numbers means, but since it's you for now, no problems there.
When you query for the service, there's a subapplication called GetEndpointFromServiceRegistryEntry.sub and other similars FBs/SUBs which takes the ServiceRegistryEntry and gives you IP:PORT/SERVICE_URI (yes, also the serviceUri) which you will need then to concatenate to form the opc_ua[...] string that you need to consume the service.
Take a look at https://www.eclipse.org/4diac/en_help.php?helppage=html/communication/opc_ua_version1.html to know how the string should look
|
|
|
Goto Forum:
Current Time: Wed Jul 23 11:03:11 EDT 2025
Powered by FUDForum. Page generated in 0.12539 seconds
|