F´ Flight Software - C/C++ Documentation  devel
A framework for building embedded system applications to NASA flight quality standards.
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 <FpConfig.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 
63 } // namespace SystemResources
64 } // namespace Os
65 
66 #endif
PlatformSizeType FwSizeType
Definition: FpConfig.h:30
C++-compatible configuration header for fprime configuration.
SystemResourcesStatus getCpuTicks(CpuTicks &ticks, U32 cpu_index=0)
Get the CPU tick information for a given CPU.
SystemResourcesStatus getMemUtil(MemUtil &memory_util)
Get system memory usage.
SystemResourcesStatus getCpuCount(U32 &cpu_count)
Request the count of the CPUs detected by the system.
@ SYSTEM_RESOURCES_OK
Call was successful.
@ SYSTEM_RESOURCES_ERROR
Call failed.
FwSizeType total
Filled with total CPU ticks.
FwSizeType used
Filled with non-idle (system, user) CPU ticks.
FwSizeType used
Filled with used bytes of volatile memory (permanent, paged-in)
FwSizeType total
Filled with total non-volatile memory.