distortos  v0.7.0
object-oriented C++ RTOS for microcontrollers
distortos::DynamicRawMessageQueue Class Reference

DynamicRawMessageQueue class is a variant of RawMessageQueue that has dynamic storage for queue's contents. More...

#include "distortos/DynamicRawMessageQueue.hpp"

Inheritance diagram for distortos::DynamicRawMessageQueue:
[legend]
Collaboration diagram for distortos::DynamicRawMessageQueue:
[legend]

Public Member Functions

 DynamicRawMessageQueue (size_t elementSize, size_t queueSize)
 DynamicRawMessageQueue's constructor. More...
 
- Public Member Functions inherited from distortos::RawMessageQueue
 RawMessageQueue (EntryStorageUniquePointer &&entryStorageUniquePointer, ValueStorageUniquePointer &&valueStorageUniquePointer, size_t elementSize, size_t maxElements)
 RawMessageQueue's constructor. More...
 
size_t getCapacity () const
 
size_t getElementSize () const
 
int pop (uint8_t &priority, void *buffer, size_t size)
 Pops oldest element with highest priority from the queue. More...
 
template<typename T >
int pop (uint8_t &priority, T &buffer)
 Pops oldest element with highest priority from the queue. More...
 
int push (uint8_t priority, const void *data, size_t size)
 Pushes the element to the queue. More...
 
template<typename T >
int push (const uint8_t priority, const T &data)
 Pushes the element to the queue. More...
 
int tryPop (uint8_t &priority, void *buffer, size_t size)
 Tries to pop the oldest element with highest priority from the queue. More...
 
template<typename T >
int tryPop (uint8_t &priority, T &buffer)
 Tries to pop the oldest element with highest priority from the queue. More...
 
int tryPopFor (TickClock::duration duration, uint8_t &priority, void *buffer, size_t size)
 Tries to pop the oldest element with highest priority from the queue for a given duration of time. More...
 
template<typename Rep , typename Period >
int tryPopFor (const std::chrono::duration< Rep, Period > duration, uint8_t &priority, void *const buffer, const size_t size)
 Tries to pop the oldest element with highest priority from the queue for a given duration of time. More...
 
template<typename Rep , typename Period , typename T >
int tryPopFor (const std::chrono::duration< Rep, Period > duration, uint8_t &priority, T &buffer)
 Tries to pop the oldest element with highest priority from the queue for a given duration of time. More...
 
int tryPopUntil (TickClock::time_point timePoint, uint8_t &priority, void *buffer, size_t size)
 Tries to pop the oldest element with highest priority from the queue until a given time point. More...
 
template<typename Duration >
int tryPopUntil (const std::chrono::time_point< TickClock, Duration > timePoint, uint8_t &priority, void *const buffer, const size_t size)
 Tries to pop the oldest element with highest priority from the queue until a given time point. More...
 
template<typename Duration , typename T >
int tryPopUntil (const std::chrono::time_point< TickClock, Duration > timePoint, uint8_t &priority, T &buffer)
 Tries to pop the oldest element with highest priority from the queue until a given time point. More...
 
int tryPush (uint8_t priority, const void *data, size_t size)
 Tries to push the element to the queue. More...
 
template<typename T >
int tryPush (const uint8_t priority, const T &data)
 Tries to push the element to the queue. More...
 
int tryPushFor (TickClock::duration duration, uint8_t priority, const void *data, size_t size)
 Tries to push the element to the queue for a given duration of time. More...
 
template<typename Rep , typename Period >
int tryPushFor (const std::chrono::duration< Rep, Period > duration, const uint8_t priority, const void *const data, const size_t size)
 Tries to push the element to the queue for a given duration of time. More...
 
template<typename Rep , typename Period , typename T >
int tryPushFor (const std::chrono::duration< Rep, Period > duration, const uint8_t priority, const T &data)
 Tries to push the element to the queue for a given duration of time. More...
 
int tryPushUntil (TickClock::time_point timePoint, uint8_t priority, const void *data, size_t size)
 Tries to push the element to the queue until a given time point. More...
 
template<typename Duration >
int tryPushUntil (const std::chrono::time_point< TickClock, Duration > timePoint, const uint8_t priority, const void *const data, const size_t size)
 Tries to push the element to the queue until a given time point. More...
 
template<typename Duration , typename T >
int tryPushUntil (const std::chrono::time_point< TickClock, Duration > timePoint, const uint8_t priority, const T &data)
 Tries to push the element to the queue until a given time point. More...
 

Additional Inherited Members

- Public Types inherited from distortos::RawMessageQueue
using EntryStorage = internal::MessageQueueBase::EntryStorage
 type of uninitialized storage for Entry with link More...
 
using EntryStorageUniquePointer = internal::MessageQueueBase::EntryStorageUniquePointer
 import EntryStorageUniquePointer type from internal::MessageQueueBase class More...
 
template<typename T >
using ValueStorage = internal::MessageQueueBase::ValueStorage< T >
 
using ValueStorageUniquePointer = internal::MessageQueueBase::ValueStorageUniquePointer
 unique_ptr (with deleter) to storage for value More...
 

Detailed Description

DynamicRawMessageQueue class is a variant of RawMessageQueue that has dynamic storage for queue's contents.

Constructor & Destructor Documentation

◆ DynamicRawMessageQueue()

distortos::DynamicRawMessageQueue::DynamicRawMessageQueue ( size_t  elementSize,
size_t  queueSize 
)

DynamicRawMessageQueue's constructor.

Parameters
[in]elementSizeis the size of single queue element, bytes
[in]queueSizeis the maximum number of elements in queue

The documentation for this class was generated from the following files: