cpu implementation
More...
#include <Os/Cpu.hpp>
cpu implementation
Definition at line 60 of file Cpu.hpp.
◆ Cpu() [1/3]
default constructor
Definition at line 10 of file Cpu.cpp.
◆ ~Cpu()
default virtual destructor
Definition at line 12 of file Cpu.cpp.
◆ Cpu() [2/3]
copy constructor is forbidden
◆ Cpu() [3/3]
copy constructor is forbidden
◆ _getCount()
Request the count of the CPUs detected by the system.
This method wraps delegates to the underlying implementation.
- Parameters
-
cpu_count | (output) filled with CPU count on system |
- Returns
- : OP_OK with valid CPU count, ERROR when error occurs
Implements Os::CpuInterface.
Definition at line 25 of file Cpu.cpp.
◆ _getTicks()
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. This method wraps delegates to the underlying implementation.
- Parameters
-
ticks | (output) filled with the tick information for the given CPU |
cpu_index | index for CPU to read. Default: 0 |
- Returns
- : ERROR when error occurs, OK otherwise.
Implements Os::CpuInterface.
Definition at line 30 of file Cpu.cpp.
◆ getCount()
Request the count of the CPUs detected by the system.
This method wraps a singleton implementation.
- Parameters
-
cpu_count | (output) filled with CPU count on system |
- Returns
- : OP_OK with valid CPU count, ERROR when error occurs
Definition at line 40 of file Cpu.cpp.
◆ getHandle()
return the underlying cpu handle (implementation specific).
- Returns
- internal task handle representation
Implements Os::CpuInterface.
Definition at line 35 of file Cpu.cpp.
◆ getSingleton()
Cpu & Os::Cpu::getSingleton |
( |
| ) |
|
|
static |
return singleton
Definition at line 20 of file Cpu.cpp.
◆ getTicks()
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. This method wraps a singleton implementation.
- Parameters
-
ticks | (output) filled with the tick information for the given CPU |
cpu_index | index for CPU to read. Default: 0 |
- Returns
- : ERROR when error occurs, OK otherwise.
Definition at line 44 of file Cpu.cpp.
◆ init()
initialize the singleton
Definition at line 16 of file Cpu.cpp.
◆ operator=()
The documentation for this class was generated from the following files: