F´ Flight Software - C/C++ Documentation  NASA-v2.1.0
A framework for building embedded system applications to NASA flight quality standards.
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 
23 };
24 
25 struct CpuTicks {
28 };
29 
30 struct MemUtil {
33 };
34 
41 SystemResourcesStatus getCpuCount(U32& cpu_count);
42 
54 SystemResourcesStatus getCpuTicks(CpuTicks& ticks, U32 cpu_index = 0);
55 
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