APM:Libraries
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Linux::PeriodicThread Class Reference

#include <Thread.h>

Inheritance diagram for Linux::PeriodicThread:
[legend]
Collaboration diagram for Linux::PeriodicThread:
[legend]

Public Member Functions

 PeriodicThread (Thread::task_t t)
 
bool set_rate (uint32_t rate_hz)
 
bool stop () override
 
- Public Member Functions inherited from Linux::Thread
 FUNCTOR_TYPEDEF (task_t, void)
 
 Thread (task_t t)
 
virtual ~Thread ()
 
bool start (const char *name, int policy, int prio)
 
bool is_current_thread ()
 
bool is_started () const
 
size_t get_stack_usage ()
 
bool set_stack_size (size_t stack_size)
 
bool join ()
 

Protected Member Functions

bool _run () override
 
- Protected Member Functions inherited from Linux::Thread
void _poison_stack ()
 

Protected Attributes

uint64_t _period_usec = 0
 
- Protected Attributes inherited from Linux::Thread
task_t _task
 
bool _started = false
 
bool _should_exit = false
 
pthread_t _ctx = 0
 
struct Linux::Thread::stack_debug _stack_debug
 
size_t _stack_size = 0
 

Additional Inherited Members

- Static Protected Member Functions inherited from Linux::Thread
static void * _run_trampoline (void *arg)
 

Detailed Description

Definition at line 77 of file Thread.h.

Constructor & Destructor Documentation

◆ PeriodicThread()

Linux::PeriodicThread::PeriodicThread ( Thread::task_t  t)
inline

Definition at line 79 of file Thread.h.

Here is the call graph for this function:

Member Function Documentation

◆ _run()

bool Linux::PeriodicThread::_run ( )
overrideprotectedvirtual

Reimplemented from Linux::Thread.

Definition at line 247 of file Thread.cpp.

Referenced by Linux::Scheduler::SchedulerThread::_run().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_rate()

bool Linux::PeriodicThread::set_rate ( uint32_t  rate_hz)

Definition at line 225 of file Thread.cpp.

Referenced by TEST().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ stop()

bool Linux::PeriodicThread::stop ( )
overridevirtual

Reimplemented from Linux::Thread.

Definition at line 274 of file Thread.cpp.

Referenced by Linux::Scheduler::teardown(), and TEST().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ _period_usec

uint64_t Linux::PeriodicThread::_period_usec = 0
protected

Definition at line 90 of file Thread.h.


The documentation for this class was generated from the following files: