Skip to main content



      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 12:27 Go to next message
Eclipse UserFriend
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 14:00 Go to previous messageGo to next message
Eclipse UserFriend
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 03:52 Go to previous message
Eclipse UserFriend
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: Thu Jul 10 23:30:11 EDT 2025

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

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

Back to the top