1#ifndef _THREAD_CMSIS_RTOS2_H
2#define _THREAD_CMSIS_RTOS2_H
41 Thread(
const std::string& threadName,
size_t maxQueueSize = 0);
60 virtual void DispatchDelegate(std::shared_ptr<dmq::DelegateMsg> msg)
override;
67 static void Process(
void* argument);
70 osThreadId_t m_thread = NULL;
71 osMessageQueueId_t m_msgq = NULL;
72 osSemaphoreId_t m_exitSem = NULL;
74 const std::string THREAD_NAME;
77 static const uint32_t STACK_SIZE = 2048;
80 osPriority_t m_priority;
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()
Definition cmsis-rtos2/Thread.h:58
osPriority_t GetThreadPriority()
Get current priority.
Definition cmsis-rtos2/Thread.cpp:84
~Thread()
Definition cmsis-rtos2/Thread.cpp:29
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
bool CreateThread()
Definition cmsis-rtos2/Thread.cpp:42
Thread(const std::string &threadName, size_t maxQueueSize=0)
Definition cmsis-rtos2/Thread.cpp:16
void ExitThread()
Definition cmsis-rtos2/Thread.cpp:92
osThreadId_t GetThreadId()
Definition cmsis-rtos2/Thread.cpp:132
static osThreadId_t GetCurrentThreadId()
Definition cmsis-rtos2/Thread.cpp:140
virtual void DispatchDelegate(std::shared_ptr< dmq::DelegateMsg > msg) override
Enqueues a delegate message for execution on this thread.
Definition qt/Thread.cpp:93
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