MQTT Subscribe
Add-On Required: This feature requires the MATLAB Coder Support Package for NVIDIA Jetson and NVIDIA DRIVE Platforms add-on.
Libraries:
NVIDIA Jetson and NVIDIA DRIVE /
Internet Of Things
Description
The MQTT Subscribe block receives messages from the MQ Telemetry Transport (MQTT) broker for the specified topic.
At each time step, the block checks if a new message is available on the specified topic. If a new message is available, the block receives the message. The Message port outputs the new message. If a new message is not available, Message outputs the last received message. The Topic port outputs the topic of the received message. The string topic/level/# on the block icon is specified by the Topic parameter.
For more information on MQTT, see Introduction to MQTT.
Note
The MQTT Subscribe block supports MQTT only over TCP/IP sockets.
Limitations
Only a maximum of 10 MQTT Subscribe blocks are allowed in a Simulink® model.
Ports
Output
Parameters
Version History
Introduced in R2023a