AWSIoTPublish (FB)¶
FUNCTION_BLOCK AWSIoTPublish
Function block for publishing a message via AWS IoT Core.
- InOut:
Scope
Name
Type
Comment
Input
xExecuteBOOLRising edge will publish the message |pbPayload|
udiTimeOutUDINTTime out in µs, 0: no time out
pbPayloadPOINTER TO BYTE
Pointer to the message
udiPayloadSizeUDINTSize of the message |pbPayload|
eQoSQuality of service level (QoS)
mQTTPublishPropertiesREFERENCE TO MQTTPublishProperties
Optional publish properties (MQTT V5 only)
Inout
awsIoTClientReference to AWSIoTClient
wsTopicWSTRING(1024)Reference to the topic
Output
xErrorBOOLTRUE, if an error occurred
xBusyBOOLTRUE, while sending the message
xDoneBOOLTRUE, if the message was sent successfully
eErrorMQTT.MQTT_ERRORError code