A Queue that can be used in an zephyr thread to receive fixed size messages.
More...
#include <Imt.Base.OS.Zephyr/Queue.h>
template<typename MessageType, const size_t QueueSize>
class imt::base::os::zephyr::Queue< MessageType, QueueSize >
A Queue that can be used in an zephyr thread to receive fixed size messages.
This template is used to create a queue of the required size in the context of the thread.
◆ Queue()
template<typename MessageType , const size_t MailboxSize>
Constructor.
- Parameters
-
pHandle | The OS handle for the queue. |
◆ ~Queue()
template<typename MessageType , const size_t MailboxSize>
◆ clear()
template<typename MessageType , const size_t MailboxSize>
Removes all messages from the queue.
◆ deinitialize()
template<typename MessageType , const size_t MailboxSize>
◆ getMail()
template<typename MessageType , const size_t MailboxSize>
Gets the next message from the queue.
This removes the message from the queue. If the queue is empty the task will be suspended until the queue contains a message.
- Returns
- The received message.
◆ getMailConditional()
template<typename MessageType , const size_t MailboxSize>
Gets the next message from the queue.
This removes the message from the queue. If the queue is empty the method will return false but not suspend the task.
- Parameters
-
- Returns
- False if there is no message, true if there is one.
◆ getWaitingMails()
template<typename MessageType , const size_t MailboxSize>
Gets the number of mails in this queue.
- Returns
- The number of mails in the queue
◆ initialize()
template<typename MessageType , const size_t MailboxSize>
Init the queue.
Must be called before using any other method.
◆ putMail()
template<typename MessageType , const size_t MailboxSize>
Adds a message to the queue.
This can be used from any task. If the queue is full the task will be suspended until the queue can hold the new message. The data is copied.
- Parameters
-
message | The message to put into the queue |
◆ putMailConditional()
template<typename MessageType , const size_t MailboxSize>
Adds a message to the queue.
This can be used from any task or interrupt handler. If the queue is full the mthod returns false but task will not be suspended. The data is copied.
- Parameters
-
message | The message to put into the queue. |
- Returns
- False if there is no space left for the message, true otherwise.
The documentation for this class was generated from the following file:
- D:/_Work/10/s/Imt.Base/Imt.Base.OS.Zephyr/Queue.h