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
| Type | Name | Default | Description |
|---|---|---|---|
| Activation | |||
| Boolean | enableExternalTrigger (from PartialSampleTrigger) | false | true, enable external trigger input signal, otherwise use sample time settings below |
| SI.Period | sampleTime (from PartialSampleTrigger) | 0.1 | Sample period of component |
| SI.Time | startTime (from PartialSampleTrigger) | 0 | First sample time instant |
| Outgoing data | |||
| Boolean | autoBufferSize | true | true, buffer size is deduced automatically, otherwise set it manually. |
| Integer | userBufferSize | 16*1024 | Buffer size of message data in bytes (if not deduced automatically). |
| MQTTProvider | provider | MQTTProvider.TCP | MQTT network protocol |
| MQTTVersion | protocolVersion | MQTTVersion.DEFAULT | MQTT network protocol version |
| String | address | "localhost" | IP address |
| Integer | port | 1883 | Port |
| String | channel_send | "" | Channel name |
| Integer | QoS | 1 | Quality of service |
| Integer | deliveryTimeout | 10 | Delivery timeout (in seconds) |
| Boolean | retained | false | Retained flag |
| Advanced › Server connection | |||
| String | clientID | "send-" + getMACAddress() | Unique client identifier |
| Integer | keepAliveInterval | 60 | Maximum time (in seconds) that should pass without communication between the client and the server |
| Integer | connectTimeout | 30 | Connection timeout (in seconds) |
| Integer | disconnectTimeout | 10 | Disconnection timeout (in seconds) |
| Boolean | cleanSession | true | =true, if session state at connect and disconnect is to be discarded |
| Boolean | reliable | true | =true, if a published message must be completed (acknowledgements received) before another message can be sent |
| String | userName | "" | User name for authentication and authorisation |
| String | password | "" | Password for authentication and authorisation |
| Advanced › Transport Layer Security | |||
| Boolean | certAuth | true | =true, if verification of the server certificate is enabled |
| Boolean | verify | false | =true, if post-connect checks are enabled |
| TLSVersion | sslVersion | TLSVersion.DEFAULT | SSL/TLS version |
| String | trustStore | "" | Public digital certificates trusted by the client |
| String | keyStore | "" | Public certificate chain of the client (may also include the private key of the client) |
| String | privateKey | "" | Private key of the client (may be empty if already included in the keyStore) |
| Advanced › Tracing | |||
| MQTTTracing | traceLevel | MQTTTracing.DEFAULT | MQTT client tracing |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Blocks.Interfaces.BooleanInput | trigger (from PartialSampleTrigger) | ||
| Interfaces.PackageIn | pkgIn |