Mqtt Toolkit - @octave_mqtt/write
- : write
(obj, topic, value) - : write
(obj, topic, value, [propname, propvalue ....]) Write value to topic.
Inputs
objA previously created octave_mqtt object
topicString topic to write to.
valueString value to write to topic.
propname, propvalueOptional property name / value pairs.
Known property options are:
QualityOfServiceNumeric QualityOfService [0-2] (default 0)
RetainBoolean flag value for retaining message (default false)
Outputs
clientA 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.