MQTTc API

This section provides a reference to the µC/MQTT-client API. The following information is provided for each of those services:

  • A brief description
  • The function prototype
  • The filename of the source code
  • A description of the arguments passed to the function
  • A description of the returned values
  • Specific notes and warnings on using the service

 

Function NameDescription
MQTTc_Init()Initializes the MQTTc module.
MQTTc_ConnClr()Clear an MQTTc Connection before the first usage.
MQTTc_ConnSetParam()Set parameters related to the TCP and MQTT Client Connection.
MQTTc_ConnOpen()Open a new MQTT Client connection.
MQTTc_ConnClose()Close a MQTTc Connection.
MQTTc_MsgClr()Clear Message object members.
MQTTc_MsgSetParam()Set parameter related to a given MQTT Message.
MQTTc_Connect()Send a 'Connect' message to MQTT server.
MQTTc_Publish()Send a 'Publish' message to MQTT server.
MQTTc_Subscribe()Send a 'Subscribe' message to MQTT server.
MQTTc_SubscribeMult()Send a 'Subscribe' message containing multiple topics to MQTT server.
MQTTc_Unsubscribe()Send a 'Unsubscribe' message to MQTT server.
MQTTc_UnsubscribeMult()Send a 'Unsubscribe' message for multiple topics to MQTT server.
MQTTc_PingReq()Send a 'PingReq' message to MQTT server.
MQTTc_Disconnect()Send a 'Disconnect' message to MQTT server.
MQTT-client Callback Functions Types
MQTTc_CMPL_CALLBACKCallback called when a user-requested operation completes.
MQTTc_PUBLISH_RX_CALLBACKCallback called when a PUBLISH message is received from the server.