distortos  v0.4.0
object-oriented C++ RTOS for microcontrollers
distortos::test::MessageQueueWrapper Class Reference

implementation of QueueWrapper for MessageQueue More...

#include <QueueWrappers.hpp>

Inheritance diagram for distortos::test::MessageQueueWrapper:
[legend]
Collaboration diagram for distortos::test::MessageQueueWrapper:
[legend]

Public Types

using TestMessageQueue = MessageQueue< OperationCountingType >
 MessageQueue with OperationCountingType. More...
 

Public Member Functions

constexpr MessageQueueWrapper (TestMessageQueue &messageQueue)
 MessageQueueWrapper's constructor. More...
 
bool check (uint8_t priority1, const OperationCountingType &value1, uint8_t priority2, const OperationCountingType &value2) const override
 Tests whether pushed and popped data match. More...
 
int emplace (uint8_t priority, OperationCountingType::Value value={}) const override
 Wrapper for MessageQueue::emplace() More...
 
int pop (uint8_t &priority, OperationCountingType &value) const override
 Wrapper for MessageQueue::pop() More...
 
int push (uint8_t priority, const OperationCountingType &value) const override
 Wrapper for MessageQueue::push(..., const OperationCountingType&) More...
 
int push (uint8_t priority, OperationCountingType &&value) const override
 Wrapper for MessageQueue::push(..., OperationCountingType&&) More...
 
int tryEmplace (uint8_t priority, OperationCountingType::Value value={}) const override
 Wrapper for MessageQueue::tryEmplace() More...
 
int tryEmplaceFor (TickClock::duration duration, uint8_t priority, OperationCountingType::Value value={}) const override
 Wrapper for MessageQueue::tryEmplaceFor() More...
 
int tryEmplaceUntil (TickClock::time_point timePoint, uint8_t priority, OperationCountingType::Value value={}) const override
 Wrapper for MessageQueue::tryEmplaceUntil() More...
 
int tryPop (uint8_t &priority, OperationCountingType &value) const override
 Wrapper for MessageQueue::tryPop() More...
 
int tryPopFor (TickClock::duration duration, uint8_t &priority, OperationCountingType &value) const override
 Wrapper for MessageQueue::tryPopFor() More...
 
int tryPopUntil (TickClock::time_point timePoint, uint8_t &priority, OperationCountingType &value) const override
 Wrapper for MessageQueue::tryPopUntil() More...
 
int tryPush (uint8_t priority, const OperationCountingType &value) const override
 Wrapper for MessageQueue::tryPush(..., const OperationCountingType&) More...
 
int tryPush (uint8_t priority, OperationCountingType &&value) const override
 Wrapper for MessageQueue::tryPush(..., OperationCountingType&&) More...
 
int tryPushFor (TickClock::duration duration, uint8_t priority, const OperationCountingType &value) const override
 Wrapper for MessageQueue::tryPushFor(..., const OperationCountingType&) More...
 
int tryPushFor (TickClock::duration duration, uint8_t priority, OperationCountingType &&value) const override
 Wrapper for MessageQueue::tryPushFor(..., OperationCountingType&&) More...
 
int tryPushUntil (TickClock::time_point timePoint, uint8_t priority, const OperationCountingType &value) const override
 Wrapper for MessageQueue::tryPushUntil(..., const OperationCountingType&) More...
 
int tryPushUntil (TickClock::time_point timePoint, uint8_t priority, OperationCountingType &&value) const override
 Wrapper for MessageQueue::tryPushUntil(..., OperationCountingType&&) More...
 
- Public Member Functions inherited from distortos::test::NonRawQueueWrapper
bool checkCounters (size_t constructed, size_t copyConstructed, size_t moveConstructed, size_t destructed, size_t copyAssigned, size_t moveAssigned, size_t swapped) const override
 Wrapper for OperationCountingType::checkCounters(). More...
 
- Public Member Functions inherited from distortos::test::QueueWrapper
virtual ~QueueWrapper ()=0
 QueueWrapper's destructor. More...
 

Private Attributes

TestMessageQueuemessageQueue_
 reference to wrapped TestMessageQueue object More...
 

Detailed Description

implementation of QueueWrapper for MessageQueue

Member Typedef Documentation

◆ TestMessageQueue

Constructor & Destructor Documentation

◆ MessageQueueWrapper()

constexpr distortos::test::MessageQueueWrapper::MessageQueueWrapper ( TestMessageQueue messageQueue)
inlineexplicit

MessageQueueWrapper's constructor.

Parameters
[in]messageQueueis a reference to wrapped TestMessageQueue object
Here is the call graph for this function:

Member Function Documentation

◆ check()

bool distortos::test::MessageQueueWrapper::check ( uint8_t  priority1,
const OperationCountingType value1,
uint8_t  priority2,
const OperationCountingType value2 
) const
overridevirtual

Tests whether pushed and popped data match.

Parameters
[in]priority1is the priority used for push() or emplace()
[in]value1is a reference to OperationCountingType object used for push() or emplace()
[in]priority2is the priority returned by pop()
[in]value2is a reference to OperationCountingType object returned by pop()
Returns
true if pushed and popped data matches, false otherwise

Implements distortos::test::QueueWrapper.

◆ emplace()

int distortos::test::MessageQueueWrapper::emplace ( uint8_t  priority,
OperationCountingType::Value  value = {} 
) const
overridevirtual

◆ pop()

int distortos::test::MessageQueueWrapper::pop ( uint8_t &  priority,
OperationCountingType value 
) const
overridevirtual

Wrapper for MessageQueue::pop()

Implements distortos::test::QueueWrapper.

Here is the caller graph for this function:

◆ push() [1/2]

int distortos::test::MessageQueueWrapper::push ( uint8_t  priority,
const OperationCountingType value 
) const
overridevirtual

Wrapper for MessageQueue::push(..., const OperationCountingType&)

Implements distortos::test::QueueWrapper.

Here is the caller graph for this function:

◆ push() [2/2]

int distortos::test::MessageQueueWrapper::push ( uint8_t  priority,
OperationCountingType &&  value 
) const
overridevirtual

◆ tryEmplace()

int distortos::test::MessageQueueWrapper::tryEmplace ( uint8_t  priority,
OperationCountingType::Value  value = {} 
) const
overridevirtual

◆ tryEmplaceFor()

int distortos::test::MessageQueueWrapper::tryEmplaceFor ( TickClock::duration  duration,
uint8_t  priority,
OperationCountingType::Value  value = {} 
) const
overridevirtual

◆ tryEmplaceUntil()

int distortos::test::MessageQueueWrapper::tryEmplaceUntil ( TickClock::time_point  timePoint,
uint8_t  priority,
OperationCountingType::Value  value = {} 
) const
overridevirtual

◆ tryPop()

int distortos::test::MessageQueueWrapper::tryPop ( uint8_t &  priority,
OperationCountingType value 
) const
overridevirtual

Wrapper for MessageQueue::tryPop()

Implements distortos::test::QueueWrapper.

Here is the caller graph for this function:

◆ tryPopFor()

int distortos::test::MessageQueueWrapper::tryPopFor ( TickClock::duration  duration,
uint8_t &  priority,
OperationCountingType value 
) const
overridevirtual

Wrapper for MessageQueue::tryPopFor()

Implements distortos::test::QueueWrapper.

Here is the caller graph for this function:

◆ tryPopUntil()

int distortos::test::MessageQueueWrapper::tryPopUntil ( TickClock::time_point  timePoint,
uint8_t &  priority,
OperationCountingType value 
) const
overridevirtual

Wrapper for MessageQueue::tryPopUntil()

Implements distortos::test::QueueWrapper.

Here is the caller graph for this function:

◆ tryPush() [1/2]

int distortos::test::MessageQueueWrapper::tryPush ( uint8_t  priority,
const OperationCountingType value 
) const
overridevirtual

Wrapper for MessageQueue::tryPush(..., const OperationCountingType&)

Implements distortos::test::QueueWrapper.

Here is the caller graph for this function:

◆ tryPush() [2/2]

int distortos::test::MessageQueueWrapper::tryPush ( uint8_t  priority,
OperationCountingType &&  value 
) const
overridevirtual

◆ tryPushFor() [1/2]

int distortos::test::MessageQueueWrapper::tryPushFor ( TickClock::duration  duration,
uint8_t  priority,
const OperationCountingType value 
) const
overridevirtual

Wrapper for MessageQueue::tryPushFor(..., const OperationCountingType&)

Implements distortos::test::QueueWrapper.

Here is the caller graph for this function:

◆ tryPushFor() [2/2]

int distortos::test::MessageQueueWrapper::tryPushFor ( TickClock::duration  duration,
uint8_t  priority,
OperationCountingType &&  value 
) const
overridevirtual

◆ tryPushUntil() [1/2]

int distortos::test::MessageQueueWrapper::tryPushUntil ( TickClock::time_point  timePoint,
uint8_t  priority,
const OperationCountingType value 
) const
overridevirtual

Wrapper for MessageQueue::tryPushUntil(..., const OperationCountingType&)

Implements distortos::test::QueueWrapper.

Here is the caller graph for this function:

◆ tryPushUntil() [2/2]

int distortos::test::MessageQueueWrapper::tryPushUntil ( TickClock::time_point  timePoint,
uint8_t  priority,
OperationCountingType &&  value 
) const
overridevirtual

Member Data Documentation

◆ messageQueue_

TestMessageQueue& distortos::test::MessageQueueWrapper::messageQueue_
private

reference to wrapped TestMessageQueue object


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