distortos  v0.7.0
object-oriented C++ RTOS for microcontrollers
distortos::internal::anonymous_namespace{MessageQueueBase.cpp}::PopInternalFunctor Class Reference

PopInternalFunctor class is a MessageQueueBase::InternalFunctor used for popping of elements from the queue. More...

Inheritance diagram for distortos::internal::anonymous_namespace{MessageQueueBase.cpp}::PopInternalFunctor:
[legend]
Collaboration diagram for distortos::internal::anonymous_namespace{MessageQueueBase.cpp}::PopInternalFunctor:
[legend]

Public Member Functions

constexpr PopInternalFunctor (uint8_t &priority, const QueueFunctor &functor)
 PopInternalFunctor's constructor. More...
 
void operator() (MessageQueueBase::EntryList &entryList, MessageQueueBase::FreeEntryList &freeEntryList) const override
 PushInternalFunctor's function call operator. More...
 

Private Attributes

uint8_t & priority_
 reference to variable that will be used to return priority of popped value More...
 
const QueueFunctorfunctor_
 reference to QueueFunctor which will execute actions related to popping More...
 

Detailed Description

PopInternalFunctor class is a MessageQueueBase::InternalFunctor used for popping of elements from the queue.

Constructor & Destructor Documentation

◆ PopInternalFunctor()

constexpr distortos::internal::anonymous_namespace{MessageQueueBase.cpp}::PopInternalFunctor::PopInternalFunctor ( uint8_t &  priority,
const QueueFunctor functor 
)
inline

PopInternalFunctor's constructor.

Parameters
[out]priorityis a reference to variable that will be used to return priority of popped value
[in]functoris a reference to QueueFunctor which will execute actions related to popping - it will get a pointer to storage with element

Member Function Documentation

◆ operator()()

void distortos::internal::anonymous_namespace{MessageQueueBase.cpp}::PopInternalFunctor::operator() ( MessageQueueBase::EntryList entryList,
MessageQueueBase::FreeEntryList freeEntryList 
) const
inlineoverride

PushInternalFunctor's function call operator.

Gets oldest entry with highest priority from entryList, passes the storage to functor_ and splices this (now free) entry to freeEntryList.

Parameters
[in]entryListis a reference to EntryList of MessageQueueBase
[in]freeEntryListis a reference to FreeEntryList of MessageQueueBase
Here is the call graph for this function:

Member Data Documentation

◆ functor_

const QueueFunctor& distortos::internal::anonymous_namespace{MessageQueueBase.cpp}::PopInternalFunctor::functor_
private

reference to QueueFunctor which will execute actions related to popping

◆ priority_

uint8_t& distortos::internal::anonymous_namespace{MessageQueueBase.cpp}::PopInternalFunctor::priority_
private

reference to variable that will be used to return priority of popped value


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