Paparazzi UAS  v6.2_unstable
Paparazzi is a free software Unmanned Aircraft System.
rtos_mon.c
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2016 Gautier Hattenberger <gautier.hattenberger@enac.fr>
3  *
4  * This file is part of paparazzi
5  *
6  * paparazzi is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2, or (at your option)
9  * any later version.
10  *
11  * paparazzi is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with paparazzi; see the file COPYING. If not, see
18  * <http://www.gnu.org/licenses/>.
19  */
26 #include "modules/core/sys_mon.h"
29 
31 
32 void init_sysmon(void)
33 {
34  // zero structure
35  memset(&rtos_mon, 0, sizeof(struct rtos_monitoring));
36  // arch init
38 }
39 
40 
41 // Periodic report of RTOS parameters
42 // This function is actually arch dependent
44 {
45  // update struct
47 
48  // update cpu time
50 
51  // send report
52  DOWNLINK_SEND_RTOS_MON(DefaultChannel, DefaultDevice,
60 
61 }
62 
63 void periodic_sysmon(void) {}
64 
65 void event_sysmon(void) {}
rtos_monitoring
Definition: sys_mon_rtos.h:46
rtos_monitoring::thread_counter
uint8_t thread_counter
number of threads
Definition: sys_mon_rtos.h:52
get_sys_time_float
static float get_sys_time_float(void)
Get the time in seconds since startup.
Definition: sys_time.h:138
rtos_monitoring::heap_largest
uint32_t heap_largest
Largest free block in the heap.
Definition: sys_mon_rtos.h:50
sys_mon.h
periodic_report_sysmon
void periodic_report_sysmon(void)
Report system status.
Definition: rtos_mon.c:43
rtos_mon
struct rtos_monitoring rtos_mon
Definition: rtos_mon.c:30
event_sysmon
void event_sysmon(void)
Analyse event calls.
Definition: rtos_mon.c:65
init_sysmon
void init_sysmon(void)
Init system monitoring.
Definition: rtos_mon.c:32
rtos_mon_periodic_arch
void rtos_mon_periodic_arch(void)
Definition: rtos_mon_arch.c:169
rtos_monitoring::cpu_time
float cpu_time
Definition: sys_mon_rtos.h:57
rtos_monitoring::heap_free_memory
uint32_t heap_free_memory
Total fragmented free memory in the heap.
Definition: sys_mon_rtos.h:48
sys_mon_rtos.h
periodic_sysmon
void periodic_sysmon(void)
Analyse periodic calls Should be run at the highest frequency.
Definition: rtos_mon.c:63
rtos_monitoring::core_free_memory
uint32_t core_free_memory
core free memory in bytes
Definition: sys_mon_rtos.h:47
rtos_monitoring::heap_fragments
uint32_t heap_fragments
Number of fragments in the heap.
Definition: sys_mon_rtos.h:49
rtos_mon_init_arch
void rtos_mon_init_arch(void)
Definition: rtos_mon_arch.c:160
rtos_monitoring::cpu_load
uint8_t cpu_load
global CPU/MCU load in %
Definition: sys_mon_rtos.h:51