Paparazzi UAS
v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
Toggle main menu visibility
Main Page
Related Pages
Topics
Data Structures
Data Structures
Data Structure Index
Data Fields
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerator
Files
File List
Globals
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
m
n
p
r
s
t
u
v
w
Enumerations
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
v
w
z
Enumerator
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
•
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Modules
Pages
Loading...
Searching...
No Matches
rtos_mon_arch.c
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2016 Gautier Hattenberger <gautier.hattenberger@enac.fr>
3
* Copyright (C) 2016 Michal Podhradsky <michal.podhradsky@aggiemail.usu.edu>
4
*
5
* This file is part of paparazzi
6
*
7
* paparazzi is free software; you can redistribute it and/or modify
8
* it under the terms of the GNU General Public License as published by
9
* the Free Software Foundation; either version 2, or (at your option)
10
* any later version.
11
*
12
* paparazzi is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
* GNU General Public License for more details.
16
*
17
* You should have received a copy of the GNU General Public License
18
* along with paparazzi; see the file COPYING. If not, see
19
* <http://www.gnu.org/licenses/>.
20
*/
28
#include "
modules/core/sys_mon_rtos.h
"
29
#include <stdlib.h>
/* atof */
30
#include <stdio.h>
/* printf, fgets */
31
#include <string.h>
32
33
void
rtos_mon_init_arch
(
void
) {}
34
35
// Ask for CPU usage of the process
36
void
rtos_mon_periodic_arch
(
void
)
37
{
38
char
line
[20];
39
FILE
*cmd =
popen
(
"ps -C simsitl -o %CPU"
,
"r"
);
40
41
char
*
ret
;
42
ret
=
fgets
(
line
,
sizeof
(
line
), cmd);
43
ret
=
fgets
(
line
,
sizeof
(
line
), cmd);
44
if
(
ret
!=
NULL
) {
45
double
cpu =
atof
(
ret
);
46
rtos_mon
.
cpu_load
= (
uint8_t
)cpu;
47
}
48
pclose
(cmd);
49
}
36
void
rtos_mon_periodic_arch
(
void
) {
…
}
50
rtos_mon_periodic_arch
void rtos_mon_periodic_arch(void)
Definition
rtos_mon_arch.c:170
rtos_mon_init_arch
void rtos_mon_init_arch(void)
Definition
rtos_mon_arch.c:161
foo
uint16_t foo
Definition
main_demo5.c:58
rtos_mon
struct rtos_monitoring rtos_mon
Definition
rtos_mon.c:30
sys_mon_rtos.h
System monitoring for RTOS targets return cpu load, average exec time, ...
rtos_monitoring::cpu_load
uint8_t cpu_load
global CPU/MCU load in %
Definition
sys_mon_rtos.h:51
uint8_t
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.
Definition
vl53l1_types.h:98
sw
airborne
arch
sim
modules
core
rtos_mon_arch.c
Generated on Fri Apr 4 2025 14:56:49 for Paparazzi UAS by
1.9.8