|
PX4 Firmware
PX4 Autopilot Software http://px4.io
|
Print the current system load. More...
#include <px4_platform_common/posix.h>#include <unistd.h>#include <string.h>#include <stdio.h>#include <stdbool.h>#include <systemlib/cpuload.h>#include <systemlib/printload.h>#include <drivers/drv_hrt.h>Go to the source code of this file.
Macros | |
| #define | CL "\033[K" |
Functions | |
| void | init_print_load_s (uint64_t t, struct print_load_s *s) |
| void | print_load (uint64_t t, int fd, struct print_load_s *print_state) |
| void | print_load_buffer (uint64_t t, char *buffer, int buffer_length, print_load_callback_f cb, void *user, struct print_load_s *print_state) |
| Print load to a buffer, and call cb after each written line (buffer will not include ' ') More... | |
Variables | |
| struct system_load_s | system_load |
Print the current system load.
Definition in file print_load_posix.c.
| #define CL "\033[K" |
Definition at line 64 of file print_load_posix.c.
Referenced by print_load().
| void init_print_load_s | ( | uint64_t | t, |
| struct print_load_s * | s | ||
| ) |
Definition at line 66 of file print_load_posix.c.
References print_load_s::blocked_count, CONFIG_MAX_TASKS, print_load_s::interval_start_time, print_load_s::interval_time_ms_inv, print_load_s::last_times, print_load_s::new_time, print_load_s::running_count, and print_load_s::total_user_time.
Referenced by px4::logger::Logger::initialize_load_output(), and top_main().
| void print_load | ( | uint64_t | t, |
| int | fd, | ||
| struct print_load_s * | print_state | ||
| ) |
Definition at line 84 of file print_load_posix.c.
References CL.
Referenced by top_main().
| void print_load_buffer | ( | uint64_t | t, |
| char * | buffer, | ||
| int | buffer_length, | ||
| print_load_callback_f | cb, | ||
| void * | user, | ||
| struct print_load_s * | print_state | ||
| ) |
Print load to a buffer, and call cb after each written line (buffer will not include '
')
Definition at line 178 of file print_load_posix.c.
Referenced by px4::logger::Logger::initialize_load_output(), and px4::logger::Logger::write_load_output().
| struct system_load_s system_load |