Add a command to call MQTT_Publish() for an MQTT connection.
MQTTStatus_t status;
MQTTPublishInfo_t publishInfo = { 0 };
publishInfo.qos = MQTTQoS1;
publishInfo.pTopicName = "/some/topic/name";
publishInfo.topicNameLength = strlen( publishInfo.pTopicName );
publishInfo.pPayload = "Hello World!";
publishInfo.payloadLength = strlen( "Hello World!" );
if( status == MQTTSuccess )
{
}
MQTTStatus_t MQTTAgent_Publish(const MQTTAgentContext_t *pMqttAgentContext, MQTTAgentPublishArgs_t *pPublishArgs, const MQTTAgentCommandInfo_t *pCommandInfo)
Add a command to call MQTT_Publish() for an MQTT connection.
Definition core_mqtt_agent.c:1218
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
MQTTAgentCommandCallback_t cmdCompleteCallback
Callback to invoke upon completion.
Definition core_mqtt_agent.h:215
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