Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » 4DIAC - Framework for Distributed Industrial Automation and Control » 4Diac-Arrowhead framework (Arrowhead Function Blocks)
4Diac-Arrowhead framework [message #1820740] Tue, 28 January 2020 08:52 Go to next message
Ahsan Zia is currently offline Ahsan ZiaFriend
Messages: 35
Registered: July 2018
Member
Hi All,

How can we GET a service from Arrowhead Framework,that is already registered there?

For example, https://localhost:port/serviceregistry/mgmt/22.,
which Functions blocks can be utilized?

I have been using the following approach.

Please also point me towards any new documentations.


Thanks in advance.

BR,
Ahsan
  • Attachment: Capture.JPG
    (Size: 418.97KB, Downloaded 35 times)
Re: 4Diac-Arrowhead framework [message #1820743 is a reply to message #1820740] Tue, 28 January 2020 09:48 Go to previous messageGo to next message
Jose Maria Jesus Cabral Lassalle is currently offline Jose Maria Jesus Cabral LassalleFriend
Messages: 195
Registered: February 2016
Senior Member
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 13:50 Go to previous messageGo to next message
Ahsan Zia is currently offline Ahsan ZiaFriend
Messages: 35
Registered: July 2018
Member
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"
}
................................................................................................................................
  • Attachment: Arrowhead.JPG
    (Size: 325.64KB, Downloaded 16 times)
Re: 4Diac-Arrowhead framework [message #1820814 is a reply to message #1820813] Wed, 29 January 2020 14:03 Go to previous messageGo to next message
Jose Maria Jesus Cabral Lassalle is currently offline Jose Maria Jesus Cabral LassalleFriend
Messages: 195
Registered: February 2016
Senior Member
Hi,

the data input "interfaces" is an array, so it should be

["HTTPS-SECURE-JSON"]

The address should just be:

IP:PORT/serviceregistry

The FB will query then for services called "valve102"

Also, it looks that you're using version 4.1.3 of the AF. The implementation in 4diac is not compatible with 4.1.3, only with 4.1.2. I assume you read the documentation
Re: 4Diac-Arrowhead framework [message #1821077 is a reply to message #1820814] Wed, 05 February 2020 09:57 Go to previous messageGo to next message
Ahsan Zia is currently offline Ahsan ZiaFriend
Messages: 35
Registered: July 2018
Member
Hi,

Thank you.
I only had 4.1.3 running at the moment, but trying to put up 4.1.2.
Is it required to run two separate FORTE run-time instances in 4Diac, one connecting Arrowhead to 4Diac and second connecting 4Diac to control application Application using OPC UA? Or work by compiling the FORTE with open62451 with the arrow module enabaled?

------------------------------------------------------------------------------------------------------------------------
"serviceUri": "opc_ua[opc.tcp://localhost:IP#/Objects/2:PLC1/2:eq_states/2:EQ_V102]"

Is this the right way to declare endpoint?

Please check the previous comment for complete message body.


-------------------------------------------------------------------------------------------------------------------------


Best
  • Attachment: Forum.JPG
    (Size: 200.59KB, Downloaded 16 times)
Re: 4Diac-Arrowhead framework [message #1821100 is a reply to message #1821077] Wed, 05 February 2020 15:58 Go to previous messageGo to next message
Kirill Dorofeev is currently offline Kirill DorofeevFriend
Messages: 52
Registered: February 2016
Member
Hi Ahsan,

you can definitely have everything in one forte. As for the second point, I believe serviceUri is an arrowhead-specific identifier, i don't think it should follow 4diac notations :-) in short: i think, you can have there whatever you want, it'll only be seen in the arrowhead database. @Jose, correct me, if i'm wrong.

Cheers,
Kirill
Re: 4Diac-Arrowhead framework [message #1821140 is a reply to message #1821100] Thu, 06 February 2020 09:42 Go to previous message
Jose Maria Jesus Cabral Lassalle is currently offline Jose Maria Jesus Cabral LassalleFriend
Messages: 195
Registered: February 2016
Senior Member
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
Previous Topic:LuaJit in windows in ok but under raspiberry can't
Next Topic:Stopping and starting FB applications under FORTE
Goto Forum:
  


Current Time: Sat Oct 24 04:19:55 GMT 2020

Powered by FUDForum. Page generated in 0.02640 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top