Paparazzi UAS  v4.0.4_stable-3-gf39211a
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
sys_mon.c File Reference
#include "core/sys_mon.h"
#include "mcu_periph/sys_time.h"
#include "mcu_periph/uart.h"
#include "messages.h"
#include "subsystems/datalink/downlink.h"
+ Include dependency graph for sys_mon.c:

Go to the source code of this file.

Macros

#define DOWNLINK_DEVICE   DOWNLINK_AP_DEVICE
 

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
 
uint16_t n_periodic
 
uint16_t n_event
 
uint32_t periodic_timer
 
uint32_t periodic_cycle
 
uint32_t event_timer
 
uint32_t sum_time_periodic
 in usec More...
 
uint32_t sum_cycle_periodic
 in usec More...
 
uint32_t sum_time_event
 in usec More...
 
uint32_t min_time_event
 in usec More...
 
uint32_t sum_n_event
 

Macro Definition Documentation

#define DOWNLINK_DEVICE   DOWNLINK_AP_DEVICE

Definition at line 68 of file sys_mon.c.

Function Documentation

void event_sysmon ( void  )

Analyse event calls.

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

Definition at line 113 of file sys_mon.c.

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

void periodic_report_sysmon ( void  )
void periodic_sysmon ( void  )

Analyse periodic calls Should be run at the highest frequency.

Estimate periodic task cycle time

Definition at line 91 of file sys_mon.c.

References min_time_event, n_event, n_periodic, periodic_cycle, SysMon::periodic_cycle_max, SysMon::periodic_cycle_min, periodic_timer, sum_cycle_periodic, sum_n_event, sum_time_event, sum_time_periodic, sys_mon, SysTimeTimer, and SysTimeTimerStart.

Variable Documentation

uint32_t event_timer

Definition at line 40 of file sys_mon.c.

Referenced by event_sysmon().

uint32_t min_time_event

in usec

Definition at line 44 of file sys_mon.c.

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

uint16_t n_event

Definition at line 37 of file sys_mon.c.

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

uint16_t n_periodic

Definition at line 36 of file sys_mon.c.

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

uint32_t periodic_cycle

Definition at line 39 of file sys_mon.c.

Referenced by periodic_sysmon().

uint32_t periodic_timer

Definition at line 38 of file sys_mon.c.

Referenced by init_sysmon(), and periodic_sysmon().

uint32_t sum_cycle_periodic

in usec

Definition at line 42 of file sys_mon.c.

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

uint32_t sum_n_event

Definition at line 45 of file sys_mon.c.

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

uint32_t sum_time_event

in usec

Definition at line 43 of file sys_mon.c.

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

uint32_t sum_time_periodic

in usec

Definition at line 41 of file sys_mon.c.

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

struct SysMon sys_mon

Definition at line 33 of file sys_mon.c.

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