mn::queue::basic_work_queue_multi Class Reference
#include <mn_workqueue_multi.hpp>
Inheritance diagram for mn::queue::basic_work_queue_multi:
Collaboration diagram for mn::queue::basic_work_queue_multi:
Public Member Functions | |
basic_work_queue_multi (basic_task::priority uiPriority=MN_THREAD_CONFIG_WORKQUEUE_MULTI_PRIORITY, uint16_t usStackDepth=MN_THREAD_CONFIG_WORKQUEUE_MULTI_STACKSIZE, uint8_t uiMaxWorkItems=MN_THREAD_CONFIG_WORKQUEUE_MULTI_MAXITEMS, uint8_t uiMaxWorkers=MN_THREAD_CONFIG_WORKQUEUE_MULTI_WORKER) | |
~basic_work_queue_multi () | |
uint8_t | get_num_worker () const |
uint8_t | get_num_max_worker () const |
std::vector< work_queue_task * > & | workers () |
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_item * | get_next_item (unsigned int timeout) |
Private Attributes | |
std::vector< work_queue_task * > | m_Workers |
uint8_t | m_uiMaxWorkers |
Additional Inherited Members | |
Protected Attributes inherited from mn::queue::basic_work_queue | |
queue_t * | m_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 multi task "engine" for work_queue_items.
Constructor & Destructor Documentation
◆ basic_work_queue_multi()
mn::queue::basic_work_queue_multi::basic_work_queue_multi | ( | basic_task::priority | uiPriority = MN_THREAD_CONFIG_WORKQUEUE_MULTI_PRIORITY , |
uint16_t | usStackDepth = MN_THREAD_CONFIG_WORKQUEUE_MULTI_STACKSIZE , |
||
uint8_t | uiMaxWorkItems = MN_THREAD_CONFIG_WORKQUEUE_MULTI_MAXITEMS , |
||
uint8_t | uiMaxWorkers = MN_THREAD_CONFIG_WORKQUEUE_MULTI_WORKER |
||
) |
Our constructor.
- Parameters
-
uiPriority FreeRTOS priority of this task. usStackDepth Number of "words" allocated for the task stack. uiMaxWorkItems Maximum number of WorkItems this WorkQueue can hold. uiMaxWorkers How many Worker tasks run with this workqueue
◆ ~basic_work_queue_multi()
mn::queue::basic_work_queue_multi::~basic_work_queue_multi | ( | ) |
Our destructor.
Member Function Documentation
◆ create_engine()
|
protectedvirtual |
Create this multi tasked work queue
- Parameters
-
iCore run on whith core
- Returns
- ERR_WORKQUEUE_OK The engine is created
- ERR_WORKQUEUE_WARNING Not all worker tasks are created
- ERR_WORKQUEUE_CANTCREATE The engine can not created
Implements mn::queue::basic_work_queue.
◆ destroy_engine()
|
protectedvirtual |
Destroy this multi tasked work queue
Implements mn::queue::basic_work_queue.
◆ get_num_max_worker()
uint8_t mn::queue::basic_work_queue_multi::get_num_max_worker | ( | ) | const |
Get the num worker tasks for this workqueue engine
- Returns
- The num worker threads for this workqueue engine
◆ get_num_worker()
uint8_t mn::queue::basic_work_queue_multi::get_num_worker | ( | ) | const |
Get the real num worker tasks for this workqueue engine
- Returns
- The real num worker threads for this workqueue engine
◆ workers()
std::vector< work_queue_task * > & mn::queue::basic_work_queue_multi::workers | ( | ) |
Get tde reference ot all workqueue tasks
Member Data Documentation
◆ m_uiMaxWorkers
|
private |
Holder of num worker threads for this workqueue engine
◆ m_Workers
|
private |
Vector for all workqueue threads
The documentation for this class was generated from the following files: