APM:Libraries
Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
ChibiOS::Scheduler Class Reference

#include <Scheduler.h>

Inheritance diagram for ChibiOS::Scheduler:
[legend]
Collaboration diagram for ChibiOS::Scheduler:
[legend]

Public Member Functions

 Scheduler ()
 
void init ()
 
void delay (uint16_t ms) override
 
void delay_microseconds (uint16_t us) override
 
void delay_microseconds_boost (uint16_t us) override
 
void boost_end (void) override
 
void register_timer_process (AP_HAL::MemberProc) override
 
void register_io_process (AP_HAL::MemberProc) override
 
void register_timer_failsafe (AP_HAL::Proc, uint32_t period_us) override
 
void suspend_timer_procs () override
 
void resume_timer_procs () override
 
void reboot (bool hold_in_bootloader) override
 
bool in_main_thread () const override
 
void system_initialized ()
 
void hal_initialized ()
 
bool check_called_boost (void)
 
void * disable_interrupts_save (void) override
 
void restore_interrupts (void *) override
 
- Public Member Functions inherited from AP_HAL::Scheduler
 Scheduler ()
 
virtual void register_delay_callback (AP_HAL::Proc, uint16_t min_time_ms)
 
virtual bool in_delay_callback () const
 
virtual void stop_clock (uint64_t time_usec)
 
virtual void create_uavcan_thread ()
 
virtual void call_delay_cb ()
 

Private Member Functions

void _run_timers (bool called_from_timer_thread)
 
void _run_io (void)
 

Static Private Member Functions

static void _timer_thread (void *arg)
 
static void _rcin_thread (void *arg)
 
static void _io_thread (void *arg)
 
static void _storage_thread (void *arg)
 
static void _uart_thread (void *arg)
 
static void _toneAlarm_thread (void *arg)
 

Private Attributes

bool _initialized
 
volatile bool _hal_initialized
 
AP_HAL::Proc _failsafe
 
bool _called_boost
 
bool _priority_boosted
 
volatile bool _timer_suspended
 
AP_HAL::MemberProc _timer_proc [CHIBIOS_SCHEDULER_MAX_TIMER_PROCS]
 
uint8_t _num_timer_procs
 
volatile bool _in_timer_proc
 
AP_HAL::MemberProc _io_proc [CHIBIOS_SCHEDULER_MAX_TIMER_PROCS]
 
uint8_t _num_io_procs
 
volatile bool _in_io_proc
 
volatile bool _timer_event_missed
 
thread_t * _timer_thread_ctx
 
thread_t * _rcin_thread_ctx
 
thread_t * _io_thread_ctx
 
thread_t * _storage_thread_ctx
 
thread_t * _toneAlarm_thread_ctx
 

Additional Inherited Members

- Public Attributes inherited from AP_HAL::Scheduler
uint16_t _min_delay_cb_ms
 

Detailed Description

Definition at line 62 of file Scheduler.h.

Constructor & Destructor Documentation

◆ Scheduler()

Scheduler::Scheduler ( )

Definition at line 51 of file Scheduler.cpp.

Member Function Documentation

◆ _io_thread()

void Scheduler::_io_thread ( void *  arg)
staticprivate

Definition at line 379 of file Scheduler.cpp.

Referenced by init().

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

◆ _rcin_thread()

void Scheduler::_rcin_thread ( void *  arg)
staticprivate

Definition at line 331 of file Scheduler.cpp.

Referenced by init().

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

◆ _run_io()

void Scheduler::_run_io ( void  )
private

Definition at line 360 of file Scheduler.cpp.

Referenced by _io_thread().

Here is the caller graph for this function:

◆ _run_timers()

void Scheduler::_run_timers ( bool  called_from_timer_thread)
private

Definition at line 263 of file Scheduler.cpp.

Referenced by _timer_thread(), and resume_timer_procs().

Here is the caller graph for this function:

◆ _storage_thread()

void Scheduler::_storage_thread ( void *  arg)
staticprivate

Definition at line 394 of file Scheduler.cpp.

Referenced by init().

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

◆ _timer_thread()

void Scheduler::_timer_thread ( void *  arg)
staticprivate

Definition at line 294 of file Scheduler.cpp.

Referenced by init().

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

◆ _toneAlarm_thread()

static void ChibiOS::Scheduler::_toneAlarm_thread ( void *  arg)
staticprivate

Referenced by _rcin_thread(), and init().

Here is the caller graph for this function:

◆ _uart_thread()

static void ChibiOS::Scheduler::_uart_thread ( void *  arg)
staticprivate

◆ boost_end()

void Scheduler::boost_end ( void  )
overridevirtual

Reimplemented from AP_HAL::Scheduler.

Definition at line 134 of file Scheduler.cpp.

Here is the call graph for this function:

◆ check_called_boost()

bool Scheduler::check_called_boost ( void  )

Definition at line 163 of file Scheduler.cpp.

Referenced by hal_initialized(), and THD_FUNCTION().

Here is the caller graph for this function:

◆ delay()

void Scheduler::delay ( uint16_t  ms)
overridevirtual

Implements AP_HAL::Scheduler.

Definition at line 172 of file Scheduler.cpp.

Here is the call graph for this function:

◆ delay_microseconds()

void Scheduler::delay_microseconds ( uint16_t  us)
overridevirtual

Implements AP_HAL::Scheduler.

Definition at line 102 of file Scheduler.cpp.

Referenced by _io_thread(), _rcin_thread(), _storage_thread(), _timer_thread(), delay(), and delay_microseconds_boost().

Here is the caller graph for this function:

◆ delay_microseconds_boost()

void Scheduler::delay_microseconds_boost ( uint16_t  us)
overridevirtual

Reimplemented from AP_HAL::Scheduler.

Definition at line 150 of file Scheduler.cpp.

Here is the call graph for this function:

◆ disable_interrupts_save()

void * Scheduler::disable_interrupts_save ( void  )
overridevirtual

Reimplemented from AP_HAL::Scheduler.

Definition at line 428 of file Scheduler.cpp.

Referenced by hal_initialized(), and reboot().

Here is the caller graph for this function:

◆ hal_initialized()

void ChibiOS::Scheduler::hal_initialized ( )
inline

Definition at line 82 of file Scheduler.h.

Referenced by THD_FUNCTION().

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

◆ in_main_thread()

bool Scheduler::in_main_thread ( ) const
overridevirtual

Implements AP_HAL::Scheduler.

Definition at line 409 of file Scheduler.cpp.

Referenced by boost_end(), delay(), and delay_microseconds_boost().

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

◆ init()

void Scheduler::init ( void  )
virtual

Implements AP_HAL::Scheduler.

Definition at line 54 of file Scheduler.cpp.

Here is the call graph for this function:

◆ reboot()

void Scheduler::reboot ( bool  hold_in_bootloader)
overridevirtual

Implements AP_HAL::Scheduler.

Definition at line 239 of file Scheduler.cpp.

Here is the call graph for this function:

◆ register_io_process()

void Scheduler::register_io_process ( AP_HAL::MemberProc  proc)
overridevirtual

Implements AP_HAL::Scheduler.

Definition at line 204 of file Scheduler.cpp.

Here is the call graph for this function:

◆ register_timer_failsafe()

void Scheduler::register_timer_failsafe ( AP_HAL::Proc  failsafe,
uint32_t  period_us 
)
overridevirtual

Implements AP_HAL::Scheduler.

Definition at line 220 of file Scheduler.cpp.

◆ register_timer_process()

void Scheduler::register_timer_process ( AP_HAL::MemberProc  proc)
overridevirtual

Implements AP_HAL::Scheduler.

Definition at line 188 of file Scheduler.cpp.

Here is the call graph for this function:

◆ restore_interrupts()

void Scheduler::restore_interrupts ( void *  state)
overridevirtual

Reimplemented from AP_HAL::Scheduler.

Definition at line 436 of file Scheduler.cpp.

Referenced by hal_initialized().

Here is the caller graph for this function:

◆ resume_timer_procs()

void Scheduler::resume_timer_procs ( )
overridevirtual

Implements AP_HAL::Scheduler.

Definition at line 230 of file Scheduler.cpp.

Here is the call graph for this function:

◆ suspend_timer_procs()

void Scheduler::suspend_timer_procs ( )
overridevirtual

Implements AP_HAL::Scheduler.

Definition at line 225 of file Scheduler.cpp.

◆ system_initialized()

void Scheduler::system_initialized ( )
virtual

Implements AP_HAL::Scheduler.

Definition at line 414 of file Scheduler.cpp.

Here is the call graph for this function:

Member Data Documentation

◆ _called_boost

bool ChibiOS::Scheduler::_called_boost
private

Definition at line 102 of file Scheduler.h.

Referenced by check_called_boost(), and delay_microseconds_boost().

◆ _failsafe

AP_HAL::Proc ChibiOS::Scheduler::_failsafe
private

Definition at line 101 of file Scheduler.h.

Referenced by _run_timers(), and register_timer_failsafe().

◆ _hal_initialized

volatile bool ChibiOS::Scheduler::_hal_initialized
private

◆ _in_io_proc

volatile bool ChibiOS::Scheduler::_in_io_proc
private

Definition at line 113 of file Scheduler.h.

Referenced by _run_io().

◆ _in_timer_proc

volatile bool ChibiOS::Scheduler::_in_timer_proc
private

Definition at line 109 of file Scheduler.h.

Referenced by _run_timers().

◆ _initialized

bool ChibiOS::Scheduler::_initialized
private

Definition at line 99 of file Scheduler.h.

Referenced by system_initialized().

◆ _io_proc

AP_HAL::MemberProc ChibiOS::Scheduler::_io_proc[CHIBIOS_SCHEDULER_MAX_TIMER_PROCS]
private

Definition at line 111 of file Scheduler.h.

Referenced by _run_io(), and register_io_process().

◆ _io_thread_ctx

thread_t* ChibiOS::Scheduler::_io_thread_ctx
private

Definition at line 119 of file Scheduler.h.

Referenced by init().

◆ _num_io_procs

uint8_t ChibiOS::Scheduler::_num_io_procs
private

Definition at line 112 of file Scheduler.h.

Referenced by _run_io(), and register_io_process().

◆ _num_timer_procs

uint8_t ChibiOS::Scheduler::_num_timer_procs
private

Definition at line 108 of file Scheduler.h.

Referenced by _run_timers(), and register_timer_process().

◆ _priority_boosted

bool ChibiOS::Scheduler::_priority_boosted
private

Definition at line 103 of file Scheduler.h.

Referenced by boost_end(), and delay_microseconds_boost().

◆ _rcin_thread_ctx

thread_t* ChibiOS::Scheduler::_rcin_thread_ctx
private

Definition at line 118 of file Scheduler.h.

Referenced by init().

◆ _storage_thread_ctx

thread_t* ChibiOS::Scheduler::_storage_thread_ctx
private

Definition at line 120 of file Scheduler.h.

Referenced by init().

◆ _timer_event_missed

volatile bool ChibiOS::Scheduler::_timer_event_missed
private

Definition at line 115 of file Scheduler.h.

Referenced by _run_timers(), and resume_timer_procs().

◆ _timer_proc

AP_HAL::MemberProc ChibiOS::Scheduler::_timer_proc[CHIBIOS_SCHEDULER_MAX_TIMER_PROCS]
private

Definition at line 107 of file Scheduler.h.

Referenced by _run_timers(), and register_timer_process().

◆ _timer_suspended

volatile bool ChibiOS::Scheduler::_timer_suspended
private

Definition at line 105 of file Scheduler.h.

Referenced by _run_io(), _run_timers(), resume_timer_procs(), and suspend_timer_procs().

◆ _timer_thread_ctx

thread_t* ChibiOS::Scheduler::_timer_thread_ctx
private

Definition at line 117 of file Scheduler.h.

Referenced by init().

◆ _toneAlarm_thread_ctx

thread_t* ChibiOS::Scheduler::_toneAlarm_thread_ctx
private

Definition at line 121 of file Scheduler.h.

Referenced by init().


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