Tms software tms mqtt developers guide
TMS SOFTWARE TMS MQTT DEVELOPERS GUIDE TMS MQTT DEVELOPERS GUIDE Feb Copyright ? by tmssoftware com bvba Web http www tmssoftware com Email info tmssoftware com CTMS SOFTWARE TMS MQTT DEVELOPERS GUIDE Index Introduction Usage Installation Prerequisites Installation in Delphi Installation in Lazarus FPC Getting started At Design Time At Runtime Free Brokers Connecting Connection settings Username and Password Code example Keeping a connection alive Code example Automatic reconnecting Code example Last Will Testament LWT The following parameters can be provided Code example Publishing Topic Name Packet Payload Quality of Service QoS Retain- ag Code example Subscribing Topic Filter Single-level wildcard Multi-level wildcard Subscription Quality of Service Code example Ensure a subscription was successful CTMS SOFTWARE TMS MQTT DEVELOPERS GUIDE Unsubscribing Receiving published messages Pinging Monitoring in- and outgoing packets Logging Demo CTMS SOFTWARE TMS MQTT DEVELOPERS GUIDE Introduction The TMS MQTT component as a full-featured Delphi MQTT Client that implements the version of the MQTT protocol http docs oasis-open org mqtt mqtt v mqtt-v html The component is developed to work on all major operating systems Windows Mac Linux iOS and Android and it supports the VCL FMX and FPC frameworks It has the following Key feaures - Quality of Service and - Automatic pinging - Automatic reconnect - Last Will and Testament LWT - SSL connections - Authentication Usage Installation Prerequisites The TMS MQTT Library has a dependency on Indy so make sure you have a working version of Indy installed Installation in Delphi To install TMS MQTT in RAD studio download and install the appropriate installer for your version of the IDE Installation in Lazarus FPC To install TMS MQTT in lazarus download and open the TMS MQTT lpi package and install it manually into the IDE CTMS SOFTWARE TMS MQTT DEVELOPERS GUIDE Getting started At Design Time The TTMSMQTTClient comes as a non-visual component that after successful installation can be found in the tool palette under TMS MQTT Just add an instance of the client to your form to get started All necessary settings to connect the client will be available through the Object Inspector At Runtime The TTMSMQTTClient can also be created at runtime See below for an example on how to do that procedure TMQTTExampleForm FormCreate Sender TObject begin MQTTClient TTMSMQTTClient Create Self end Free Brokers Instead of having to install your own broker ?rst note that to get started with MQTT you can use one of the public free brokers listed on the following page http moxd io public-mqtt-brokers CTMS SOFTWARE TMS MQTT DEVELOPERS GUIDE Connecting Connection settings Before connecting the client to a broker the following parameters can be set Property Type Description Default value ClientID string This is the unique ID for the Client random string BrokerHostName string Hostname of the broker you want to connect to BrokerPort integer The port to use when connecting to the broker UseSSL boolean Whether or not to connect through SSL false Credentials TMQTTCredentials The credentials to use when connecting more info below KeepAliveSettings TMQTTKeepAliveSettings
Documents similaires
-
33
-
0
-
0
Licence et utilisation
Gratuit pour un usage personnel Attribution requise- Détails
- Publié le Nov 22, 2021
- Catégorie Creative Arts / Ar...
- Langue French
- Taille du fichier 63.4kB