MQTT_ReadTopicBinary (FUN)ΒΆ
FUNCTION MQTT_ReadTopicBinary : WORD
This function subscribes to the specified MQTT topic and returns published messages as arrays of bytes.
The output valid is set to TRUE when a publication occurs
on the topic and the message payload is copied into value. Also the
output variable value_size is set to the number of bytes copied.
- InOut:
Scope
Name
Type
Comment
Return
MQTT_ReadTopicBinaryWORDStatus code returned by the runtime (0 means "no errors").
Inout
idWORDOperation identifier used by the runtime.
Input
topicSTRING(127)MQTT topic name.
qosWORDQuality of Service level.
Output
valueARRAY [0..244] OF BYTE
Binary value received from the topic.
value_sizeWORDNumber of valid bytes in value.
validBOOLTRUEwhen a valid value has been received.