Serialize an MQTT SUBSCRIBE packet in the given buffer.
MQTT_GetSubscribePacketSize should be called with pSubscriptionList
before invoking this function to get the size of the required MQTTFixedBuffer_t and remainingLength
. The remainingLength
must be the same as returned by MQTT_GetSubscribePacketSize. The MQTTFixedBuffer_t must be at least as large as the size returned by MQTT_GetSubscribePacketSize.
[in] | pSubscriptionList | List of MQTT subscription info. |
[in] | subscriptionCount | The number of elements in pSubscriptionList. |
[in] | packetId | packet ID generated by MQTT_GetPacketId. |
[in] | remainingLength | Remaining Length provided by MQTT_GetSubscribePacketSize. |
[out] | pFixedBuffer | Buffer for packet serialization. |
Example