F´ Flight Software - C/C++ Documentation
NASA-v2.1.0
A framework for building embedded system applications to NASA flight quality standards.
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
z
Functions
a
b
c
d
g
h
i
m
r
s
t
v
w
Variables
Typedefs
Enumerations
Enumerator
a
b
f
h
i
n
o
p
s
v
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
z
~
Functions
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
z
~
Variables
a
b
d
e
f
g
h
i
l
m
n
p
q
r
s
t
u
v
w
Typedefs
Enumerations
Enumerator
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
w
Related Functions
Files
File List
File Members
All
_
a
b
c
d
f
g
h
i
k
l
m
n
p
r
s
t
u
v
Functions
f
i
m
p
s
u
Variables
Typedefs
Enumerations
Enumerator
c
d
f
m
p
r
s
t
Macros
_
a
c
d
f
g
h
i
k
l
m
n
p
r
s
t
u
v
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
SystemResources.hpp
Go to the documentation of this file.
1
// ======================================================================
2
// \title SystemResources.hpp
3
// \author mstarch
4
// \brief hpp file for SystemResources component implementation class
5
//
6
// \copyright
7
// Copyright 2021, by the California Institute of Technology.
8
// ALL RIGHTS RESERVED. United States Government Sponsorship
9
// acknowledged.
10
//
11
// ======================================================================
12
#ifndef _SystemResources_hpp_
13
#define _SystemResources_hpp_
14
15
#include <
Fw/Types/BasicTypes.hpp
>
16
17
namespace
Os
{
18
namespace
SystemResources {
19
20
enum
SystemResourcesStatus
{
21
SYSTEM_RESOURCES_OK
,
22
SYSTEM_RESOURCES_ERROR
,
23
};
24
25
struct
CpuTicks
{
26
U64
used
;
27
U64
total
;
28
};
29
30
struct
MemUtil
{
31
U64
used
;
32
U64
total
;
33
};
34
41
SystemResourcesStatus
getCpuCount
(U32& cpu_count);
42
54
SystemResourcesStatus
getCpuTicks
(
CpuTicks
& ticks, U32 cpu_index = 0);
55
65
SystemResourcesStatus
getMemUtil
(
MemUtil
& memory_util);
66
}
// namespace SystemResources
67
}
// namespace Os
68
69
#endif
Os
Definition:
File.cpp:7
Os::SystemResources::SystemResourcesStatus
SystemResourcesStatus
Definition:
SystemResources.hpp:20
Os::SystemResources::CpuTicks
Definition:
SystemResources.hpp:25
Os::SystemResources::CpuTicks::used
U64 used
Filled with non-idle (system, user) CPU ticks.
Definition:
SystemResources.hpp:26
Os::SystemResources::SYSTEM_RESOURCES_OK
@ SYSTEM_RESOURCES_OK
Call was successful.
Definition:
SystemResources.hpp:21
Os::SystemResources::SYSTEM_RESOURCES_ERROR
@ SYSTEM_RESOURCES_ERROR
Call failed.
Definition:
SystemResources.hpp:22
Os::SystemResources::MemUtil::used
U64 used
Filled with used bytes of volatile memory (permanent, paged-in)
Definition:
SystemResources.hpp:31
U64
#define U64(C)
Definition:
sha.h:176
Os::SystemResources::getCpuTicks
SystemResourcesStatus getCpuTicks(CpuTicks &ticks, U32 cpu_index=0)
Get the CPU tick information for a given CPU.
Definition:
SystemResources.cpp:21
Os::SystemResources::MemUtil
Definition:
SystemResources.hpp:30
Os::SystemResources::CpuTicks::total
U64 total
Filled with total CPU ticks.
Definition:
SystemResources.hpp:27
Os::SystemResources::getCpuCount
SystemResourcesStatus getCpuCount(U32 &cpu_count)
Request the count of the CPUs detected by the system.
Definition:
SystemResources.cpp:15
BasicTypes.hpp
Declares ISF basic types.
Os::SystemResources::MemUtil::total
U64 total
Filled with total non-volatile memory.
Definition:
SystemResources.hpp:32
Os::SystemResources::getMemUtil
SystemResourcesStatus getMemUtil(MemUtil &memory_util)
Calculate the across-all-cpu average tick information.
Definition:
SystemResources.cpp:29
Os
SystemResources.hpp
Generated by
1.8.17