functionconstructor

Creates an MQTT instance.

Extends from Modelica.Icons.Function (Icon for functions).

Inputs

TypeNameDefaultDescription
Stringprovider"tcp://" - TCP, "ssl://" - encrypted TCP, "ws://" - websocket, , "wss://" - encrypted websocket
StringaddressIP address
Integerport1883Port
Booleanreceiverfalse - sender, true - receiver
StringchannelReceive channel
IntegerbufferSize16*1024Size of receive buffer
IntegerQoS1Quality of service for receiver: 0 - at most once, 1 - at least once, 2 - exactly once
StringclientIDUnique client identifier
StringuserName""User name for authentication and authorisation
Stringpassword""Password for authentication and authorisation
StringtrustStore""Public digital certificates trusted by the client
StringkeyStore""Public certificate chain of the client
StringprivateKey""Private key of the client
IntegerkeepAliveInterval60Maximum time (in seconds) that should pass without communication between the client and the server
BooleancleanSessiontruefalse - keep session state for this client at disconnect, true - discard session state at connect and disconnect
Booleanreliabletruefalse - increase number of messages that can be in-flight simultaneously to 10, true - a published message must be completed (acknowledgements received) before another message can be sent
IntegerconnectTimeout30Connection timeout (in seconds)
IntegerMQTTVersion0MQTT version: 0 - default: start with 3.1.1, and if that fails, fall back to 3.1, 3 - only try version 3.1, 4 - only try version 3.1.1, 5 - only try version 5.0
IntegerdisconnectTimeout10Disconnect timeout (in seconds)
BooleanenableServerCertAuthtruefalse - disable verification of the server certificate, true - enable verification of the server certificate
Booleanverifyfalsefalse - disable post-connect checks, true - enable post-connect checks, including that a certificate matches the given host name
IntegersslVersion0SSL/TLS version: 0 - default, 1 - TLS 1.0, 2 - TLS 1.1, 3 - TLS 1.2
IntegertraceLevel0Trace level: 0 - none, 1 - maximum, 2 - medium, 3 - minimum, 4 - protocol, 5 - error, 6 - severe, 7 - fatal

Outputs

TypeNameDefaultDescription
MQTTmqtt