Get packet size and Remaining Length of an MQTT UNSUBSCRIBE packet.
This function must be called before MQTT_SerializeUnsubscribe in order to get the size of the MQTT UNSUBSCRIBE packet that is generated from the list of MQTTSubscribeInfo_t. The size of the MQTTFixedBuffer_t supplied to MQTT_SerializeUnsubscribe must be at least pPacketSize
. The provided pSubscriptionList
is valid for serialization with MQTT_SerializeUnsubscribe only if this function returns MQTTSuccess. The remaining length returned in pRemainingLength
and the packet size returned in pPacketSize
are valid only if this function returns MQTTSuccess.
[in] | pSubscriptionList | List of MQTT subscription info. |
[in] | subscriptionCount | The number of elements in pSubscriptionList. |
[out] | pRemainingLength | The Remaining Length of the MQTT UNSUBSCRIBE packet. |
[out] | pPacketSize | The total size of the MQTT UNSUBSCRIBE packet. |
Example