1#ifndef TEST_DOUBLE_OS_WRAPPER_TEST_DOUBLE_THREAD_FACTORY_H_INCLUDED
2#define TEST_DOUBLE_OS_WRAPPER_TEST_DOUBLE_THREAD_FACTORY_H_INCLUDED
104template <
typename T = TestDoubleThread>
113 obj->setCreateArgs(r, priority, stackSize, stackAddress, name);
119 delete static_cast<T*
>(t);
122 virtual void sleep(
unsigned long millis)
Interface for implementing an active class.
Definition Runnable.h:9
Definition ThreadFactory.h:11
Abstract class that has functions of common RTOS's thread.
Definition Thread.h:50
Thread(Runnable *r)
Definition Thread.h:52
Value object for the timeout.
Definition Timeout.h:11
Definition TestDoubleThreadFactory.h:105
virtual int getHighestPriority() const
Definition TestDoubleThreadFactory.h:146
virtual int getMinPriority() const
Definition TestDoubleThreadFactory.h:141
virtual void sleep(unsigned long millis)
Definition TestDoubleThreadFactory.h:122
TestDoubleThreadFactory()
Definition TestDoubleThreadFactory.h:107
virtual ~TestDoubleThreadFactory()
Definition TestDoubleThreadFactory.h:108
virtual int getLowestPriority() const
Definition TestDoubleThreadFactory.h:151
virtual OSWrapper::Thread * create(OSWrapper::Runnable *r, int priority, std::size_t stackSize, void *stackAddress, const char *name)
Definition TestDoubleThreadFactory.h:110
virtual void destroy(OSWrapper::Thread *t)
Definition TestDoubleThreadFactory.h:117
virtual int getMaxPriority() const
Definition TestDoubleThreadFactory.h:136
virtual void yield()
Definition TestDoubleThreadFactory.h:127
virtual OSWrapper::Thread * getCurrentThread()
Definition TestDoubleThreadFactory.h:131
Definition TestDoubleThreadFactory.h:10
virtual void setName(const char *name)
Set the object's name.
Definition TestDoubleThreadFactory.h:68
virtual std::size_t getStackSize() const
Get the stack size of this thread.
Definition TestDoubleThreadFactory.h:93
void * m_stackAddress
Definition TestDoubleThreadFactory.h:16
virtual OSWrapper::Error tryWait()
Query without blocking whether this thread is in the FINISHED state.
Definition TestDoubleThreadFactory.h:52
virtual OSWrapper::Error wait()
Block the current thread until this thread transits to the FINISHED state.
Definition TestDoubleThreadFactory.h:47
TestDoubleThread()
Definition TestDoubleThreadFactory.h:20
virtual void start()
Transit this thread to the READY state.
Definition TestDoubleThreadFactory.h:43
virtual void * getNativeHandle()
Get the native handle of RTOS's thread.
Definition TestDoubleThreadFactory.h:98
int m_priority
Definition TestDoubleThreadFactory.h:13
virtual bool isFinished() const
Return true if this thread is in the FINISHED state.
Definition TestDoubleThreadFactory.h:63
const char * m_name
Definition TestDoubleThreadFactory.h:17
int m_initialPriority
Definition TestDoubleThreadFactory.h:14
virtual OSWrapper::Error timedWait(OSWrapper::Timeout tmout)
Block the current thread until this thread transits to the FINISHED state but only within the limited...
Definition TestDoubleThreadFactory.h:57
virtual const char * getName() const
Get the object's name.
Definition TestDoubleThreadFactory.h:73
virtual int getPriority() const
Get this thread priority.
Definition TestDoubleThreadFactory.h:83
void setCreateArgs(OSWrapper::Runnable *r, int priority, std::size_t stackSize, void *stackAddress, const char *name)
Definition TestDoubleThreadFactory.h:31
std::size_t m_stackSize
Definition TestDoubleThreadFactory.h:15
OSWrapper::Runnable * m_runnable
Definition TestDoubleThreadFactory.h:12
virtual void setPriority(int priority)
Change this thread priority.
Definition TestDoubleThreadFactory.h:78
virtual ~TestDoubleThread()
Definition TestDoubleThreadFactory.h:41
virtual int getInitialPriority() const
Get this thread priority when this thread was created.
Definition TestDoubleThreadFactory.h:88
Error
Kinds of errors of the OS objects.
Definition OSWrapperError.h:9
@ OK
Definition OSWrapperError.h:10
Implementation of OSWrapper for Test Double.
Definition TestDoubleEventFlagFactory.h:7