Re: [fpc-pascal] FreePascal and the OrangePi
When I installed fpc on my raspberry pi, I compiled from source, but that was when the pi was relatively new. I'm fairly certain there's a release for the pi. If the orange one has an arm processor, the release for the raspberry should work on the orange as well. On 10/21/2022 6:19 PM, Terry A. Haimann via fpc-pascal wrote: Dumb ? What download should I use to install the latest version of FreePascal on the OrangePi 4 LTS, I am running Debian 3.0.6 Bullseye. The Orange Pi 4 LTS is an SBC running an ARM Processor. Rockchip 3399 SOC http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/details/orange-pi-4-LTS.html ___ 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
[fpc-pascal] FreePascal and the OrangePi
Dumb ? What download should I use to install the latest version of FreePascal on the OrangePi 4 LTS, I am running Debian 3.0.6 Bullseye. The Orange Pi 4 LTS is an SBC running an ARM Processor. Rockchip 3399 SOC http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/details/orange-pi-4-LTS.html ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Threaded webserver and TJSONRPCModule instances: can I be sure there's only one?
El 21/10/22 a les 17:09, Luca Olivetti via fpc-pascal ha escrit: El 21/10/22 a les 12:48, Michael Van Canneyt via fpc-pascal ha escrit: I see that Kind is used after the module has been created, so setting it in either method (CreateNew or DataModuleCreate) should be OK, am I right? You are right. I will publish the method. That's an oversight. Meanwhile I changed the method I use to route the calls to the main thread (Application.QueueAsyncCall instead of a critical section and Synchronize) so it doesn't matter any more if there is just one instance or more than one. Now that I think of it, even with the previous method it wouldn't have mattered (since each instance would have been using its own critical section and other fields). Bye -- Luca ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Threaded webserver and TJSONRPCModule instances: can I be sure there's only one?
El 21/10/22 a les 12:48, Michael Van Canneyt via fpc-pascal ha escrit: I see that Kind is used after the module has been created, so setting it in either method (CreateNew or DataModuleCreate) should be OK, am I right? You are right. I will publish the method. That's an oversight. Meanwhile I changed the method I use to route the calls to the main thread (Application.QueueAsyncCall instead of a critical section and Synchronize) so it doesn't matter any more if there is just one instance or more than one. Bye -- Luca ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] MQTT package for freepascal/lazarus?
Hi, FWIW, I'm using MQTT via cmd-line. I.e. I call ExecuteProcess(MQTTExec,MQTTStrArr); while MQTTExec is /usr/bin/mosquitto_pub That's on a linux-server. Op 20/10/2022 om 15:57 schreef Bo Berglund via fpc-pascal: On Thu, 20 Oct 2022 11:11:17 +0200, Bo Berglund via fpc-pascal wrote: On Tue, 11 Oct 2022 19:42:26 +0200 (CEST), Karoly Balogh via fpc-pascal wrote: Hi, On Tue, 11 Oct 2022, Bo Berglund via fpc-pascal wrote: I am looking for a pascal implementation of the MQTT protocol. I could not find anything inside Lazarus' OnLinePackageManager. Is there something like that available? I made a front-end Pascal library, and and Object Pascal wrapper for libmosquitto a couple of years ago. It's available here. It's know to work on Linux, Windows and macOS at least. It's against libmosquitto 1.x. Not sure if 2.x got released meanwhile. I can update things if needed. (Pull requests are welcomed.) It's available here: https://github.com/chainq/mosquitto-p Well, the version of the mosquitto broker server that gets installed on my RaspberryPi4 is: $ mosquitto --version Error: Unknown option '--version'. mosquitto version 2.0.11 mosquitto is an MQTT v5.0/v3.1.1/v3.1 broker. So this is what I have to communicate with as a client. I need to be able to publish as well as subscribe to topics. In the Lazarus forum I have seen people having problems with this when they use various FPC packages while the native command line works OK (on Linux), probably because they are using old packages not updated for the changes made in MQTT in recent years. So this is why I am asking if there is some MQTT client package available for FPC/Lazarus that complies to the updated protocols? I found this on the Lazarus forum: https://forum.lazarus.freepascal.org/index.php/topic,54397.msg435050.html#msg435050 Not a poackage, but rather advice on how to utilize binary "drivers" installed on the system via translated header files. Not optimal, but might be doable anyway. I will try that path going forward, just now dealing with the MQTT source devices. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Threaded webserver and TJSONRPCModule instances: can I be sure there's only one?
On Fri, 21 Oct 2022, Luca Olivetti via fpc-pascal wrote: El 21/10/22 a les 9:57, Luca Olivetti via fpc-pascal ha escrit: El 21/10/22 a les 9:48, Luca Olivetti via fpc-pascal ha escrit: El 21/10/22 a les 9:39, Michael Van Canneyt via fpc-pascal ha escrit: And a property of your module: property Kind: TWebModuleKind read FWebModuleKind write FWebModuleKind default wkPooled; wkPooled is the default, but if you explicitly set this to 'wkPooled' in the constructor, you'll be sure there is only ever 1 instance of the module, which is reused for every request... Thank you, I see that the property isn't published, so it's not available in the object inspector. Can I set it in the DataModuleCreate os is it too late? I overrode the CreateNew method, I hope that's enough. I see that Kind is used after the module has been created, so setting it in either method (CreateNew or DataModuleCreate) should be OK, am I right? You are right. I will publish the method. That's an oversight. Michael.___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Threaded webserver and TJSONRPCModule instances: can I be sure there's only one?
El 21/10/22 a les 9:57, Luca Olivetti via fpc-pascal ha escrit: El 21/10/22 a les 9:48, Luca Olivetti via fpc-pascal ha escrit: El 21/10/22 a les 9:39, Michael Van Canneyt via fpc-pascal ha escrit: And a property of your module: property Kind: TWebModuleKind read FWebModuleKind write FWebModuleKind default wkPooled; wkPooled is the default, but if you explicitly set this to 'wkPooled' in the constructor, you'll be sure there is only ever 1 instance of the module, which is reused for every request... Thank you, I see that the property isn't published, so it's not available in the object inspector. Can I set it in the DataModuleCreate os is it too late? I overrode the CreateNew method, I hope that's enough. I see that Kind is used after the module has been created, so setting it in either method (CreateNew or DataModuleCreate) should be OK, am I right? Bye -- Luca ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Threaded webserver and TJSONRPCModule instances: can I be sure there's only one?
El 21/10/22 a les 9:48, Luca Olivetti via fpc-pascal ha escrit: El 21/10/22 a les 9:39, Michael Van Canneyt via fpc-pascal ha escrit: And a property of your module: property Kind: TWebModuleKind read FWebModuleKind write FWebModuleKind default wkPooled; wkPooled is the default, but if you explicitly set this to 'wkPooled' in the constructor, you'll be sure there is only ever 1 instance of the module, which is reused for every request... Thank you, I see that the property isn't published, so it's not available in the object inspector. Can I set it in the DataModuleCreate os is it too late? I overrode the CreateNew method, I hope that's enough. Bye -- Luca ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Threaded webserver and TJSONRPCModule instances: can I be sure there's only one?
El 21/10/22 a les 9:39, Michael Van Canneyt via fpc-pascal ha escrit: And a property of your module: property Kind: TWebModuleKind read FWebModuleKind write FWebModuleKind default wkPooled; wkPooled is the default, but if you explicitly set this to 'wkPooled' in the constructor, you'll be sure there is only ever 1 instance of the module, which is reused for every request... Thank you, I see that the property isn't published, so it's not available in the object inspector. Can I set it in the DataModuleCreate os is it too late? Bye -- Luca ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Threaded webserver and TJSONRPCModule instances: can I be sure there's only one?
On Fri, 21 Oct 2022, Luca Olivetti via fpc-pascal wrote: Hello, I'm using a TFPHTTPServerHandler in threaded mode. I'm also using a TJSONRpcModule. I see that, even if the calls come from different threads, only one instance of the rpc module is ever created (on demand, the first time an rpc request comes in) and used. Since I'm relying on this behaviour, can I be 100% sure it's by design and not a quirk of my test setup? It is controllable. There is the 'Modulekind' : wkPooled. Type TWebModuleKind = (wkPooled, wkOneShot{, wkSession}); And a property of your module: property Kind: TWebModuleKind read FWebModuleKind write FWebModuleKind default wkPooled; wkPooled is the default, but if you explicitly set this to 'wkPooled' in the constructor, you'll be sure there is only ever 1 instance of the module, which is reused for every request... Michael. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
[fpc-pascal] Threaded webserver and TJSONRPCModule instances: can I be sure there's only one?
Hello, I'm using a TFPHTTPServerHandler in threaded mode. I'm also using a TJSONRpcModule. I see that, even if the calls come from different threads, only one instance of the rpc module is ever created (on demand, the first time an rpc request comes in) and used. Since I'm relying on this behaviour, can I be 100% sure it's by design and not a quirk of my test setup? Bye -- Luca ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] MQTT package for freepascal/lazarus?
> I am looking for a pascal implementation of the MQTT protocol. https://github.com/cutec-chris/TMQTTClient https://github.com/jamiei/Delphi-TMQTT2 https://github.com/songshuang8/MqttServer https://github.com/AndersonGaitolini/MQTT-Gaitolini https://github.com/ZiCog/mqtt-free-pascal https://github.com/quini27/MQTT-client-application-for-Windows https://github.com/crossrw/mqttClient https://github.com/apelsinovv/MQTT https://github.com/bkeevil/mqtt https://github.com/sigmdel/mosquitto-p https://github.com/sigmdel/lazmqttc https://github.com/GRIDSystemSAS/GS.GRID https://github.com/join2017/dmqtt https://github.com/wizinfantry/delphi-mqtt-client https://github.com/pjde/delphi-mqtt https://github.com/windflee/delphimqtt https://github.com/Indemsys/Delphi_MQTT_mosquitto ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal