mqttreconnect
Reconnect to a broker after a connection has been lost.
Attention: Valid only with Altair Communication Extension.
Syntax
[status, messageinfo] = mqttreconnect(clientid)
Inputs
- clientid
- client id, an output of mqttclient.
Outputs
- Status
- reconnection status flag. values are 0 and 1
- messageinfo
- description of reconnection status flag
Examples
Reconnect to a broker after a connection has been lost
cld = mqttclient('test.mosquitto.org','port',1883);
[status,msgeinfo] = mqttreconnect(cld)
status = 0
msgeinfo = client reconnect: successful