AWSIoTGetDeviceShadow (FB)

FUNCTION_BLOCK AWSIoTGetDeviceShadow EXTENDS CBML.ETrigTo

Function block to read the device shadow of the connected device.

InOut:

Scope

Name

Type

Initial

Comment

Inherited from

Input

xExecute

BOOL

Rising edge: Starts defined operation
FALSE: Resets the defined operation after ready condition was reached

ETrigTo

udiTimeOut

UDINT

Max. operating time for executing [µs], 0: No operating time limit

ETrigTo

Output

xDone

BOOL

Ready condition reached

ETrigTo

xBusy

BOOL

Operation is running

ETrigTo

xError

BOOL

Error condition reached

ETrigTo

Input

pbPayload

POINTER TO BYTE

Pointer to the receive buffer (device shadow)

udiMaxPayloadSize

UDINT

Maximum size of the receive buffer

eQoS

QOS

Quality of service level (QoS)

sClientId

REFERENCE 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.

Inout

awsIoTClient

AWSIoTClient

Reference to AWSIoTClient

Output

eError

MQTT.MQTT_ERROR

Error code

udiPayloadSize

UDINT

Length of the device shadow

mQTTPublishProperties

MQTTPublishProperties

Last received publish properties