FWIW,
That array did the trick. Thanks again.
But I'll study the wrapper in the near future.
Op 25/08/2020 om 18:18 schreef Koenraad Lelong via fpc-pascal:
Hi,
Thanks for the suggestion I will try that array.
Why I did it like that : I thought it an easy and fast way to enhance my
project. I added the same value to rrd, the same way, i.e. a
ExecuteProcess with a bunch of parameters. There it works, but no double
quotes needed.
LAter I will try your wrapper.
Op 25/08/2020 om 15:52 schreef Karoly Balogh (Charlie/SGR) via fpc-pascal:
Just a guess, but I think you need to do:
MQTTStr[0]:='-h';
MQTTStr[1]:=MQTTBroker;
MQTTStr[2]:='-t';
MQTTStr[3]:=MQTTTopic;
... etc.
MQTTStr[n]:='-m';
MQTTStr[n+1]:=MQTTMessage;
...
BTW, shameless plug, but this is a very very hacky way to talk to an MQTT
broker I think, I've made a raw C header conversion, and a Pascal-style
multithreaded OOP wrapper for libmosquitto, so you can properly integrate
MQTT communication in your Free Pascal app (tested on Linux, MacOS and
Windows):
https://github.com/chainq/mosquitto-p
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal