Unsubscribe

Unsubscribe 1:

This method is used by the client to signal to the broker that no further messages with the specified topic should be transferred to it.

Possible errors are output at the outputs bError and hrErrorCode of the function block instance.

Syntax

METHOD Unsubscribe : BOOL
VAR_IN_OUT
    sTopic    : STRING; // topic string (UTF-8) with any length (attend that MQTT topics are case sensitive)
END_VAR
VAR_INPUT
    pProps    : POINTER TO MqttUnsubscribeProperties; // optional
END_VAR

Unsubscribe 2: Return value

Name

Type

Description

Unsubscribe

BOOL

The method returns the return value TRUE if the call was successful.

Unsubscribe 3: Inputs

Name

Type

Description

pProps

POINTER TO MqttUnsubscribeProperties

Pointer to Unsubscribe properties to be sent.

The parameter is optional. The FB_IotMqtt5UnsubscribeProperties can be used to specify Unsubscribe properties.

Unsubscribe 4: Inputs/outputs

Name

Type

Description

sTopic

STRING

Topic for which no further messages should be received.