AWSIoTUpdateDeviceShadow (FB)

FUNCTION_BLOCK AWSIoTUpdateDeviceShadow EXTENDS CBML.ETrigTo

Function block to update 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 device shadow

udiPayloadSize

UDINT

Size of the device shadow

pbResponseState

POINTER TO BYTE

Pointer to the response state

udiMaxResposeStateSize

UDINT

Maximum size of the response state

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.

mQTTPublishProperties

REFERENCE TO MQTTPublishProperties

Optional publish properties (MQTT V5 only)

Inout

awsIoTClient

AWSIoTClient

Reference to AWSIoTClient

Output

eError

MQTT.MQTT_ERROR

Error code