modelTestSerialPackager_MQTT

Example for combining MQTT and SerialPackager blocks with deactivated autoBufferSize / useBackwardPropagatedBufferSize

Extends from Modelica.Icons.Example (Icon for runnable examples).

Information

The mqttSend block sends to the MQTT test broker test.mosquitto.org at topic "mdd-example". The mqttReceive block subscribes to the same broker at the same topic "mdd-example". Consequently, the mqttReceive block receives what the mqttSend block sends.

Note: There is no causality between the mqttSend block and the mqttReceive block. Therefore the execution order of the blocks is not determined. Additionally, the mqttReceive block starts an own receiving thread, so that the time the data was received is not equal to the time the external function within the mqttReceive block was called. This indeterminism may also show up in the plots.

Components

TypeNameDefaultDescription
Modelica_DeviceDrivers.Blocks.Packaging.SerialPackager.Packagerpackager
Modelica_DeviceDrivers.Blocks.Packaging.SerialPackager.AddRealaddReal
Modelica.Blocks.Sources.RealExpression[3]realExpression
Modelica_DeviceDrivers.Blocks.Communication.MQTTSendmqttSend
Modelica_DeviceDrivers.Blocks.Packaging.SerialPackager.AddIntegeraddInteger
Modelica.Blocks.Sources.IntegerExpressionintegerExpression
Modelica_DeviceDrivers.Blocks.Communication.MQTTReceivemqttReceive
Modelica_DeviceDrivers.Blocks.Packaging.SerialPackager.GetRealgetReal
Modelica_DeviceDrivers.Blocks.Packaging.SerialPackager.GetIntegergetInteger
Packaging.SerialPackager.AddFloataddFloat
Packaging.SerialPackager.GetFloatgetFloat
Modelica.Blocks.Sources.RealExpression[2]realExpression1