F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
Loading...
Searching...
No Matches
Cpu.hpp
Go to the documentation of this file.
1// ======================================================================
2// \title Os/Darwin/Cpu.hpp
3// \brief Darwin implementation for Os::Cpu, header and test definitions
4// ======================================================================
5#include <Os/Cpu.hpp>
6#ifndef OS_Darwin_Cpu_HPP
7#define OS_Darwin_Cpu_HPP
8
9namespace Os {
10namespace Darwin {
11namespace Cpu {
12
15struct DarwinCpuHandle : public CpuHandle {
16};
17
22class DarwinCpu : public CpuInterface {
23 public:
26 DarwinCpu() = default;
27
29 DarwinCpu(const DarwinCpu& other) = delete;
30
32 CpuInterface& operator=(const CpuInterface& other) override = delete;
33
36 ~DarwinCpu() override = default;
37
38 // ------------------------------------
39 // Functions overrides
40 // ------------------------------------
41 public:
42
50 Status _getCount(FwSizeType& cpu_count) override;
51
63 Status _getTicks(Os::Cpu::Ticks& ticks, FwSizeType cpu_index) override;
64
72 CpuHandle *getHandle() override;
73 private:
75 DarwinCpuHandle m_handle;
76};
77} // namespace Cpu
78} // namespace Darwin
79} // namespace Os
80
81#endif // OS_Darwin_Cpu_HPP
PlatformSizeType FwSizeType
Definition FpConfig.h:35
Cpu variable handle parent.
Definition Cpu.hpp:13
interface for cpu implementation
Definition Cpu.hpp:16
stub implementation of Os::CpuInterface
Definition Cpu.hpp:22
CpuHandle * getHandle() override
returns the raw console handle
Definition Cpu.cpp:87
DarwinCpu(const DarwinCpu &other)=delete
copy constructor
CpuInterface & operator=(const CpuInterface &other) override=delete
default copy assignment
Status _getCount(FwSizeType &cpu_count) override
Request the count of the CPUs detected by the system.
Definition Cpu.cpp:68
Status _getTicks(Os::Cpu::Ticks &ticks, FwSizeType cpu_index) override
Get the CPU tick information for a given CPU.
Definition Cpu.cpp:77
~DarwinCpu() override=default
destructor
DarwinCpu()=default
constructor
Status
Generic OK/ERROR status.
Definition Os.hpp:25
Generic used/total struct.
Definition Os.hpp:31