40#include "freertos-config.h"
42#ifndef WORK_QUEUE_HPP_
43#define WORK_QUEUE_HPP_
47#include "semaphore.hpp"
53#define DEFAULT_MAX_WORK_ITEMS 10
54#define DEFAULT_WORK_QUEUE_STACK_SIZE (configMINIMAL_STACK_SIZE * 2)
55#define DEFAULT_WORK_QUEUE_PRIORITY (tskIDLE_PRIORITY + 1)
89 WorkItem(
bool freeAfterComplete =
false);
119 const bool FreeItemAfterCompleted;
148 uint16_t StackDepth = DEFAULT_WORK_QUEUE_STACK_SIZE,
149 UBaseType_t Priority = DEFAULT_WORK_QUEUE_PRIORITY,
150 UBaseType_t MaxWorkItems = DEFAULT_MAX_WORK_ITEMS);
161 WorkQueue( uint16_t StackDepth = DEFAULT_WORK_QUEUE_STACK_SIZE,
162 UBaseType_t Priority = DEFAULT_WORK_QUEUE_PRIORITY,
163 UBaseType_t MaxWorkItems = DEFAULT_MAX_WORK_ITEMS);
165#if (INCLUDE_vTaskDelete == 1)
179#if __cplusplus >= 201103L
208 class CWorkerThread :
public Thread {
211 CWorkerThread(
const char *
const Name,
213 UBaseType_t Priority,
216 CWorkerThread( uint16_t StackDepth,
217 UBaseType_t Priority,
220 virtual ~CWorkerThread();
232 CWorkerThread *WorkerThread;
237 Queue *WorkItemQueue;
Definition: semaphore.hpp:196
Definition: queue.hpp:117
Definition: thread.hpp:79
Definition: workqueue.hpp:69
virtual ~WorkItem()
Definition: cworkqueue.cpp:52
bool FreeAfterRun()
Definition: cworkqueue.cpp:57
Definition: workqueue.hpp:128
~WorkQueue()
Definition: cworkqueue.cpp:102
bool QueueWork(WorkItem *work)
Definition: cworkqueue.cpp:137
Definition: condition_variable.hpp:57