ns=2;s=DEPRAG Smart/Network/MQTT/RemoveClient
The command terminates the connection of a concrete MQTT client and removes it 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
bHttpRemoveClient : BOOL;
OutputDataHttpRemoveClient : ST_Int32OutputData;
hrHttpRemoveClient : HRESULT;
fbMqtt : FB_Mqtt;
END_VAR
fbMqtt.RemoveClient(
bExecute := bMqttRemoveClient,
ConnectionHandle := depragSmartConnection.ConnectionHandle,
nDeviceId := 0,
OutputData => OutputDataMqttRemoveClient);
IF hrMqttRemoveClient <> S_FALSE THEN
bMqttRemoveClient := 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".