CCIMXDesktop
 
Loading...
Searching...
No Matches
CPUStateFetcher Class Reference

The CPUStateFetcher class Provides CPU state information in a platform-independent manner. Acts as an interface for retrieving CPU state without platform-specific details. More...

#include <CPUStateFetcher.h>

Inheritance diagram for CPUStateFetcher:

Classes

struct  CPUState
 The CPUState struct Represents CPU usage state including idle, user, kernel and total time. The total time concept differs between Linux and Windows. More...
 

Signals

void flush_cpustate (const CPUStateFetcher::CPUState &state)
 flush_cpustate Signal emitted when CPU state is updated.
 

Public Member Functions

 CPUStateFetcher (QObject *parent=nullptr)
 Constructor with optional parent.
 
 ~CPUStateFetcher ()
 Destructor, cleans up resources.
 
void set_capture_state (bool st)
 set_capture_state Enables or disables the CPU state capture.
 

Public Attributes

struct CPUStateFetcher::CPUState cpustate
 cpu state memorizer
 

Detailed Description

The CPUStateFetcher class Provides CPU state information in a platform-independent manner. Acts as an interface for retrieving CPU state without platform-specific details.

Constructor & Destructor Documentation

◆ CPUStateFetcher()

CPUStateFetcher::CPUStateFetcher ( QObject *  parent = nullptr)
explicit

Constructor with optional parent.

Parameters
parentPointer to the QObject parent, default is nullptr.

Member Function Documentation

◆ flush_cpustate

void CPUStateFetcher::flush_cpustate ( const CPUStateFetcher::CPUState state)
signal

flush_cpustate Signal emitted when CPU state is updated.

Parameters
stateThe current CPU state snapshot.

◆ set_capture_state()

void CPUStateFetcher::set_capture_state ( bool  st)

set_capture_state Enables or disables the CPU state capture.

Parameters
stTrue to enable capturing, false to disable.

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