mn::queue::basic_work_queue_single Class Reference

#include <mn_workqueue_single.hpp>

+ Inheritance diagram for mn::queue::basic_work_queue_single:
+ Collaboration diagram for mn::queue::basic_work_queue_single:

Public Member Functions

 basic_work_queue_single (basic_task::priority uiPriority=MN_THREAD_CONFIG_WORKQUEUE_SINGLE_PRIORITY, uint16_t usStackDepth=MN_THREAD_CONFIG_WORKQUEUE_SINGLE_STACKSIZE, uint8_t uiMaxWorkItems=MN_THREAD_CONFIG_WORKQUEUE_SINGLE_MAXITEMS)
 
 ~basic_work_queue_single ()
 
- Public Member Functions inherited from mn::queue::basic_work_queue
 basic_work_queue (basic_task::priority uiPriority, uint16_t usStackDepth, uint8_t uiMaxWorkItems)
 
virtual ~basic_work_queue ()
 
virtual int create (int iCore=MN_THREAD_CONFIG_DEFAULT_WORKQUEUE_CORE)
 
virtual void destroy ()
 
virtual int queue (work_queue_item_t *work, unsigned int timeout=MN_THREAD_CONFIG_TIMEOUT_QUEUE_DEFAULT)
 
volatile bool & running ()
 
uint8_t get_num_items_worked ()
 
uint8_t get_num_items_error ()
 
bool is_ready ()
 

Protected Member Functions

int create_engine (int iCore)
 
void destroy_engine ()
 
- Protected Member Functions inherited from mn::queue::basic_work_queue
virtual work_queue_itemget_next_item (unsigned int timeout)
 

Private Attributes

work_queue_taskm_pWorker
 

Additional Inherited Members

- Protected Attributes inherited from mn::queue::basic_work_queue
queue_tm_pWorkItemQueue
 
mutex_t m_ThreadStatus
 
mutex_t m_ThreadJob
 
basic_task::priority m_uiPriority
 
uint16_t m_usStackDepth
 
uint8_t m_uiMaxWorkItems
 
volatile uint8_t m_uiNumWorks
 
volatile uint8_t m_uiErrorsNumWorks
 
volatile bool m_bRunning
 

Detailed Description

This class is the single tasked "engine" for work_queue_items.

Constructor & Destructor Documentation

◆ basic_work_queue_single()

mn::queue::basic_work_queue_single::basic_work_queue_single ( basic_task::priority  uiPriority = MN_THREAD_CONFIG_WORKQUEUE_SINGLE_PRIORITY,
uint16_t  usStackDepth = MN_THREAD_CONFIG_WORKQUEUE_SINGLE_STACKSIZE,
uint8_t  uiMaxWorkItems = MN_THREAD_CONFIG_WORKQUEUE_SINGLE_MAXITEMS 
)

Our constructor.

Parameters
uiPriorityFreeRTOS priority of this Thread.
usStackDepthNumber of "words" allocated for the Thread stack.
uiMaxWorkItemsMaximum number of WorkItems this WorkQueue can hold.

◆ ~basic_work_queue_single()

mn::queue::basic_work_queue_single::~basic_work_queue_single ( )

Our destructor.

Member Function Documentation

◆ create_engine()

int mn::queue::basic_work_queue_single::create_engine ( int  iCore)
protectedvirtual

Create the work_queue_t.

Parameters
iCorerun on whith core
Returns
- ERR_WORKQUEUE_OK The engine is creat
  • ERR_WORKQUEUE_ALREADYINIT The engine is allready created
  • ERR_WORKQUEUE_CANTCREATE The engine can not creat

Implements mn::queue::basic_work_queue.

◆ destroy_engine()

void mn::queue::basic_work_queue_single::destroy_engine ( )
protectedvirtual

Destroy the work_queue_t.

Implements mn::queue::basic_work_queue.

Member Data Documentation

◆ m_pWorker

work_queue_task* mn::queue::basic_work_queue_single::m_pWorker
private

Pointer to our WorkerThread.


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