Unsubscribe
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
Return value
Name | Type | Description |
---|---|---|
Unsubscribe | BOOL | The method returns the return value TRUE if the call was successful. |
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. |
Inputs/outputs
Name | Type | Description |
---|---|---|
sTopic | STRING | Topic for which no further messages should be received. |