F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
CpuInterface.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title Os/Interfaces/CpuInterface.hpp
3 // \brief pure-virtual interface implemented by Os::Cpu implementations
4 // ======================================================================
5 #ifndef OS_INTERFACES_CPUINTERFACE_HPP_
6 #define OS_INTERFACES_CPUINTERFACE_HPP_
7 
9 
10 namespace Os {
11 
14  public:
16  CpuInterface() = default;
18  virtual ~CpuInterface() = default;
19 
21  CpuInterface(const CpuInterface& other) = delete;
22 
24  virtual CpuInterface& operator=(const CpuInterface& other) = delete; // NO_CODESONAR (cpp:S3657)
25 
31  virtual Status _getCount(FwSizeType& cpu_count) = 0;
32 
43  virtual Status _getTicks(Ticks& ticks, FwSizeType cpu_index) = 0;
44 
47  virtual CpuHandle* getHandle() = 0;
48 };
49 
50 } // namespace Os
51 
52 #endif // OS_INTERFACES_CPUINTERFACE_HPP_
types and constants shared by users of Os::Cpu and by its implementations
PlatformSizeType FwSizeType
virtual Status _getCount(FwSizeType &cpu_count)=0
Request the count of the CPUs detected by the system.
virtual CpuInterface & operator=(const CpuInterface &other)=delete
assignment operator is forbidden
virtual Status _getTicks(Ticks &ticks, FwSizeType cpu_index)=0
Get the CPU tick information for a given CPU.
Cpu variable handle parent.
virtual CpuHandle * getHandle()=0
return the underlying cpu handle (implementation specific).
Status
Generic OK/ERROR status.
Definition: Os.hpp:26
CpuInterface()=default
Default constructor.
Generic used/total struct.
Definition: Os.hpp:32
virtual ~CpuInterface()=default
Default destructor.
interface for cpu implementation