MQTT enabled SLI function for the TXT Controller

Alles rund um TX(T) und RoboPro, mit ft-Hard- und Software
Computing using original ft hard- and software
Forumsregeln
Bitte beachte die Forumsregeln!
Antworten
Candyman
Beiträge: 1
Registriert: 25 Okt 2022, 21:47

MQTT enabled SLI function for the TXT Controller

Beitrag von Candyman » 25 Okt 2022, 22:05

Hello,
I've been struggling with this one for a couple of weeks so I'm asking for help here. Basically, I'm trying to create an SLI function to publish a single simple message to the MQTT broker from the TXT. I already have the development environment set up and have succesfully created numerous SLI functions. I'm very well versed in the MQTT protocol and have developed multiple MQTT apps in both Python and Java, but the TXT is so constrained and makes things very difficult for me.

Would anyone be able to share some basic MQTT publish code for the TXT? Or even just offer some guidance? I tried studying the officially used MQTT libraries for days but the documentation is downright atrocious to navigate. Anything helps.

Thanks in advance,
Andrew.

chehr
Beiträge: 193
Registriert: 07 Apr 2015, 21:07
Wohnort: Friedrichshafen

Re: MQTT enabled SLI function for the TXT Controller

Beitrag von chehr » 02 Nov 2022, 18:26

Dear Andrew,
may you are aware of following link?
https://github.com/fischertechnik/txt_t ... terface.md

and the source code:
https://github.com/fischertechnik/txt_t ... c/main.cpp

vleeuwen
Beiträge: 1496
Registriert: 31 Okt 2010, 22:23
Wohnort: Enschede (NL)
Kontaktdaten:

Re: MQTT enabled SLI function for the TXT Controller

Beitrag von vleeuwen » 03 Nov 2022, 18:54

Be aware of the online 5sec SLI bug:
I published this bug several years ago.
The RoboPro runtime terminates an SLI process if it is idle for 5 seconds or more.
A " SLI dummy" KeepAwake function call operation in RoboPro that is repeated within every 5 sec is sufficient as a work around.
See also: https://github.com/fischertechnik/txt_demo_ROBOPro_SLI
software enigineer/teacher/advisor
Google translate
http://tescaweb.nl/Carel/?p=713

Antworten