ns=2;s=DEPRAG Smart/Network/MQTT/ActiveClients/0/PendingApplicationMessagesCount
Number of messages not yet transmitted in the local buffer memory. The messages still have to be transferred to the MQTT broker.
In addition to the parameters already explained, the following variables must be created / transferred for the implementation in TwinCAT 3:
VAR
bMqttReadPendingApplicationMessageCount : BOOL;
OutputMqttReadPendingApplicationMessageCount : DINT;
hrMqttReadPendingApplicationMessageCount : HRESULT;
fbMqtt : FB_Mqtt;
END_VAR
hrMqttReadPendingApplicationMessageCount := fbMqtt.ReadPendingApplicationMessageCount(
bExecute := bMqttReadPendingApplicationMessageCount,
ConnectionHandle := depragSmartConnection.ConnectionHandle,
ClientId := '0',
Output => OutputMqttReadPendingApplicationMessageCount);
IF hrMqttReadPendingApplicationMessageCount <> S_FALSE THEN
bMqttReadPendingApplicationMessageCount := 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".