blockMQTTSend

A block for sending MQTT datagrams

Extends from Modelica_DeviceDrivers.Utilities.Icons.BaseIcon (Base icon for blocks providing access to external devices), Modelica_DeviceDrivers.Utilities.Icons.MQTTconnection (Base icon for models of network connections), Modelica_DeviceDrivers.Blocks.Communication.Internal.PartialSampleTrigger (Common code for triggering calls to external I/O devices).

Information

Supports sending of Message Queue Telemetry Transport (MQTT) datagrams (http://mqtt.org/) by wrapping the Eclipse Paho MQTT C client.

Parameters

TypeNameDefaultDescription
Activation
BooleanenableExternalTrigger (from PartialSampleTrigger)falsetrue, enable external trigger input signal, otherwise use sample time settings below
SI.PeriodsampleTime (from PartialSampleTrigger)0.1Sample period of component
SI.TimestartTime (from PartialSampleTrigger)0First sample time instant
Outgoing data
BooleanautoBufferSizetruetrue, buffer size is deduced automatically, otherwise set it manually.
IntegeruserBufferSize16*1024Buffer size of message data in bytes (if not deduced automatically).
MQTTProviderproviderMQTTProvider.TCPMQTT network protocol
MQTTVersionprotocolVersionMQTTVersion.DEFAULTMQTT network protocol version
Stringaddress"localhost"IP address
Integerport1883Port
Stringchannel_send""Channel name
IntegerQoS1Quality of service
IntegerdeliveryTimeout10Delivery timeout (in seconds)
BooleanretainedfalseRetained flag
Advanced › Server connection
StringclientID"send-" + getMACAddress()Unique client identifier
IntegerkeepAliveInterval60Maximum time (in seconds) that should pass without communication between the client and the server
IntegerconnectTimeout30Connection timeout (in seconds)
IntegerdisconnectTimeout10Disconnection timeout (in seconds)
BooleancleanSessiontrue=true, if session state at connect and disconnect is to be discarded
Booleanreliabletrue=true, if a published message must be completed (acknowledgements received) before another message can be sent
StringuserName""User name for authentication and authorisation
Stringpassword""Password for authentication and authorisation
Advanced › Transport Layer Security
BooleancertAuthtrue=true, if verification of the server certificate is enabled
Booleanverifyfalse=true, if post-connect checks are enabled
TLSVersionsslVersionTLSVersion.DEFAULTSSL/TLS version
StringtrustStore""Public digital certificates trusted by the client
StringkeyStore""Public certificate chain of the client (may also include the private key of the client)
StringprivateKey""Private key of the client (may be empty if already included in the keyStore)
Advanced › Tracing
MQTTTracingtraceLevelMQTTTracing.DEFAULTMQTT client tracing

Connectors

TypeNameDefaultDescription
Modelica.Blocks.Interfaces.BooleanInputtrigger (from PartialSampleTrigger)
Interfaces.PackageInpkgIn