AWS IoT Device SDK C: MQTT
MQTT 3.1.1 client library
Return to main page ↑
IotMqttSerializer_t Struct Reference

Function pointers for MQTT packet serializer overrides. More...

#include <iot_mqtt_types.h>

Data Fields

IotMqttGetPacketType_t getPacketType
 Get the MQTT packet type from a stream of bytes off the network. Default implementation: _IotMqtt_GetPacketType.
 
IotMqttGetRemainingLength_t getRemainingLength
 Get the remaining length from a stream of bytes off the network. Default implementation: _IotMqtt_GetRemainingLength.
 
IotMqttFreePacket_t freePacket
 Free a packet generated by the serializer. More...
 
struct {
   IotMqttSerializeConnect_t   connect
 CONNECT packet serializer function. More...
 
   IotMqtt_SerializePublish_t   publish
 PUBLISH packet serializer function. More...
 
   IotMqttPublishSetDup_t   publishSetDup
 Set the DUP bit in a QoS 1 PUBLISH packet. More...
 
   IotMqttSerializePuback_t   puback
 PUBACK packet serializer function. More...
 
   IotMqttSerializeSubscribe_t   subscribe
 SUBSCRIBE packet serializer function. More...
 
   IotMqttSerializeSubscribe_t   unsubscribe
 UNSUBSCRIBE packet serializer function. More...
 
   IotMqttSerializePingreq_t   pingreq
 PINGREQ packet serializer function. More...
 
   IotMqttSerializeDisconnect_t   disconnect
 DISCONNECT packet serializer function. More...
 
serialize
 Overrides the packet serialization functions for a single connection.
 
struct {
   IotMqttDeserialize_t   connack
 CONNACK packet deserializer function. More...
 
   IotMqttDeserialize_t   publish
 PUBLISH packet deserializer function. More...
 
   IotMqttDeserialize_t   puback
 PUBACK packet deserializer function. More...
 
   IotMqttDeserialize_t   suback
 SUBACK packet deserializer function. More...
 
   IotMqttDeserialize_t   unsuback
 UNSUBACK packet deserializer function. More...
 
   IotMqttDeserialize_t   pingresp
 PINGRESP packet deserializer function. More...
 
deserialize
 Overrides the packet deserialization functions for a single connection.
 

Detailed Description

Function pointers for MQTT packet serializer overrides.

These function pointers allow the MQTT serialization and deserialization functions to be overridden for an MQTT connection. The compile-time setting IOT_MQTT_ENABLE_SERIALIZER_OVERRIDES must be 1 to enable this functionality. See the IotMqttSerializer_t::serialize and IotMqttSerializer_t::deserialize members for a list of functions that can be overridden. In addition, the functions for freeing packets and determining the packet type can also be overridden. If IOT_MQTT_ENABLE_SERIALIZER_OVERRIDES is 1, the serializer initialization and cleanup functions may be extended. See documentation of IOT_MQTT_ENABLE_SERIALIZER_OVERRIDES for more information.

If any function pointers that are NULL, then the default implementation of that function will be used.

Field Documentation

◆ freePacket

IotMqttFreePacket_t IotMqttSerializer_t::freePacket

Free a packet generated by the serializer.

Default implementation: _IotMqtt_FreePacket

◆ connect

IotMqttSerializeConnect_t IotMqttSerializer_t::connect

CONNECT packet serializer function.

Default implementation: _IotMqtt_SerializeConnect

◆ publish [1/2]

IotMqtt_SerializePublish_t IotMqttSerializer_t::publish

PUBLISH packet serializer function.

Default implementation: _IotMqtt_SerializePublish

◆ publishSetDup

IotMqttPublishSetDup_t IotMqttSerializer_t::publishSetDup

Set the DUP bit in a QoS 1 PUBLISH packet.

Default implementation: _IotMqtt_PublishSetDup

◆ puback [1/2]

IotMqttSerializePuback_t IotMqttSerializer_t::puback

PUBACK packet serializer function.

Default implementation: _IotMqtt_SerializePuback

◆ subscribe

IotMqttSerializeSubscribe_t IotMqttSerializer_t::subscribe

SUBSCRIBE packet serializer function.

Default implementation: _IotMqtt_SerializeSubscribe

◆ unsubscribe

IotMqttSerializeSubscribe_t IotMqttSerializer_t::unsubscribe

UNSUBSCRIBE packet serializer function.

Default implementation: _IotMqtt_SerializeUnsubscribe

◆ pingreq

IotMqttSerializePingreq_t IotMqttSerializer_t::pingreq

PINGREQ packet serializer function.

Default implementation: _IotMqtt_SerializePingreq

◆ disconnect

IotMqttSerializeDisconnect_t IotMqttSerializer_t::disconnect

DISCONNECT packet serializer function.

Default implementation: _IotMqtt_SerializeDisconnect

◆ connack

IotMqttDeserialize_t IotMqttSerializer_t::connack

CONNACK packet deserializer function.

Default implementation: _IotMqtt_DeserializeConnack

◆ publish [2/2]

IotMqttDeserialize_t IotMqttSerializer_t::publish

PUBLISH packet deserializer function.

Default implementation: _IotMqtt_DeserializePublish

◆ puback [2/2]

IotMqttDeserialize_t IotMqttSerializer_t::puback

PUBACK packet deserializer function.

Default implementation: _IotMqtt_DeserializePuback

◆ suback

IotMqttDeserialize_t IotMqttSerializer_t::suback

SUBACK packet deserializer function.

Default implementation: _IotMqtt_DeserializeSuback

◆ unsuback

IotMqttDeserialize_t IotMqttSerializer_t::unsuback

UNSUBACK packet deserializer function.

Default implementation: _IotMqtt_DeserializeUnsuback

◆ pingresp

IotMqttDeserialize_t IotMqttSerializer_t::pingresp

PINGRESP packet deserializer function.

Default implementation: _IotMqtt_DeserializePingresp


The documentation for this struct was generated from the following file: