• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • superkaramba
 

superkaramba

  • superkaramba
  • src
gpusensor.h
1 /*******************************************************************************
2  GPU sensor
3  Copyright (C) 2024 Mavridis Philippe <mavridisf@gmail.com>
4 
5  This program is free software: you can redistribute it and/or modify it under
6  the terms of the GNU General Public License as published by the Free Software
7  Foundation, either version 3 of the License, or (at your option) any later
8  version.
9 
10  This program is distributed in the hope that it will be useful, but WITHOUT
11  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12  FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
13  You should have received a copy of the GNU General Public License along with
14  this program. If not, see <http://www.gnu.org/licenses/>.
15 
16  Improvements and feedback are welcome!
17 *******************************************************************************/
18 
19 #ifndef GPUSENSOR_H
20 #define GPUSENSOR_H
21 
22 // TDE
23 #include <tdeprocess.h>
24 
25 // Superkaramba
26 #include "sensor.h"
27 
28 class GPUSensor : public Sensor
29 {
30  TQ_OBJECT
31 
32  public:
33  GPUSensor(TQString driver, TQString gpuId, int interval = 1000);
34  ~GPUSensor();
35 
36  void update();
37  void setMaxValue(SensorParams *sp);
38 
39  protected:
40  TQString getLoad();
41 
42  private:
43  TQString m_gpuDriver, m_gpuId, m_buffer;
44  TQStringList m_command;
45  TDEProcess m_proc;
46 
47  public slots:
48  void receivedStdout(TDEProcess *proc, char *buffer, int buflen);
49  void processExited(TDEProcess *proc);
50 };
51 
52 #endif // GPUSENSOR_H
SensorParams
Hans Karlsson.
Definition: sensorparams.h:31

superkaramba

Skip menu "superkaramba"
  • Main Page
  • Alphabetical List
  • Class List
  • File List
  • Class Members

superkaramba

Skip menu "superkaramba"
  • kcalc
  •   knumber
  • superkaramba
Generated for superkaramba by doxygen 1.8.13
This website is maintained by Timothy Pearson.