Paparazzi UAS  v7.0_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) {}
void rtos_mon_periodic_arch(void)
void rtos_mon_init_arch(void)
struct rtos_monitoring rtos_mon
Definition: rtos_mon.c:30
void event_sysmon(void)
Analyse event calls.
Definition: rtos_mon.c:65
void periodic_sysmon(void)
Analyse periodic calls Should be run at the highest frequency.
Definition: rtos_mon.c:63
void periodic_report_sysmon(void)
Report system status.
Definition: rtos_mon.c:43
void init_sysmon(void)
Init system monitoring.
Definition: rtos_mon.c:32
System monitoring common header return cpu load, average exec time, ...
System monitoring for RTOS targets return cpu load, average exec time, ...
uint8_t cpu_load
global CPU/MCU load in %
Definition: sys_mon_rtos.h:51
uint32_t core_free_memory
core free memory in bytes
Definition: sys_mon_rtos.h:47
uint32_t heap_free_memory
Total fragmented free memory in the heap.
Definition: sys_mon_rtos.h:48
uint8_t thread_counter
number of threads
Definition: sys_mon_rtos.h:52
uint32_t heap_fragments
Number of fragments in the heap.
Definition: sys_mon_rtos.h:49
uint32_t heap_largest
Largest free block in the heap.
Definition: sys_mon_rtos.h:50
static float get_sys_time_float(void)
Get the time in seconds since startup.
Definition: sys_time.h:138