47 ActiveObject(
unsigned int stacksize = miosix::STACK_DEFAULT_FOR_PTHREAD,
48 miosix::Priority priority = miosix::MAIN_PRIORITY);
80 virtual void run() = 0;
103 static void threadLauncher(
void* arg);
105 unsigned int stackSize;
106 miosix::Priority priority;
110 miosix::Priority priority)
111 : stackSize(
skywardStack(stacksize)), priority(priority)
122 thread = miosix::Thread::create(threadLauncher, stackSize, priority,
123 reinterpret_cast<void*
>(
this),
124 miosix::Thread::JOINABLE);
148inline void ActiveObject::threadLauncher(
void* arg)
std::atomic< bool > stopFlag
ActiveObject(unsigned int stacksize=miosix::STACK_DEFAULT_FOR_PTHREAD, miosix::Priority priority=miosix::MAIN_PRIORITY)
std::atomic< bool > running
bool shouldStop()
Tells whether or not the ActiveObject should stop its execution.
virtual void stop()
Signals the runner thread to terminate and joins the thread.
virtual bool start()
Start the thread associated with this active object.
miosix::Thread * thread
Gives access to the thread object.
This file includes all the types the logdecoder script will decode.
unsigned int skywardStack(unsigned int stack)