1#ifndef _THREAD_FREERTOS_H
2#define _THREAD_FREERTOS_H
44 Thread(
const std::string& threadName,
size_t maxQueueSize = 0);
73 void SetStackMem(StackType_t* stackBuffer, uint32_t stackSizeInWords);
83 static void Process(
void* instance);
88 TaskHandle_t m_thread =
nullptr;
89 QueueHandle_t m_queue =
nullptr;
90 SemaphoreHandle_t m_exitSem =
nullptr;
92 const std::string THREAD_NAME;
97 StackType_t* m_stackBuffer =
nullptr;
98 uint32_t m_stackSize = 1024;
Interface for cross-thread delegate dispatching.
Cross-platform thread for any system supporting C++11 std::thread (e.g. Windows, Linux).
Definition cmsis-rtos2/Thread.h:33
std::string GetThreadName()
Get thread name.
Definition freertos/Thread.h:63
TaskHandle_t GetThreadId()
Get the ID of this thread instance.
void SetStackMem(StackType_t *stackBuffer, uint32_t stackSizeInWords)
Definition freertos/Thread.cpp:36
virtual void DispatchDelegate(std::shared_ptr< dmq::DelegateMsg > msg) override
Enqueues a delegate message for execution on this thread.
static TaskHandle_t GetCurrentThreadId()
Get the ID of the currently executing thread.
static const uint32_t DEFAULT_QUEUE_SIZE
Default queue size if 0 is passed.
Definition cmsis-rtos2/Thread.h:36
void SetThreadPriority(osPriority_t priority)
Definition cmsis-rtos2/Thread.cpp:71
Thread(const std::string &threadName, size_t maxQueueSize=0)
void ExitThread()
Terminate the thread gracefully.
A class to hold a platform-specific thread messsage that will be passed through the OS message queue.
Definition cmsis-rtos2/ThreadMsg.h:12
A base class for a delegate enabled execution thread. Implemented by application code if asynchronous...
Definition IThread.h:22