AWSIoTSubscribeDeviceShadow (FB)¶
FUNCTION_BLOCK AWSIoTSubscribeDeviceShadow
Function block to subscribe for changes of the device shadow.
- InOut:
Scope
Name
Type
Initial
Comment
Input
xEnableBOOLTRUE: Subscribes device shadow changes, FALSE: Unsubscribe
pbPayloadPOINTER TO BYTE
Pointer to the receive buffer (device shadow delta)
udiMaxPayloadSizeUDINTMaximum size of the receive buffer
eQoSQuality of service level (QoS)
sClientIdREFERENCE TO STRING(255)
0
The name of another thing. The input sClientId can be used to access device shadows of other things. if 0, then the clientId from AWSIoTClient will be used.
mQTTSubscribePropertiesREFERENCE TO MQTTSubscribeProperties
Subscribe proerties (MQTT V5 only)
udiTimeoutUDINT1000000
Time in µs in which an subcription acknowledgement (SUBACK) must be received.
Inout
awsIoTClientReference to AWSIoTClient
Output
xErrorBOOLTRUE, if an error occurred
xBusyBOOLTRUE, while is subscribed
eErrorMQTT.MQTT_ERRORError code
xReceivedBOOLTRUE, if the device shadow has been changed
xSubscribeActiveBOOLFALSE
FALSE: When there is no active subscription, TRUE: Subscriber is listening
udiPayloadSizeUDINTLength of the device shadow delta
mQTTPublishPropertiesLast received publish properties