Paparazzi UAS
v5.8.2_stable-0-g6260b7c
Paparazzi is a free software Unmanned Aircraft System.
|
#include "core/sys_mon.h"
#include "mcu_periph/sys_time.h"
#include "mcu_periph/uart.h"
#include "messages.h"
#include "subsystems/datalink/downlink.h"
Go to the source code of this file.
Functions | |
void | init_sysmon (void) |
Init system monitoring. More... | |
void | periodic_report_sysmon (void) |
Report system status. More... | |
void | periodic_sysmon (void) |
Analyse periodic calls Should be run at the highest frequency. More... | |
void | event_sysmon (void) |
Analyse event calls. More... | |
Variables | |
struct SysMon | sys_mon |
Global system monitor data (averaged over 1 sec) More... | |
static uint16_t | n_periodic |
static uint16_t | n_event |
static uint32_t | periodic_timer |
static uint32_t | periodic_cycle |
static uint32_t | event_timer |
static uint32_t | sum_time_periodic |
in usec More... | |
static uint32_t | sum_cycle_periodic |
in usec More... | |
static uint32_t | sum_time_event |
in usec More... | |
static uint32_t | min_time_event |
in usec More... | |
static uint32_t | sum_n_event |
void event_sysmon | ( | void | ) |
Analyse event calls.
Store event calls total time and number of calls between two periodic calls
Definition at line 125 of file sys_mon.c.
References event_timer, min_time_event, n_event, sum_time_event, SysTimeTimer, and SysTimeTimerStart.
void init_sysmon | ( | void | ) |
Init system monitoring.
Definition at line 41 of file sys_mon.c.
References SysMon::cpu_load, SysMon::event_number, min_time_event, n_event, n_periodic, SysMon::periodic_cycle, SysMon::periodic_cycle_max, SysMon::periodic_cycle_min, SysMon::periodic_time, SysMon::periodic_time_max, SysMon::periodic_time_min, periodic_timer, sum_cycle_periodic, sum_n_event, sum_time_event, sum_time_periodic, and sys_mon.
void periodic_report_sysmon | ( | void | ) |
Report system status.
Report system status at low frequency
Definition at line 66 of file sys_mon.c.
References SysMon::cpu_load, DefaultChannel, DefaultDevice, SysMon::event_number, Max, n_periodic, SysMon::periodic_cycle, SysMon::periodic_cycle_max, SysMon::periodic_cycle_min, SysMon::periodic_time, SysMon::periodic_time_max, SysMon::periodic_time_min, sum_cycle_periodic, sum_n_event, sum_time_periodic, and sys_mon.
void periodic_sysmon | ( | void | ) |
Analyse periodic calls Should be run at the highest frequency.
Estimate periodic task cycle time
Definition at line 92 of file sys_mon.c.
References min_time_event, n_event, n_periodic, periodic_cycle, SysMon::periodic_cycle_max, SysMon::periodic_cycle_min, SysMon::periodic_time_max, SysMon::periodic_time_min, periodic_timer, sum_cycle_periodic, sum_n_event, sum_time_event, sum_time_periodic, sys_mon, SysTimeTimer, and SysTimeTimerStart.
|
static |
Definition at line 34 of file sys_mon.c.
Referenced by event_sysmon().
|
static |
in usec
Definition at line 38 of file sys_mon.c.
Referenced by event_sysmon(), init_sysmon(), and periodic_sysmon().
|
static |
Definition at line 31 of file sys_mon.c.
Referenced by event_sysmon(), init_sysmon(), and periodic_sysmon().
|
static |
Definition at line 30 of file sys_mon.c.
Referenced by init_sysmon(), periodic_report_sysmon(), and periodic_sysmon().
|
static |
Definition at line 33 of file sys_mon.c.
Referenced by periodic_sysmon().
|
static |
Definition at line 32 of file sys_mon.c.
Referenced by init_sysmon(), and periodic_sysmon().
|
static |
in usec
Definition at line 36 of file sys_mon.c.
Referenced by init_sysmon(), periodic_report_sysmon(), and periodic_sysmon().
|
static |
Definition at line 39 of file sys_mon.c.
Referenced by init_sysmon(), periodic_report_sysmon(), and periodic_sysmon().
|
static |
in usec
Definition at line 37 of file sys_mon.c.
Referenced by event_sysmon(), init_sysmon(), and periodic_sysmon().
|
static |
in usec
Definition at line 35 of file sys_mon.c.
Referenced by init_sysmon(), periodic_report_sysmon(), and periodic_sysmon().
struct SysMon sys_mon |
Global system monitor data (averaged over 1 sec)
Definition at line 27 of file sys_mon.c.
Referenced by init_sysmon(), periodic_report_sysmon(), and periodic_sysmon().