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 » RESTful or HTTP clients in FORTE(Implementation of the RESTful or HTTP communication protocol in FORTE)
RESTful or HTTP clients in FORTE [message #1770907] Fri, 18 August 2017 16:08 Go to next message
Marc Jakobi is currently offline Marc JakobiFriend
Messages: 65
Registered: April 2017
Member
Hi.

I have come to the point at which I have developed and validated a set of IEC 61499 control applications via co-simulations with Matlab and Polysun.
Now I would like to run some tests with real hardware and a Raspberry Pi running FORTE.

The components (battery, photovoltaics, load) are addressed via a REST server (using HTTP PUT and GET requests). Before I go and implement REST or HTTP clients into FORTE's communication framework, I wanted to ask in the forum if anyone has already done so and would be willing to share experiences or source code.

I would imagine the ID data input of a client CSIFB to look something like this:

http://192.168.0.144:9797/rest/devices/battery/M01
Re: RESTful or HTTP clients in FORTE [message #1771306 is a reply to message #1770907] Wed, 23 August 2017 20:48 Go to previous messageGo to next message
Marc Jakobi is currently offline Marc JakobiFriend
Messages: 65
Registered: April 2017
Member
I have started work on a simple HTTP communication layer for FORTE that can be used to perform the above tasks.
If anyone is interested, it can be downloaded here: https://github.com/MrcJkb/forte_http_comm
Re: RESTful or HTTP clients in FORTE [message #1771381 is a reply to message #1771306] Thu, 24 August 2017 12:51 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 644
Registered: January 2014
Senior Member
Wow this is great. Would you be interested to hand this over into the official FORTE repo?
Re: RESTful or HTTP clients in FORTE [message #1771385 is a reply to message #1771381] Thu, 24 August 2017 14:11 Go to previous messageGo to next message
Marc Jakobi is currently offline Marc JakobiFriend
Messages: 65
Registered: April 2017
Member
Sure. I'm still working on my thesis, but I could do it when it's done. By then I'll have implemented PUT requests, too.
Re: RESTful or HTTP clients in FORTE [message #1771387 is a reply to message #1771385] Thu, 24 August 2017 14:58 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 644
Registered: January 2014
Senior Member
Cool. If you find some time you may want already have a look on how to contribute to eclipse projects [1] as there is some "paper work" involved (e.g., agree that your code is published under the Eclipse Public License). I'm also happy to talk with you personal (e.g., skype) and explain the process. Jose also wrote a technical documentation about how code can be pushed to our Gerrit code review system.

Are you using an library?

[1] https://wiki.eclipse.org/Development_Resources/Quick_Start_--_Contributing_Project_Code
Re: RESTful or HTTP clients in FORTE [message #1771412 is a reply to message #1771387] Thu, 24 August 2017 20:07 Go to previous messageGo to next message
Marc Jakobi is currently offline Marc JakobiFriend
Messages: 65
Registered: April 2017
Member
Sounds good. I have time by the beginning to middle of October.
I'll just send you a message when I'm ready.

I am trying to stick to the FORTE design as much as possible and am avoiding external libraries and the STL so that it is compatible with devices that don't support them. Even though it is frustrating to use so much I was told to avoid in C++ sometimes :)

I Basically used the existing framework and added another layer.
For the transport layer, I subclassed the CIPComLayer in the existing framework and overloaded the processInterrupt() method to handle server-side connection losses without causing an INIT- event to be issued.

[Updated on: Thu, 24 August 2017 20:13]

Report message to a moderator

Re: RESTful or HTTP clients in FORTE [message #1771414 is a reply to message #1771412] Thu, 24 August 2017 20:22 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 644
Registered: January 2014
Senior Member
I know that the this can be frustrating. Therefore for stuff that is dedicated to larger systems or systems where modern compilers are available we start to use STL and modern C++ (e.g., code for the raspi). I hope the in some future we wll only have platforms with modern C++ compilers.
Re: RESTful or HTTP clients in FORTE [message #1771469 is a reply to message #1771414] Fri, 25 August 2017 11:13 Go to previous message
Marc Jakobi is currently offline Marc JakobiFriend
Messages: 65
Registered: April 2017
Member
It's not all that bad. At least I get to practice C syntax a bit :)
Previous Topic:Duplicate/Copy 4diac applications
Next Topic:Plugin architecture for FORTE?
Goto Forum:
  


Current Time: Fri Oct 19 11:51:53 GMT 2018

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

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

Back to the top