Implements functions to process MQTT agent commands. More...
#include <string.h>
#include <stdio.h>
#include <assert.h>
#include "core_mqtt_agent.h"
#include "core_mqtt_agent_command_functions.h"
#include "core_mqtt_agent_default_logging.h"
Functions | |
MQTTStatus_t | MQTTAgentCommand_ProcessLoop (MQTTAgentContext_t *pMqttAgentContext, void *pUnusedArg, MQTTAgentCommandFuncReturns_t *pReturnFlags) |
Function to execute for a NONE command. This function does not call MQTT_ProcessLoop itself, but instead sets a flag to indicate it should be called. More... | |
MQTTStatus_t | MQTTAgentCommand_Publish (MQTTAgentContext_t *pMqttAgentContext, void *pPublishArg, MQTTAgentCommandFuncReturns_t *pReturnFlags) |
Function to execute for a PUBLISH command. More... | |
MQTTStatus_t | MQTTAgentCommand_Subscribe (MQTTAgentContext_t *pMqttAgentContext, void *pVoidSubscribeArgs, MQTTAgentCommandFuncReturns_t *pReturnFlags) |
Function to execute for a SUBSCRIBE command. More... | |
MQTTStatus_t | MQTTAgentCommand_Unsubscribe (MQTTAgentContext_t *pMqttAgentContext, void *pVoidSubscribeArgs, MQTTAgentCommandFuncReturns_t *pReturnFlags) |
Function to execute for an UNSUBSCRIBE command. More... | |
MQTTStatus_t | MQTTAgentCommand_Connect (MQTTAgentContext_t *pMqttAgentContext, void *pVoidConnectArgs, MQTTAgentCommandFuncReturns_t *pReturnFlags) |
Function to execute for a CONNECT command. More... | |
MQTTStatus_t | MQTTAgentCommand_Disconnect (MQTTAgentContext_t *pMqttAgentContext, void *pUnusedArg, MQTTAgentCommandFuncReturns_t *pReturnFlags) |
Function to execute for a DISCONNECT command. More... | |
MQTTStatus_t | MQTTAgentCommand_Ping (MQTTAgentContext_t *pMqttAgentContext, void *pUnusedArg, MQTTAgentCommandFuncReturns_t *pReturnFlags) |
Function to execute for a PING command. More... | |
MQTTStatus_t | MQTTAgentCommand_Terminate (MQTTAgentContext_t *pMqttAgentContext, void *pUnusedArg, MQTTAgentCommandFuncReturns_t *pReturnFlags) |
Function to execute for a TERMINATE command. Calls MQTTAgent_CancelAll to terminate all unfinished commands with MQTTRecvFailed. More... | |
Implements functions to process MQTT agent commands.
MQTTStatus_t MQTTAgentCommand_ProcessLoop | ( | MQTTAgentContext_t * | pMqttAgentContext, |
void * | pUnusedArg, | ||
MQTTAgentCommandFuncReturns_t * | pReturnFlags | ||
) |
Function to execute for a NONE command. This function does not call MQTT_ProcessLoop itself, but instead sets a flag to indicate it should be called.
This sets the following flags to true
:
[in] | pMqttAgentContext | MQTT Agent context information. |
[in] | pUnusedArg | Unused NULL argument. |
[out] | pReturnFlags | Flags set to indicate actions the MQTT agent should take. |
MQTTStatus_t MQTTAgentCommand_Publish | ( | MQTTAgentContext_t * | pMqttAgentContext, |
void * | pPublishArg, | ||
MQTTAgentCommandFuncReturns_t * | pReturnFlags | ||
) |
Function to execute for a PUBLISH command.
This sets the following flags to true
:
[in] | pMqttAgentContext | MQTT Agent context information. |
[in] | pPublishArg | Publish information for MQTT_Publish(). |
[out] | pReturnFlags | Flags set to indicate actions the MQTT agent should take. |
MQTTStatus_t MQTTAgentCommand_Subscribe | ( | MQTTAgentContext_t * | pMqttAgentContext, |
void * | pVoidSubscribeArgs, | ||
MQTTAgentCommandFuncReturns_t * | pReturnFlags | ||
) |
Function to execute for a SUBSCRIBE command.
This sets the following flags to true
:
[in] | pMqttAgentContext | MQTT Agent context information. |
[in] | pVoidSubscribeArgs | Arguments for MQTT_Subscribe(). |
[out] | pReturnFlags | Flags set to indicate actions the MQTT agent should take. |
MQTTStatus_t MQTTAgentCommand_Unsubscribe | ( | MQTTAgentContext_t * | pMqttAgentContext, |
void * | pVoidSubscribeArgs, | ||
MQTTAgentCommandFuncReturns_t * | pReturnFlags | ||
) |
Function to execute for an UNSUBSCRIBE command.
This sets the following flags to true
:
[in] | pMqttAgentContext | MQTT Agent context information. |
[in] | pVoidSubscribeArgs | Arguments for MQTT_Unsubscribe(). |
[out] | pReturnFlags | Flags set to indicate actions the MQTT agent should take. |
MQTTStatus_t MQTTAgentCommand_Connect | ( | MQTTAgentContext_t * | pMqttAgentContext, |
void * | pVoidConnectArgs, | ||
MQTTAgentCommandFuncReturns_t * | pReturnFlags | ||
) |
Function to execute for a CONNECT command.
This sets all return flags to false
.
[in] | pMqttAgentContext | MQTT Agent context information. |
[in] | pVoidConnectArgs | Arguments for MQTT_Connect(). |
[out] | pReturnFlags | Flags set to indicate actions the MQTT agent should take. |
MQTTStatus_t MQTTAgentCommand_Disconnect | ( | MQTTAgentContext_t * | pMqttAgentContext, |
void * | pUnusedArg, | ||
MQTTAgentCommandFuncReturns_t * | pReturnFlags | ||
) |
Function to execute for a DISCONNECT command.
This sets the following flags to true
:
[in] | pMqttAgentContext | MQTT Agent context information. |
[in] | pUnusedArg | Unused NULL argument. |
[out] | pReturnFlags | Flags set to indicate actions the MQTT agent should take. |
MQTTStatus_t MQTTAgentCommand_Ping | ( | MQTTAgentContext_t * | pMqttAgentContext, |
void * | pUnusedArg, | ||
MQTTAgentCommandFuncReturns_t * | pReturnFlags | ||
) |
Function to execute for a PING command.
This sets the following flags to true
:
[in] | pMqttAgentContext | MQTT Agent context information. |
[in] | pUnusedArg | Unused NULL argument. |
[out] | pReturnFlags | Flags set to indicate actions the MQTT agent should take. |
MQTTStatus_t MQTTAgentCommand_Terminate | ( | MQTTAgentContext_t * | pMqttAgentContext, |
void * | pUnusedArg, | ||
MQTTAgentCommandFuncReturns_t * | pReturnFlags | ||
) |
Function to execute for a TERMINATE command. Calls MQTTAgent_CancelAll to terminate all unfinished commands with MQTTRecvFailed.
This sets the following flags to true
:
[in] | pMqttAgentContext | MQTT Agent context information. |
[in] | pUnusedArg | Unused NULL argument. |
[out] | pReturnFlags | Flags set to indicate actions the MQTT agent should take. |