Add a command to call MQTT_Subscribe() for an MQTT connection.
MQTTStatus_t status;
MQTTSubscribeInfo_t subscribeInfo = { 0 };
commandInfo.CmdCompleteCallback = subscribeCmdCompleteCb;
subscribeInfo.qos = Qos1;
subscribeInfo.pTopicFilter = "/foo/bar";
subscribeInfo.topicFilterLength = strlen("/foo/bar");
if( status == MQTTSuccess )
{
}
MQTTStatus_t MQTTAgent_Subscribe(const MQTTAgentContext_t *pMqttAgentContext, MQTTAgentSubscribeArgs_t *pSubscriptionArgs, const MQTTAgentCommandInfo_t *pCommandInfo)
Add a command to call MQTT_Subscribe() for an MQTT connection.
Definition core_mqtt_agent.c:1168
struct MQTTAgentCommandContext MQTTAgentCommandContext_t
Struct containing context for a specific command.
Definition core_mqtt_agent.h:83
Struct holding arguments that are common to every command.
Definition core_mqtt_agent.h:214
uint32_t blockTimeMs
Maximum block time for enqueueing the command.
Definition core_mqtt_agent.h:217
Information used by each MQTT agent. A context will be initialized by MQTTAgent_Init(),...
Definition core_mqtt_agent.h:153
Struct holding return codes and outputs from a command.
Definition core_mqtt_agent.h:71
Struct holding arguments for a SUBSCRIBE or UNSUBSCRIBE call.
Definition core_mqtt_agent.h:169
MQTTSubscribeInfo_t * pSubscribeInfo
List of MQTT subscriptions.
Definition core_mqtt_agent.h:170
size_t numSubscriptions
Number of elements in pSubscribeInfo.
Definition core_mqtt_agent.h:171