Skip to content

Conversation

muneebahmed10
Copy link
Contributor

Description:
Adds a section to the README that describes the platform-dependent features needed when implementing the messaging interface.

n9wxu
n9wxu previously approved these changes Jul 23, 2021
yourslab
yourslab previously approved these changes Jul 23, 2021
archigup
archigup previously approved these changes Jul 23, 2021
README.md Outdated

| Function Pointer | Description |
| :-: | --- |
| `MQTTAgentMessageSend_t` | A function that sends `MQTTAgentCommand_t *` pointers to be received by `MQTTAgent_CommandLoop`. This can be implemented by pushing to a thread safe queue. |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of providing the MQTTAgentCommand_t *, wouldn't it be easier for a reader to mention just generically that this function enables commands to be sent to a thread-safe queue. Similarly, for the MQTTAgentMessageRecv_t function, it can say that it enabled commands to be reach from a thread-safe queue

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought it's better to be more specific here since MQTTAgentCommand_t * is part of the function prototype, so they will be dealing with it when implementing the function.

@muneebahmed10 muneebahmed10 dismissed stale reviews from archigup, yourslab, and n9wxu via d699d33 July 23, 2021 02:06
README.md Outdated
| :-: | --- |
| `MQTTAgentMessageSend_t` | A function that sends `MQTTAgentCommand_t *` pointers to be received by `MQTTAgent_CommandLoop`. This can be implemented by pushing to a thread safe queue. |
| `MQTTAgentMessageRecv_t` | A function used by `MQTTAgent_CommandLoop` to receive `MQTTAgentCommand_t *` that were sent by API functions. This can be implemented by receiving from a thread safe queue. |
| `MQTTAgentCommandGet_t` | A function that returns a pointer to an allocated `MQTTAgentCommand_t` structure, to be used for information and arguments for a command to be executed by `MQTTAgent_CommandLoop()`. If using dynamic memory, this can be implemented using `malloc()`. |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| `MQTTAgentCommandGet_t` | A function that returns a pointer to an allocated `MQTTAgentCommand_t` structure, to be used for information and arguments for a command to be executed by `MQTTAgent_CommandLoop()`. If using dynamic memory, this can be implemented using `malloc()`. |
| `MQTTAgentCommandGet_t` | A function that returns a pointer to an allocated command object (of `MQTTAgentCommand_t` type) that is executed by the MQTT Agent command loop. If using dynamic memory, this can be implemented using `malloc()`. |

@muneebahmed10 muneebahmed10 merged commit 0185515 into FreeRTOS:main Jul 23, 2021
@muneebahmed10 muneebahmed10 deleted the update-readme branch July 23, 2021 16:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants