|
PX4 Firmware
PX4 Autopilot Software http://px4.io
|
Public Member Functions | |
| LoadMon () | |
| ~LoadMon () override | |
| int | print_status () override |
| void | start () |
Static Public Member Functions | |
| static int | task_spawn (int argc, char *argv[]) |
| static int | custom_command (int argc, char *argv[]) |
| static int | print_usage (const char *reason=nullptr) |
Private Member Functions | |
| void | Run () override |
| Do a compute and schedule the next cycle. More... | |
| void | _cpuload () |
| Do a calculation of the CPU load and publish it. More... | |
| float | _ram_used () |
| Calculate the memory usage. More... | |
Private Attributes | |
| DEFINE_PARAMETERS((ParamBool< px4::params::SYS_STCK_EN >) _param_sys_stck_en) uORB hrt_abstime | _last_idle_time {0} |
| hrt_abstime | _last_idle_time_sample {0} |
| perf_counter_t | _stack_perf |
Definition at line 70 of file load_mon.cpp.
| load_mon::LoadMon::LoadMon | ( | ) |
Definition at line 122 of file load_mon.cpp.
Referenced by task_spawn().
|
override |
Definition at line 129 of file load_mon.cpp.
References _stack_perf, and perf_free().
|
private |
Do a calculation of the CPU load and publish it.
Definition at line 178 of file load_mon.cpp.
References _last_idle_time, _last_idle_time_sample, _ram_used(), cpuload, hrt_absolute_time(), hrt_abstime, hrt_elapsed_time(), cpuload_s::load, cpuload_s::ram_usage, system_load, and cpuload_s::timestamp.
Referenced by custom_command(), and Run().
|
private |
Calculate the memory usage.
Definition at line 202 of file load_mon.cpp.
References _stack_perf, CONFIG_MAX_TASKS, FDS_LOW_WARNING_THRESHOLD, hrt_absolute_time(), perf_begin(), perf_end(), task_stack_info_s::stack_free, STACK_LOW_WARNING_THRESHOLD, system_load, task_stack_info_s::task_name, and task_stack_info_s::timestamp.
Referenced by _cpuload(), and custom_command().
|
inlinestatic |
Definition at line 79 of file load_mon.cpp.
References _cpuload(), _ram_used(), cpuload, ORB_ID, print_status(), print_usage(), Run(), and start().
|
override |
Definition at line 310 of file load_mon.cpp.
References _stack_perf, and perf_print_counter().
Referenced by custom_command().
|
static |
Definition at line 317 of file load_mon.cpp.
Referenced by custom_command().
|
overrideprivate |
Do a compute and schedule the next cycle.
Definition at line 160 of file load_mon.cpp.
References _cpuload().
Referenced by custom_command().
| void load_mon::LoadMon::start | ( | ) |
Definition at line 155 of file load_mon.cpp.
Referenced by custom_command(), and task_spawn().
|
static |
Definition at line 136 of file load_mon.cpp.
References LoadMon(), and start().
|
private |
Definition at line 116 of file load_mon.cpp.
Referenced by _cpuload().
|
private |
Definition at line 117 of file load_mon.cpp.
Referenced by _cpuload().
|
private |
Definition at line 119 of file load_mon.cpp.
Referenced by _ram_used(), print_status(), and ~LoadMon().