distortos  v0.4.0
object-oriented C++ RTOS for microcontrollers
distortos::StaticRawMessageQueue< T, QueueSize > Class Template Reference

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

#include <StaticRawMessageQueue.hpp>

Inheritance diagram for distortos::StaticRawMessageQueue< T, QueueSize >:
[legend]
Collaboration diagram for distortos::StaticRawMessageQueue< T, QueueSize >:
[legend]

Public Member Functions

 StaticRawMessageQueue ()
 StaticRawMessageQueue'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...
 
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...
 

Private Attributes

std::array< EntryStorage, QueueSize > entryStorage_
 storage for queue's entries More...
 
std::array< ValueStorage< T >, QueueSize > valueStorage_
 storage for queue's contents 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
 

Detailed Description

template<typename T, size_t QueueSize>
class distortos::StaticRawMessageQueue< T, QueueSize >

StaticRawMessageQueue class is a variant of RawMessageQueue that has automatic storage for queue's contents.

Template Parameters
Tis the type of data in queue
QueueSizeis the maximum number of elements in queue

Constructor & Destructor Documentation

◆ StaticRawMessageQueue()

template<typename T, size_t QueueSize>
distortos::StaticRawMessageQueue< T, QueueSize >::StaticRawMessageQueue ( )
inlineexplicit

StaticRawMessageQueue's constructor.

Member Data Documentation

◆ entryStorage_

template<typename T, size_t QueueSize>
std::array<EntryStorage, QueueSize> distortos::StaticRawMessageQueue< T, QueueSize >::entryStorage_
private

storage for queue's entries

◆ valueStorage_

template<typename T, size_t QueueSize>
std::array<ValueStorage<T>, QueueSize> distortos::StaticRawMessageQueue< T, QueueSize >::valueStorage_
private

storage for queue's contents


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