rotor_light
real-time C++ actor micro-framework for embedded systems, supervisable
rotor_light::ItemQueueBase Struct Reference

base class for queues. More...

#include <queue.hpp>

Inheritance diagram for rotor_light::ItemQueueBase:
rotor_light::ItemQueue< Storage, ItemsCount >

Public Member Functions

 ItemQueueBase (size_t item_size, size_t items_count)
 
 ItemQueueBase (const ItemQueueBase &)=delete
 
 ItemQueueBase (ItemQueueBase &&)=delete
 
Messagenext ()
 
template<typename MessageType , typename... Args>
MessageType * put (Args... args)
 
void release ()
 

Protected Member Functions

void post_constructor (char *buff)
 

Friends

struct Message
 

Detailed Description

base class for queues.

Item = Message

Constructor & Destructor Documentation

◆ ItemQueueBase()

rotor_light::ItemQueueBase::ItemQueueBase ( size_t  item_size,
size_t  items_count 
)

initializes queue with the message size and maximum amount of messsages

Member Function Documentation

◆ next()

Message * rotor_light::ItemQueueBase::next ( )

returns the next stored message if there is one; otherwise nullptr is returned

◆ post_constructor()

void rotor_light::ItemQueueBase::post_constructor ( char *  buff)
protected

records buffer pointer

◆ put()

template<typename MessageType , typename... Args>
MessageType * rotor_light::ItemQueueBase::put ( Args...  args)
inline

constructs in-place new message by forwarding args into message ctor.

returns pointer to the newly created message or nullptr if the queue is full

◆ release()

void rotor_light::ItemQueueBase::release ( )

deletes the last message from the queue


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