Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
CCPUInfo Class Referenceabstract

#include <CPUInfo.h>

Inheritance diagram for CCPUInfo:
CCPUInfoPosix CCPUInfoWin10 CCPUInfoWin32 CCPUInfoAndroid CCPUInfoDarwinEmbed CCPUInfoFreebsd CCPUInfoLinux CCPUInfoOsx

Public Member Functions

virtual bool SupportsCPUUsage () const
 
virtual int GetUsedPercentage ()=0
 
virtual float GetCPUFrequency ()=0
 
virtual bool GetTemperature (CTemperature &temperature)=0
 
bool HasCoreId (int coreId) const
 
const CoreInfo GetCoreInfo (int coreId)
 
std::string GetCoresUsageString ()
 
unsigned int GetCPUFeatures () const
 
int GetCPUCount () const
 
const std::string & GetCPUModel () const
 
const std::string & GetCPUBogoMips () const
 
const std::string & GetCPUSoC () const
 
const std::string & GetCPUHardware () const
 
const std::string & GetCPURevision () const
 
const std::string & GetCPUSerial () const
 

Static Public Member Functions

static std::shared_ptr< CCPUInfoGetCPUInfo ()
 

Public Attributes

const unsigned int CPUID_INFOTYPE_MANUFACTURER = 0x00000000
 
const unsigned int CPUID_INFOTYPE_STANDARD = 0x00000001
 
const unsigned int CPUID_INFOTYPE_EXTENDED_IMPLEMENTED = 0x80000000
 
const unsigned int CPUID_INFOTYPE_EXTENDED = 0x80000001
 
const unsigned int CPUID_INFOTYPE_PROCESSOR_1 = 0x80000002
 
const unsigned int CPUID_INFOTYPE_PROCESSOR_2 = 0x80000003
 
const unsigned int CPUID_INFOTYPE_PROCESSOR_3 = 0x80000004
 
const unsigned int CPUID_00000001_ECX_SSE3 = (1 << 0)
 
const unsigned int CPUID_00000001_ECX_SSSE3 = (1 << 9)
 
const unsigned int CPUID_00000001_ECX_SSE4 = (1 << 19)
 
const unsigned int CPUID_00000001_ECX_SSE42 = (1 << 20)
 
const unsigned int CPUID_00000001_EDX_MMX = (1 << 23)
 
const unsigned int CPUID_00000001_EDX_SSE = (1 << 25)
 
const unsigned int CPUID_00000001_EDX_SSE2 = (1 << 26)
 
const unsigned int CPUID_80000001_EDX_MMX2 = (1 << 22)
 
const unsigned int CPUID_80000001_EDX_MMX = (1 << 23)
 
const unsigned int CPUID_80000001_EDX_3DNOWEXT = (1 << 30)
 
const unsigned int CPUID_80000001_EDX_3DNOW = (1U << 31)
 
const std::chrono::milliseconds MINIMUM_TIME_BETWEEN_READS {500}
 

Protected Member Functions

 CCPUInfo ()=default
 
virtual ~CCPUInfo ()=default
 

Protected Attributes

int m_lastUsedPercentage
 
XbmcThreads::EndTime m_nextUsedReadTime
 
std::string m_cpuVendor
 
std::string m_cpuModel
 
std::string m_cpuBogoMips
 
std::string m_cpuSoC
 
std::string m_cpuHardware
 
std::string m_cpuRevision
 
std::string m_cpuSerial
 
double m_usagePercent {0.0}
 
std::size_t m_activeTime {0}
 
std::size_t m_idleTime {0}
 
std::size_t m_totalTime {0}
 
int m_cpuCount
 
unsigned int m_cpuFeatures {0}
 
std::vector< CoreInfom_cores
 

Constructor & Destructor Documentation

◆ CCPUInfo()

CCPUInfo::CCPUInfo ( )
protecteddefault

◆ ~CCPUInfo()

virtual CCPUInfo::~CCPUInfo ( )
protectedvirtualdefault

Member Function Documentation

◆ GetCoreInfo()

const CoreInfo CCPUInfo::GetCoreInfo ( int coreId)

◆ GetCoresUsageString()

std::string CCPUInfo::GetCoresUsageString ( )

◆ GetCPUBogoMips()

const std::string & CCPUInfo::GetCPUBogoMips ( ) const
inline

◆ GetCPUCount()

int CCPUInfo::GetCPUCount ( ) const
inline

◆ GetCPUFeatures()

unsigned int CCPUInfo::GetCPUFeatures ( ) const
inline

◆ GetCPUFrequency()

virtual float CCPUInfo::GetCPUFrequency ( )
pure virtual

◆ GetCPUHardware()

const std::string & CCPUInfo::GetCPUHardware ( ) const
inline

◆ GetCPUInfo()

std::shared_ptr< CCPUInfo > CCPUInfo::GetCPUInfo ( )
static

◆ GetCPUModel()

const std::string & CCPUInfo::GetCPUModel ( ) const
inline

◆ GetCPURevision()

const std::string & CCPUInfo::GetCPURevision ( ) const
inline

◆ GetCPUSerial()

const std::string & CCPUInfo::GetCPUSerial ( ) const
inline

◆ GetCPUSoC()

const std::string & CCPUInfo::GetCPUSoC ( ) const
inline

◆ GetTemperature()

virtual bool CCPUInfo::GetTemperature ( CTemperature & temperature)
pure virtual

◆ GetUsedPercentage()

virtual int CCPUInfo::GetUsedPercentage ( )
pure virtual

◆ HasCoreId()

bool CCPUInfo::HasCoreId ( int coreId) const

◆ SupportsCPUUsage()

virtual bool CCPUInfo::SupportsCPUUsage ( ) const
inlinevirtual

Reimplemented in CCPUInfoAndroid.

Member Data Documentation

◆ CPUID_00000001_ECX_SSE3

const unsigned int CCPUInfo::CPUID_00000001_ECX_SSE3 = (1 << 0)

◆ CPUID_00000001_ECX_SSE4

const unsigned int CCPUInfo::CPUID_00000001_ECX_SSE4 = (1 << 19)

◆ CPUID_00000001_ECX_SSE42

const unsigned int CCPUInfo::CPUID_00000001_ECX_SSE42 = (1 << 20)

◆ CPUID_00000001_ECX_SSSE3

const unsigned int CCPUInfo::CPUID_00000001_ECX_SSSE3 = (1 << 9)

◆ CPUID_00000001_EDX_MMX

const unsigned int CCPUInfo::CPUID_00000001_EDX_MMX = (1 << 23)

◆ CPUID_00000001_EDX_SSE

const unsigned int CCPUInfo::CPUID_00000001_EDX_SSE = (1 << 25)

◆ CPUID_00000001_EDX_SSE2

const unsigned int CCPUInfo::CPUID_00000001_EDX_SSE2 = (1 << 26)

◆ CPUID_80000001_EDX_3DNOW

const unsigned int CCPUInfo::CPUID_80000001_EDX_3DNOW = (1U << 31)

◆ CPUID_80000001_EDX_3DNOWEXT

const unsigned int CCPUInfo::CPUID_80000001_EDX_3DNOWEXT = (1 << 30)

◆ CPUID_80000001_EDX_MMX

const unsigned int CCPUInfo::CPUID_80000001_EDX_MMX = (1 << 23)

◆ CPUID_80000001_EDX_MMX2

const unsigned int CCPUInfo::CPUID_80000001_EDX_MMX2 = (1 << 22)

◆ CPUID_INFOTYPE_EXTENDED

const unsigned int CCPUInfo::CPUID_INFOTYPE_EXTENDED = 0x80000001

◆ CPUID_INFOTYPE_EXTENDED_IMPLEMENTED

const unsigned int CCPUInfo::CPUID_INFOTYPE_EXTENDED_IMPLEMENTED = 0x80000000

◆ CPUID_INFOTYPE_MANUFACTURER

const unsigned int CCPUInfo::CPUID_INFOTYPE_MANUFACTURER = 0x00000000

◆ CPUID_INFOTYPE_PROCESSOR_1

const unsigned int CCPUInfo::CPUID_INFOTYPE_PROCESSOR_1 = 0x80000002

◆ CPUID_INFOTYPE_PROCESSOR_2

const unsigned int CCPUInfo::CPUID_INFOTYPE_PROCESSOR_2 = 0x80000003

◆ CPUID_INFOTYPE_PROCESSOR_3

const unsigned int CCPUInfo::CPUID_INFOTYPE_PROCESSOR_3 = 0x80000004

◆ CPUID_INFOTYPE_STANDARD

const unsigned int CCPUInfo::CPUID_INFOTYPE_STANDARD = 0x00000001

◆ m_activeTime

std::size_t CCPUInfo::m_activeTime {0}
protected

◆ m_cores

std::vector<CoreInfo> CCPUInfo::m_cores
protected

◆ m_cpuBogoMips

std::string CCPUInfo::m_cpuBogoMips
protected

◆ m_cpuCount

int CCPUInfo::m_cpuCount
protected

◆ m_cpuFeatures

unsigned int CCPUInfo::m_cpuFeatures {0}
protected

◆ m_cpuHardware

std::string CCPUInfo::m_cpuHardware
protected

◆ m_cpuModel

std::string CCPUInfo::m_cpuModel
protected

◆ m_cpuRevision

std::string CCPUInfo::m_cpuRevision
protected

◆ m_cpuSerial

std::string CCPUInfo::m_cpuSerial
protected

◆ m_cpuSoC

std::string CCPUInfo::m_cpuSoC
protected

◆ m_cpuVendor

std::string CCPUInfo::m_cpuVendor
protected

◆ m_idleTime

std::size_t CCPUInfo::m_idleTime {0}
protected

◆ m_lastUsedPercentage

int CCPUInfo::m_lastUsedPercentage
protected

◆ m_nextUsedReadTime

XbmcThreads::EndTime CCPUInfo::m_nextUsedReadTime
protected

◆ m_totalTime

std::size_t CCPUInfo::m_totalTime {0}
protected

◆ m_usagePercent

double CCPUInfo::m_usagePercent {0.0}
protected

◆ MINIMUM_TIME_BETWEEN_READS

const std::chrono::milliseconds CCPUInfo::MINIMUM_TIME_BETWEEN_READS {500}

The documentation for this class was generated from the following files: