ns=2;s=DEPRAG Smart/Network/MQTT/RemoveAll
The command terminates all active MQTT connections and removes all MQTT clients from the list of active clients.
In addition to the parameters already explained, the following variables must be created / transferred for the implementation in TwinCAT 3:
VAR
bHttpRemoveAll : BOOL;
OutputDataHttpRemoveAll : ST_VoidOutputData;
hrHttpRemoveAll : HRESULT;
fbMqtt : FB_Mqtt;
END_VAR
hrMqttRemoveAll := fbMqtt.RemoveAll(
bExecute := bMqttRemoveAll,
ConnectionHandle := depragSmartConnection.ConnectionHandle,
OutputData => OutputDataMqttRemoveAll);
IF hrMqttRemoveAll <> S_FALSE THEN
bMqttRemoveAll := FALSE;
END_IF
For examples and explanations regarding the calls of nodes via Siemens TIA Portal please refer to the sub-menu "Siemens TIA Portal" in section "Getting Started".