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 » Linefeed in RawDataComLayer of FORTE(RawDataComLayer appends linefeed to data which conflicts with openHAB MQTT binding)
Linefeed in RawDataComLayer of FORTE [message #1736149] Mon, 27 June 2016 07:26 Go to next message
Herwig Eichler is currently offline Herwig EichlerFriend
Messages: 18
Registered: February 2016
Junior Member
Hi,
I noticed in the FORTE sources, that the RawDataComLayer class appends a linefeed character to the data it sends. This behaviour is in conflict with openHAB MQTT bindings, which do not expect any control characters and we need to use openHAB to create an easy home automation interface (at least it seems to be the best choice for now).
In my opinion a raw data comm class should not append any additional characters, this would be the Job of classes derived from RawDataComLayer, which need to handle some special communication requirements.
Please advice, how I can change this, without a big Impact on the rest of the FORTE communication layer classes (e.g. create a new derived class from RawDataComLayer and override the send method). It's an easy Job to change the existing code, but i want to do it in the right way, without creating too much havoc Wink
Thanks and kind regards
Herwig
Re: Linefeed in RawDataComLayer of FORTE [message #1736253 is a reply to message #1736149] Mon, 27 June 2016 21:09 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1582
Registered: January 2014
Senior Member

Hi,

I think this comes from the origin of the raw layer: it originally was developed to allow simple strings to be sent over serial line and there you need the termination character for terminating the sequence. I think this should not be done here. It either should be done in the serial layer or in the FB generating the string. This would make the raw layer much more usable.

@Martin: what do you think. Did I miss anything.

Alois
Re: Linefeed in RawDataComLayer of FORTE [message #1737038 is a reply to message #1736253] Tue, 05 July 2016 09:10 Go to previous messageGo to next message
Martin Melik Merkumians is currently offline Martin Melik MerkumiansFriend
Messages: 117
Registered: March 2016
Senior Member
Hi,

sorry that it took me so long to answer. Yes you are right I hacked it together to communicate with a measurement device via RS232.

I would suggest to either completely remove it from the RawDataLayer, or to add it as part of the parameter string of the CommFB and not to add it to the SerCommLayer, as serial communication is hardly standardized and varies a lot on which termination symbol is used.
The extra parameter would simplify communication to an device as i would not have to add the termination symbol to each message.

Martin
Re: Linefeed in RawDataComLayer of FORTE [message #1737176 is a reply to message #1737038] Wed, 06 July 2016 08:50 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1582
Registered: January 2014
Senior Member

In this case I would say we remove it. It would make the raw layer smaller and easier. I would not turn the termination as parameter for the raw layer. How about introducing a terminated raw layer which could even inherit from the raw layer?

Alois
Re: Linefeed in RawDataComLayer of FORTE [message #1737179 is a reply to message #1737176] Wed, 06 July 2016 08:55 Go to previous messageGo to next message
Martin Melik Merkumians is currently offline Martin Melik MerkumiansFriend
Messages: 117
Registered: March 2016
Senior Member
Would be fine for me.

Martin
Re: Linefeed in RawDataComLayer of FORTE [message #1737194 is a reply to message #1737179] Wed, 06 July 2016 10:27 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1582
Registered: January 2014
Senior Member

Ok I created an issue for it: https://bugs.eclipse.org/bugs/show_bug.cgi?id=497376
Re: Linefeed in RawDataComLayer of FORTE [message #1737714 is a reply to message #1737194] Tue, 12 July 2016 08:17 Go to previous messageGo to next message
Herwig Eichler is currently offline Herwig EichlerFriend
Messages: 18
Registered: February 2016
Junior Member
Hi,
is it possible that the device manager is also using the RawDataComLayer?
I just commented the "linefeed" out and it seems that with this change, we experience download problems from the IDE. Even the "clean device" does not help much. I still need to do some detailled Investigation of this issue and i will try to reproduce it.
Kind regards
Herwig
Re: Linefeed in RawDataComLayer of FORTE [message #1737804 is a reply to message #1737714] Wed, 13 July 2016 07:24 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1582
Registered: January 2014
Senior Member

Hi,

that is extremely strange. No the device manager is completely separated and is not using any code from the raw layer. I'll ty to work also on the raw layer today and see if I can reproduce the issue.

BR,
Alois
Re: Linefeed in RawDataComLayer of FORTE [message #1737806 is a reply to message #1737804] Wed, 13 July 2016 08:01 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1582
Registered: January 2014
Senior Member

Hi,

in my last commit I fixed some things in the raw layer. Currently I can not test it. But I found also a disturbing issue in the receving code. Maybe this resulted in your problem. Looking forward to your feedback.

Alois
Re: Linefeed in RawDataComLayer of FORTE [message #1737829 is a reply to message #1737806] Wed, 13 July 2016 10:45 Go to previous messageGo to next message
Herwig Eichler is currently offline Herwig EichlerFriend
Messages: 18
Registered: February 2016
Junior Member
Hi Alois,
i will do a new forte build tonight and Keep you updated
Kind regards
Herwig
Re: Linefeed in RawDataComLayer of FORTE [message #1738061 is a reply to message #1737806] Fri, 15 July 2016 13:26 Go to previous messageGo to next message
Herwig Eichler is currently offline Herwig EichlerFriend
Messages: 18
Registered: February 2016
Junior Member
Hi Alois,
we don't experience the deployment problems with the new forte code.
It seems everything is working now.
kind regards
Herwig
Re: Linefeed in RawDataComLayer of FORTE [message #1738065 is a reply to message #1738061] Fri, 15 July 2016 13:42 Go to previous message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1582
Registered: January 2014
Senior Member

Great then I close the bug.
Previous Topic:Limitation of RMT_DEV
Next Topic:Basic FB as Event Source
Goto Forum:
  


Current Time: Fri Apr 19 20:45:28 GMT 2024

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

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

Back to the top