A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://freertos.github.io/coreMQTT-Agent/main/core__mqtt__agent__command__functions_8h.html below:

coreMQTT Agent: core_mqtt_agent_command_functions.h File Reference

Functions for processing an MQTT agent command. More...

Go to the source code of this file.

#define  MQTT_AGENT_FUNCTION_TABLE   An array of function pointers mapping command types to a function to execute. Configurable to allow a linker to remove unneeded 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.
  MQTTStatus_t  MQTTAgentCommand_Publish (MQTTAgentContext_t *pMqttAgentContext, void *pPublishArg, MQTTAgentCommandFuncReturns_t *pReturnFlags)   Function to execute for a PUBLISH command.
  MQTTStatus_t  MQTTAgentCommand_Subscribe (MQTTAgentContext_t *pMqttAgentContext, void *pVoidSubscribeArgs, MQTTAgentCommandFuncReturns_t *pReturnFlags)   Function to execute for a SUBSCRIBE command.
  MQTTStatus_t  MQTTAgentCommand_Unsubscribe (MQTTAgentContext_t *pMqttAgentContext, void *pVoidSubscribeArgs, MQTTAgentCommandFuncReturns_t *pReturnFlags)   Function to execute for an UNSUBSCRIBE command.
  MQTTStatus_t  MQTTAgentCommand_Connect (MQTTAgentContext_t *pMqttAgentContext, void *pVoidConnectArgs, MQTTAgentCommandFuncReturns_t *pReturnFlags)   Function to execute for a CONNECT command.
  MQTTStatus_t  MQTTAgentCommand_Disconnect (MQTTAgentContext_t *pMqttAgentContext, void *pUnusedArg, MQTTAgentCommandFuncReturns_t *pReturnFlags)   Function to execute for a DISCONNECT command.
  MQTTStatus_t  MQTTAgentCommand_Ping (MQTTAgentContext_t *pMqttAgentContext, void *pUnusedArg, MQTTAgentCommandFuncReturns_t *pReturnFlags)   Function to execute for a PING command.
  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.
 

Functions for processing an MQTT agent command.

◆ MQTT_AGENT_FUNCTION_TABLE #define MQTT_AGENT_FUNCTION_TABLE Value:

{ \

}

MQTTStatus_t MQTTAgentCommand_Publish(MQTTAgentContext_t *pMqttAgentContext, void *pPublishArg, MQTTAgentCommandFuncReturns_t *pReturnFlags)

Function to execute for a PUBLISH command.

Definition: core_mqtt_agent_command_functions.c:60

MQTTStatus_t MQTTAgentCommand_Ping(MQTTAgentContext_t *pMqttAgentContext, void *pUnusedArg, MQTTAgentCommandFuncReturns_t *pReturnFlags)

Function to execute for a PING command.

Definition: core_mqtt_agent_command_functions.c:202

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 co...

Definition: core_mqtt_agent_command_functions.c:224

MQTTStatus_t MQTTAgentCommand_Disconnect(MQTTAgentContext_t *pMqttAgentContext, void *pUnusedArg, MQTTAgentCommandFuncReturns_t *pReturnFlags)

Function to execute for a DISCONNECT command.

Definition: core_mqtt_agent_command_functions.c:181

MQTTStatus_t MQTTAgentCommand_Connect(MQTTAgentContext_t *pMqttAgentContext, void *pVoidConnectArgs, MQTTAgentCommandFuncReturns_t *pReturnFlags)

Function to execute for a CONNECT command.

Definition: core_mqtt_agent_command_functions.c:147

MQTTStatus_t MQTTAgentCommand_Subscribe(MQTTAgentContext_t *pMqttAgentContext, void *pVoidSubscribeArgs, MQTTAgentCommandFuncReturns_t *pReturnFlags)

Function to execute for a SUBSCRIBE command.

Definition: core_mqtt_agent_command_functions.c:91

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,...

Definition: core_mqtt_agent_command_functions.c:44

MQTTStatus_t MQTTAgentCommand_Unsubscribe(MQTTAgentContext_t *pMqttAgentContext, void *pVoidSubscribeArgs, MQTTAgentCommandFuncReturns_t *pReturnFlags)

Function to execute for an UNSUBSCRIBE command.

Definition: core_mqtt_agent_command_functions.c:119

An array of function pointers mapping command types to a function to execute. Configurable to allow a linker to remove unneeded functions.

Note
This array controls the behavior of each command. Altering the array would allow a linker to discard unused MQTT functions if desired. The size of this array MUST equal NUM_COMMANDS and the order MUST correspond to MQTTAgentCommandType_t commands if not using C99 designated initializers. If any function is desired not to be linked, it may be set to MQTTAgentCommand_ProcessLoop or a custom function matching an MQTTAgentCommandFunc_t prototype.

Default value:

{

}

@ CONNECT

Call MQTT_Connect().

Definition: core_mqtt_agent.h:57

@ DISCONNECT

Call MQTT_Disconnect().

Definition: core_mqtt_agent.h:58

@ PING

Call MQTT_Ping().

Definition: core_mqtt_agent.h:56

@ UNSUBSCRIBE

Call MQTT_Unsubscribe().

Definition: core_mqtt_agent.h:55

@ PROCESSLOOP

Call MQTT_ProcessLoop().

Definition: core_mqtt_agent.h:52

@ TERMINATE

Exit the command loop and stop processing commands.

Definition: core_mqtt_agent.h:59

@ SUBSCRIBE

Call MQTT_Subscribe().

Definition: core_mqtt_agent.h:54

@ PUBLISH

Call MQTT_Publish().

Definition: core_mqtt_agent.h:53

@ NONE

No command received. Must be zero (its memset() value).

Definition: core_mqtt_agent.h:51

◆ MQTTAgentCommandFunc_t

Function prototype for a command.

Note
These functions should only be called from within MQTTAgent_CommandLoop.
Parameters
[in] pMqttAgentContext MQTT Agent context. [in] pArgs Arguments for the command. [out] pFlags Return flags set by the function.
Returns
Return code of MQTT call.
◆ MQTTAgentCommand_ProcessLoop()

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:

Parameters
[in] pMqttAgentContext MQTT Agent context information. [in] pUnusedArg Unused NULL argument. [out] pReturnFlags Flags set to indicate actions the MQTT agent should take.
Returns
MQTTSuccess.
◆ MQTTAgentCommand_Publish() ◆ MQTTAgentCommand_Subscribe() ◆ MQTTAgentCommand_Unsubscribe() ◆ MQTTAgentCommand_Connect()

Function to execute for a CONNECT command.

This sets all return flags to false.

Parameters
[in] pMqttAgentContext MQTT Agent context information. [in] pVoidConnectArgs Arguments for MQTT_Connect(). [out] pReturnFlags Flags set to indicate actions the MQTT agent should take.
Returns
Status code of MQTT_Connect().
◆ MQTTAgentCommand_Disconnect()

Function to execute for a DISCONNECT command.

This sets the following flags to true:

Parameters
[in] pMqttAgentContext MQTT Agent context information. [in] pUnusedArg Unused NULL argument. [out] pReturnFlags Flags set to indicate actions the MQTT agent should take.
Returns
Status code of MQTT_Disconnect().
◆ MQTTAgentCommand_Ping()

Function to execute for a PING command.

This sets the following flags to true:

Parameters
[in] pMqttAgentContext MQTT Agent context information. [in] pUnusedArg Unused NULL argument. [out] pReturnFlags Flags set to indicate actions the MQTT agent should take.
Returns
Status code of MQTT_Ping().
◆ MQTTAgentCommand_Terminate()

Function to execute for a TERMINATE command. Calls MQTTAgent_CancelAll to terminate all unfinished commands with MQTTRecvFailed.

This sets the following flags to true:

Parameters
[in] pMqttAgentContext MQTT Agent context information. [in] pUnusedArg Unused NULL argument. [out] pReturnFlags Flags set to indicate actions the MQTT agent should take.
Returns
MQTTSuccess.

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4