Serialize an MQTT PINGREQ packet into the given buffer.
The input MQTTFixedBuffer_t.size must be at least as large as the size returned by MQTT_GetPingreqPacketSize.
- Parameters
-
[out] | pFixedBuffer | Buffer for packet serialization. |
- Returns
- MQTTNoMemory if pFixedBuffer is too small to hold the MQTT packet; MQTTBadParameter if invalid parameters are passed; MQTTSuccess otherwise.
Example
uint8_t buffer[ BUFFER_SIZE ];
fixedBuffer.
size = BUFFER_SIZE;
assert( packetSize <= BUFFER_SIZE );
{
}