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 » SUBSCRIBE truncates message(SUBSCRIBE Function Block truncates message received from MQTT)
SUBSCRIBE truncates message [message #1826925] Mon, 04 May 2020 16:27 Go to next message
Jose Antonio Izquierdo is currently offline Jose Antonio IzquierdoFriend
Messages: 2
Registered: April 2020
Junior Member
Hello everyone.

I hope you can help me.

I am trying to read a message from an MQTT topic using the SUBSCRIBE_1 block and I am having a problem. The message is a JSON of about 700 characters but at the output of the functional block (RD_1) I get the message truncated to 256 characters.

What do I have to do to get the full message?

Thank you.
Re: SUBSCRIBE truncates message [message #1826928 is a reply to message #1826925] Mon, 04 May 2020 18:00 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,

you should change the size of the receiving buffer in forte. Go to src/modules/mqtt_paho/MQTTComLayer.h:48 and you will see the member variable called mBufferSize and is set to 255. Change this to maximum value you could get from your topic, recomplie forte and try again.

And of course, if you want, you can do this variable to be able to be set from CMake, or the line command, and contribute the change.

Regards,

Jose
Re: SUBSCRIBE truncates message [message #1826949 is a reply to message #1826928] Tue, 05 May 2020 07:52 Go to previous message
Jose Antonio Izquierdo is currently offline Jose Antonio IzquierdoFriend
Messages: 2
Registered: April 2020
Junior Member
Hi Jose MarĂ­a.

Thanks for your quick response. That solution works perfectly.

I will study the posibility of making that variable seteable from CMake or the line command.

Regards.

Jose Antonio.
Previous Topic:Arrowhead FB deploy problem with latest forte
Next Topic:Problem with updating 4DIAC to the latest release
Goto Forum:
  


Current Time: Fri Oct 30 14:47:14 GMT 2020

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

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

Back to the top