F´ Flight Software - C/C++ Documentation
devel
A framework for building embedded system applications to NASA flight quality standards.
|
interface for cpu implementation More...
#include <Os/Cpu.hpp>
Public Types | |
using | Status = Os::Generic::Status |
using | Ticks = Os::Generic::UsedTotal |
Public Member Functions | |
CpuInterface ()=default | |
Default constructor. More... | |
virtual | ~CpuInterface ()=default |
Default destructor. More... | |
CpuInterface (const CpuInterface &other)=delete | |
copy constructor is forbidden More... | |
virtual CpuInterface & | operator= (const CpuInterface &other)=delete |
assignment operator is forbidden More... | |
virtual Status | _getCount (FwSizeType &cpu_count)=0 |
Request the count of the CPUs detected by the system. More... | |
virtual Status | _getTicks (Ticks &ticks, FwSizeType cpu_index)=0 |
Get the CPU tick information for a given CPU. More... | |
virtual CpuHandle * | getHandle ()=0 |
return the underlying cpu handle (implementation specific). More... | |
Static Public Member Functions | |
static CpuInterface * | getDelegate (CpuHandleStorage &aligned_new_memory) |
provide a pointer to a Mutex delegate object More... | |
|
default |
Default constructor.
|
virtualdefault |
Default destructor.
|
delete |
copy constructor is forbidden
|
pure virtual |
Request the count of the CPUs detected by the system.
cpu_count | (output) filled with CPU count on system |
Implemented in Os::Stub::Cpu::StubCpu, Os::Linux::Cpu::LinuxCpu, Os::Darwin::Cpu::DarwinCpu, and Os::Cpu.
|
pure virtual |
Get the CPU tick information for a given CPU.
CPU ticks represent a small time slice of processor time. This will retrieve the used CPU ticks and total ticks for a given CPU. This information in a running accumulation and thus a sample-to-sample differencing is needed to see the 'realtime' changing load. This shall be done by the caller.
ticks | (output) filled with the tick information for the given CPU |
cpu_index | index for CPU to read. Default: 0 |
Implemented in Os::Stub::Cpu::StubCpu, Os::Cpu, Os::Linux::Cpu::LinuxCpu, and Os::Darwin::Cpu::DarwinCpu.
|
static |
provide a pointer to a Mutex delegate object
Definition at line 10 of file DefaultCpu.cpp.
|
pure virtual |
return the underlying cpu handle (implementation specific).
Implemented in Os::Stub::Cpu::StubCpu, Os::Linux::Cpu::LinuxCpu, Os::Darwin::Cpu::DarwinCpu, and Os::Cpu.
|
virtualdelete |
assignment operator is forbidden
Reimplemented in Os::Stub::Cpu::StubCpu, Os::Linux::Cpu::LinuxCpu, Os::Darwin::Cpu::DarwinCpu, and Os::Cpu.