28#include <condition_variable>
71 using Clock = std::chrono::system_clock;
81 unsigned int stackSize = miosix::STACK_DEFAULT_FOR_PTHREAD,
82 miosix::Priority priority = miosix::MAIN_PRIORITY)
92 std::unique_lock<std::mutex> lock(mutex);
117 std::unique_lock<std::mutex> lock(mutex);
119 condvar.wait_until(lock, deadline, [
this] {
return signaled; });
130 bool signaled =
false;
132 std::condition_variable condvar;
bool shouldStop()
Tells whether or not the ActiveObject should stop its execution.
A task that executes a user-defined function at specific time points, or when signaled.
std::chrono::system_clock Clock
virtual TimePoint nextTaskDeadline()=0
Calculates the next deadline for the task to run.
virtual void task()=0
The user-defined task to run.
SignaledDeadlineTask(unsigned int stackSize=miosix::STACK_DEFAULT_FOR_PTHREAD, miosix::Priority priority=miosix::MAIN_PRIORITY)
Constructor.
std::chrono::time_point< Clock > TimePoint
void signalTask()
Signals the task to run and go to sleep until the next deadline.
This file includes all the types the logdecoder script will decode.