Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
sys_mon.c File Reference

System monitoring for bare metal targets return cpu load, average exec time, ... More...

#include "core/sys_mon.h"
#include "core/sys_mon_bare_metal.h"
#include "mcu_periph/sys_time.h"
#include "mcu_periph/uart.h"
#include "pprzlink/messages.h"
#include "modules/datalink/downlink.h"
+ Include dependency graph for sys_mon.c:

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
 

Detailed Description

System monitoring for bare metal targets return cpu load, average exec time, ...

Definition in file sys_mon.c.

Function Documentation

◆ event_sysmon()

void event_sysmon ( void  )

Analyse event calls.

Store event calls total time and number of calls between two periodic calls

Definition at line 133 of file sys_mon.c.

References event_timer, min_time_event, n_event, sum_time_event, SysTimeTimer, and SysTimeTimerStart.

◆ init_sysmon()

◆ periodic_report_sysmon()

void periodic_report_sysmon ( void  )

◆ periodic_sysmon()

void periodic_sysmon ( void  )

Variable Documentation

◆ event_timer

uint32_t event_timer
static

Definition at line 44 of file sys_mon.c.

Referenced by event_sysmon().

◆ min_time_event

uint32_t min_time_event
static

in usec

Definition at line 48 of file sys_mon.c.

Referenced by event_sysmon(), init_sysmon(), and periodic_sysmon().

◆ n_event

uint16_t n_event
static

Definition at line 41 of file sys_mon.c.

Referenced by event_sysmon(), init_sysmon(), and periodic_sysmon().

◆ n_periodic

uint16_t n_periodic
static

Definition at line 40 of file sys_mon.c.

Referenced by init_sysmon(), periodic_report_sysmon(), and periodic_sysmon().

◆ periodic_cycle

uint32_t periodic_cycle
static

Definition at line 43 of file sys_mon.c.

Referenced by periodic_sysmon().

◆ periodic_timer

uint32_t periodic_timer
static

Definition at line 42 of file sys_mon.c.

Referenced by init_sysmon(), and periodic_sysmon().

◆ sum_cycle_periodic

uint32_t sum_cycle_periodic
static

in usec

Definition at line 46 of file sys_mon.c.

Referenced by init_sysmon(), periodic_report_sysmon(), and periodic_sysmon().

◆ sum_n_event

uint32_t sum_n_event
static

Definition at line 49 of file sys_mon.c.

Referenced by init_sysmon(), periodic_report_sysmon(), and periodic_sysmon().

◆ sum_time_event

uint32_t sum_time_event
static

in usec

Definition at line 47 of file sys_mon.c.

Referenced by event_sysmon(), init_sysmon(), and periodic_sysmon().

◆ sum_time_periodic

uint32_t sum_time_periodic
static

in usec

Definition at line 45 of file sys_mon.c.

Referenced by init_sysmon(), periodic_report_sysmon(), and periodic_sysmon().

◆ sys_mon

struct SysMon sys_mon

Global system monitor data (averaged over 1 sec)

Definition at line 1 of file sys_mon.c.

Referenced by init_sysmon(), periodic_report_sysmon(), and periodic_sysmon().