APM:Libraries
|
#include <AP_Scheduler.h>
Classes | |
struct | Task |
Public Member Functions | |
FUNCTOR_TYPEDEF (scheduler_fastloop_fn_t, void) | |
AP_Scheduler (scheduler_fastloop_fn_t fastloop_fn=nullptr) | |
AP_Scheduler (const AP_Scheduler &other)=delete | |
AP_Scheduler & | operator= (const AP_Scheduler &)=delete |
FUNCTOR_TYPEDEF (task_fn_t, void) | |
void | init (const Task *tasks, uint8_t num_tasks, uint32_t log_performance_bit) |
void | loop () |
void | update_logging () |
void | Log_Write_Performance () |
void | tick (void) |
uint16_t | ticks () const |
void | run (uint32_t time_available) |
uint16_t | time_available_usec (void) |
uint8_t | debug_flags (void) |
float | load_average () |
uint16_t | get_loop_rate_hz (void) |
uint32_t | get_loop_period_us () |
float | get_loop_period_s () |
float | get_filtered_loop_time (void) const |
float | get_last_loop_time_s (void) const |
Public Attributes | |
AP::PerfInfo | perf_info |
Static Public Attributes | |
static const struct AP_Param::GroupInfo | var_info [] |
static int8_t | current_task = -1 |
Private Attributes | |
scheduler_fastloop_fn_t | _fastloop_fn |
AP_Int8 | _debug |
AP_Int16 | _loop_rate_hz |
AP_Int16 | _active_loop_rate_hz |
uint16_t | _loop_period_us |
float | _loop_period_s |
const struct Task * | _tasks |
uint8_t | _num_tasks |
uint16_t | _tick_counter |
uint16_t * | _last_run |
uint32_t | _task_time_allowed |
uint32_t | _task_time_started |
uint32_t | _spare_micros |
uint8_t | _spare_ticks |
uint32_t | _loop_timer_start_us |
float | _last_loop_time_s |
AP_HAL::Util::perf_counter_t * | _perf_counters |
uint32_t | _log_performance_bit |
Definition at line 53 of file AP_Scheduler.h.
AP_Scheduler::AP_Scheduler | ( | scheduler_fastloop_fn_t | fastloop_fn = nullptr | ) |
|
delete |
|
inline |
Definition at line 102 of file AP_Scheduler.h.
Referenced by update_logging().
AP_Scheduler::FUNCTOR_TYPEDEF | ( | scheduler_fastloop_fn_t | , |
void | |||
) |
AP_Scheduler::FUNCTOR_TYPEDEF | ( | task_fn_t | , |
void | |||
) |
|
inline |
|
inline |
Definition at line 136 of file AP_Scheduler.h.
|
inline |
Definition at line 124 of file AP_Scheduler.h.
Referenced by loop().
|
inline |
Definition at line 117 of file AP_Scheduler.h.
Referenced by load_average(), and loop().
|
inline |
Definition at line 110 of file AP_Scheduler.h.
Referenced by init(), SchedTest::setup(), and update_logging().
void AP_Scheduler::init | ( | const Task * | tasks, |
uint8_t | num_tasks, | ||
uint32_t | log_performance_bit | ||
) |
Definition at line 78 of file AP_Scheduler.cpp.
Referenced by SchedTest::setup().
float AP_Scheduler::load_average | ( | ) |
Definition at line 206 of file AP_Scheduler.cpp.
Referenced by debug_flags(), and Log_Write_Performance().
void AP_Scheduler::Log_Write_Performance | ( | ) |
Definition at line 273 of file AP_Scheduler.cpp.
Referenced by update_logging().
void AP_Scheduler::loop | ( | void | ) |
Definition at line 216 of file AP_Scheduler.cpp.
Referenced by SchedTest::loop().
|
delete |
void AP_Scheduler::run | ( | uint32_t | time_available | ) |
Definition at line 103 of file AP_Scheduler.cpp.
Referenced by loop(), and ticks().
void AP_Scheduler::tick | ( | void | ) |
Definition at line 94 of file AP_Scheduler.cpp.
Referenced by loop().
|
inline |
uint16_t AP_Scheduler::time_available_usec | ( | void | ) |
Definition at line 194 of file AP_Scheduler.cpp.
Referenced by ticks().
void AP_Scheduler::update_logging | ( | ) |
|
private |
Definition at line 159 of file AP_Scheduler.h.
Referenced by get_loop_rate_hz().
|
private |
Definition at line 153 of file AP_Scheduler.h.
Referenced by debug_flags(), and run().
|
private |
Definition at line 150 of file AP_Scheduler.h.
Referenced by loop().
|
private |
Definition at line 196 of file AP_Scheduler.h.
Referenced by AP_Scheduler(), get_last_loop_time_s(), and loop().
|
private |
Definition at line 178 of file AP_Scheduler.h.
|
private |
Definition at line 202 of file AP_Scheduler.h.
Referenced by init(), and update_logging().
|
private |
Definition at line 165 of file AP_Scheduler.h.
Referenced by get_loop_period_s().
|
private |
Definition at line 162 of file AP_Scheduler.h.
Referenced by get_loop_period_us().
|
private |
Definition at line 156 of file AP_Scheduler.h.
Referenced by AP_Scheduler(), get_loop_period_s(), get_loop_period_us(), get_loop_rate_hz(), and run().
|
private |
Definition at line 193 of file AP_Scheduler.h.
Referenced by loop().
|
private |
Definition at line 171 of file AP_Scheduler.h.
|
private |
Definition at line 199 of file AP_Scheduler.h.
Referenced by run().
|
private |
Definition at line 187 of file AP_Scheduler.h.
Referenced by load_average(), and run().
|
private |
Definition at line 190 of file AP_Scheduler.h.
Referenced by load_average(), and run().
|
private |
Definition at line 181 of file AP_Scheduler.h.
Referenced by run(), and time_available_usec().
|
private |
Definition at line 184 of file AP_Scheduler.h.
Referenced by run(), and time_available_usec().
|
private |
Definition at line 168 of file AP_Scheduler.h.
|
private |
|
static |
Definition at line 143 of file AP_Scheduler.h.
Referenced by VRBRAIN::VRBRAINScheduler::_timer_thread(), PX4::PX4Scheduler::_timer_thread(), and run().
AP::PerfInfo AP_Scheduler::perf_info |
Definition at line 146 of file AP_Scheduler.h.
Referenced by get_filtered_loop_time(), init(), Log_Write_Performance(), loop(), and update_logging().
|
static |