39 friend class ::Thread_impl;
51 uint8_t priority,uint32_t stackSize=1024*128);
102 uint32_t GetPeriodUS()
const;
113 uint32_t GetPeriodMS()
const;
204 void SleepUS(uint32_t time_us)
const;
213 void SleepMS(uint32_t time_ms)
const;
236 virtual void Run(
void) = 0;
238 class Thread_impl *pimpl_;
void SleepUntil(Time time) const
Sleep until absolute time.
bool IsSuspended(void) const
Is the thread suspended?
Base class for all Framework's classes.
Definition: Object.h:83
Abstract class for input/ouput system.
Definition: IODevice.h:45
void SleepUS(uint32_t time_us) const
Sleep for a certain time in micro second.
namespace of the flair Framework
Definition: Ahrs.h:19
bool IsRunning(void) const
Is the thread running?
bool SuspendUntil(Time date)
Suspend the thread with timeout.
void SetPeriodUS(uint32_t period_us)
Set the period in micro second.
void Resume(void)
Resume the thread.
unsigned long long Time
Time definition, in ns.
Definition: Object.h:55
void Start(void)
Start the thread.
bool ToBeStopped(void) const
Set a stop flag.
Thread(const Object *parent, std::string name, uint8_t priority, uint32_t stackSize=1024 *128)
Constructor.
int WaitUpdate(const IODevice *device)
Wait update of an IODevice.
static void WarnUponSwitches(bool enable)
Warn if real time / non real time switches occur.
void Join(void)
Join the thread.
void SafeStop(void)
Set a stop flag.
void SetPeriodMS(uint32_t period_ms)
Set the period in milli second.
Base class for all Framework's classes.
Abstract class for a thread.
Definition: Thread.h:38
bool IsPeriodSet(void)
Returns if period was set.
void SleepMS(uint32_t time_ms) const
Sleep for a cartain time in milli second.
void WaitPeriod(void) const
Wait the period.
virtual ~Thread()
Destructor.
void Suspend(void)
Suspend the thread.