Mqtt Toolkit - @octave_mqtt/write
- : write
(obj, topic, value)
- : write
(obj, topic, value, [propname, propvalue ....])
Write value to topic.
Inputs
obj
A previously created octave_mqtt object
topic
String topic to write to.
value
String value to write to topic.
propname, propvalue
Optional property name / value pairs.
Known property options are:
QualityOfService
Numeric QualityOfService [0-2] (default 0)
Retain
Boolean flag value for retaining message (default false)
Outputs
client
A octave_mqtt object.
Examples
Open a client connection and write some values.
client = mqttclient("tcp://127.0.0.1"); write(client, "mytopic", "test1"); write(client, "mytopic", "test1", "QualityOfService", 1);
See also: mqttclient.