APM:Libraries
|
#include <Scheduler.h>
Classes | |
class | SchedulerThread |
Public Member Functions | |
Scheduler () | |
void | init () |
void | delay (uint16_t ms) |
void | delay_microseconds (uint16_t us) |
void | register_timer_process (AP_HAL::MemberProc) |
void | register_io_process (AP_HAL::MemberProc) |
void | suspend_timer_procs () |
void | resume_timer_procs () |
bool | in_main_thread () const override |
void | register_timer_failsafe (AP_HAL::Proc, uint32_t period_us) |
void | system_initialized () |
void | reboot (bool hold_in_bootloader) |
void | stop_clock (uint64_t time_usec) |
uint64_t | stopped_clock_usec () const |
void | microsleep (uint32_t usec) |
void | teardown () |
![]() | |
Scheduler () | |
virtual void | delay_microseconds_boost (uint16_t us) |
virtual void | boost_end (void) |
virtual void | register_delay_callback (AP_HAL::Proc, uint16_t min_time_ms) |
virtual bool | in_delay_callback () const |
virtual void | create_uavcan_thread () |
virtual void * | disable_interrupts_save (void) |
virtual void | restore_interrupts (void *) |
virtual void | call_delay_cb () |
Static Public Member Functions | |
static Scheduler * | from (AP_HAL::Scheduler *scheduler) |
Private Member Functions | |
void | _wait_all_threads () |
void | _debug_stack () |
void | _timer_task () |
void | _io_task () |
void | _rcin_task () |
void | _uart_task () |
void | _tonealarm_task () |
void | _run_io () |
void | _run_uarts () |
Private Attributes | |
AP_HAL::Proc | _failsafe |
bool | _initialized |
pthread_barrier_t | _initialized_barrier |
AP_HAL::MemberProc | _timer_proc [LINUX_SCHEDULER_MAX_TIMER_PROCS] |
uint8_t | _num_timer_procs |
volatile bool | _in_timer_proc |
AP_HAL::MemberProc | _io_proc [LINUX_SCHEDULER_MAX_IO_PROCS] |
uint8_t | _num_io_procs |
SchedulerThread | _timer_thread {FUNCTOR_BIND_MEMBER(&Scheduler::_timer_task, void), *this} |
SchedulerThread | _io_thread {FUNCTOR_BIND_MEMBER(&Scheduler::_io_task, void), *this} |
SchedulerThread | _rcin_thread {FUNCTOR_BIND_MEMBER(&Scheduler::_rcin_task, void), *this} |
SchedulerThread | _uart_thread {FUNCTOR_BIND_MEMBER(&Scheduler::_uart_task, void), *this} |
SchedulerThread | _tonealarm_thread {FUNCTOR_BIND_MEMBER(&Scheduler::_tonealarm_task, void), *this} |
uint64_t | _stopped_clock_usec |
uint64_t | _last_stack_debug_msec |
pthread_t | _main_ctx |
Semaphore | _timer_semaphore |
Semaphore | _io_semaphore |
Additional Inherited Members | |
![]() | |
uint16_t | _min_delay_cb_ms |
Definition at line 19 of file Scheduler.h.
Scheduler::Scheduler | ( | ) |
Definition at line 61 of file Scheduler.cpp.
|
private |
Definition at line 115 of file Scheduler.cpp.
Referenced by init().
|
private |
|
private |
|
private |
Definition at line 264 of file Scheduler.cpp.
Referenced by _io_task(), and stop_clock().
|
private |
Definition at line 283 of file Scheduler.cpp.
Referenced by _uart_task().
|
private |
|
private |
|
private |
|
private |
Definition at line 324 of file Scheduler.cpp.
Referenced by system_initialized().
|
virtual |
Implements AP_HAL::Scheduler.
Definition at line 143 of file Scheduler.cpp.
Referenced by from().
|
virtual |
Implements AP_HAL::Scheduler.
Definition at line 165 of file Scheduler.cpp.
Referenced by from().
|
inlinestatic |
Definition at line 23 of file Scheduler.h.
Referenced by Linux::PeriodicThread::_run().
|
overridevirtual |
Implements AP_HAL::Scheduler.
Definition at line 319 of file Scheduler.cpp.
Referenced by delay(), and from().
|
virtual |
Implements AP_HAL::Scheduler.
Definition at line 64 of file Scheduler.cpp.
Referenced by from().
void Scheduler::microsleep | ( | uint32_t | usec | ) |
Definition at line 135 of file Scheduler.cpp.
Referenced by Linux::PeriodicThread::_run(), delay(), delay_microseconds(), and stopped_clock_usec().
|
virtual |
Implements AP_HAL::Scheduler.
Definition at line 343 of file Scheduler.cpp.
Referenced by from().
|
virtual |
Implements AP_HAL::Scheduler.
Definition at line 190 of file Scheduler.cpp.
Referenced by from().
|
virtual |
Implements AP_HAL::Scheduler.
Definition at line 206 of file Scheduler.cpp.
Referenced by from().
|
virtual |
Implements AP_HAL::Scheduler.
Definition at line 173 of file Scheduler.cpp.
Referenced by from(), and init().
|
virtual |
Implements AP_HAL::Scheduler.
Definition at line 218 of file Scheduler.cpp.
Referenced by from().
|
virtual |
optional function to stop clock at a given time, used by log replay
Reimplemented from AP_HAL::Scheduler.
Definition at line 348 of file Scheduler.cpp.
Referenced by from().
|
inline |
|
virtual |
Implements AP_HAL::Scheduler.
Definition at line 211 of file Scheduler.cpp.
Referenced by from().
|
virtual |
Implements AP_HAL::Scheduler.
Definition at line 332 of file Scheduler.cpp.
Referenced by from().
void Scheduler::teardown | ( | ) |
Definition at line 363 of file Scheduler.cpp.
Referenced by stopped_clock_usec().
|
private |
Definition at line 70 of file Scheduler.h.
Referenced by _timer_task(), and register_timer_failsafe().
|
private |
Definition at line 77 of file Scheduler.h.
Referenced by _timer_task().
|
private |
Definition at line 72 of file Scheduler.h.
Referenced by system_initialized().
|
private |
Definition at line 73 of file Scheduler.h.
Referenced by _wait_all_threads(), and init().
|
private |
Definition at line 79 of file Scheduler.h.
Referenced by _run_io(), and register_io_process().
|
private |
Definition at line 102 of file Scheduler.h.
Referenced by _run_io().
|
private |
Definition at line 83 of file Scheduler.h.
Referenced by _debug_stack(), and teardown().
|
private |
Definition at line 98 of file Scheduler.h.
Referenced by _debug_stack().
|
private |
Definition at line 99 of file Scheduler.h.
Referenced by in_main_thread(), and init().
|
private |
Definition at line 80 of file Scheduler.h.
Referenced by _run_io(), and register_io_process().
|
private |
Definition at line 76 of file Scheduler.h.
Referenced by _timer_task(), and register_timer_process().
|
private |
Definition at line 84 of file Scheduler.h.
Referenced by _debug_stack(), and teardown().
|
private |
Definition at line 97 of file Scheduler.h.
Referenced by delay(), delay_microseconds(), stop_clock(), and stopped_clock_usec().
|
private |
Definition at line 75 of file Scheduler.h.
Referenced by _timer_task(), and register_timer_process().
|
private |
Definition at line 101 of file Scheduler.h.
Referenced by _timer_task(), resume_timer_procs(), and suspend_timer_procs().
|
private |
Definition at line 82 of file Scheduler.h.
Referenced by _debug_stack(), and teardown().
|
private |
Definition at line 86 of file Scheduler.h.
Referenced by _debug_stack(), and teardown().
|
private |
Definition at line 85 of file Scheduler.h.
Referenced by _debug_stack(), and teardown().