Mqtt Toolkit - @octave_mqtt/read


: msgs = read (obj)
: msgs = read (obj, topic)

Read available messages and remove from message queue.

Inputs

obj

A previously created octave_mqtt object

topic

Topic to match.

Outputs

msgs

Messages from the message queue

If no topic is specified, messages from any topic will be returned, otherwise from the matching input topic.

Examples

 
 client = mqttclient("tcp://127.0.0.1");
 msgs = read(client, "test");