Subversion Repositories ALCASAR

Rev

Go to most recent revision | Details | Last modification | View Log

Rev Author Line No. Line
2788 rexy 1
<?php
2
/**
3
 * CpuDevice TO class
4
 *
5
 * PHP version 5
6
 *
7
 * @category  PHP
8
 * @package   PSI_TO
9
 * @author    Michael Cramer <BigMichi1@users.sourceforge.net>
10
 * @copyright 2009 phpSysInfo
11
 * @license   http://opensource.org/licenses/gpl-2.0.php GNU General Public License version 2, or (at your option) any later version
12
 * @version   SVN: $Id: class.CpuDevice.inc.php 411 2010-12-28 22:32:52Z Jacky672 $
13
 * @link      http://phpsysinfo.sourceforge.net
14
 */
15
 /**
16
 * CpuDevice TO class
17
 *
18
 * @category  PHP
19
 * @package   PSI_TO
20
 * @author    Michael Cramer <BigMichi1@users.sourceforge.net>
21
 * @copyright 2009 phpSysInfo
22
 * @license   http://opensource.org/licenses/gpl-2.0.php GNU General Public License version 2, or (at your option) any later version
23
 * @version   Release: 3.0
24
 * @link      http://phpsysinfo.sourceforge.net
25
 */
26
class CpuDevice
27
{
28
    /**
29
     * model of the cpu
30
     *
31
     * @var String
32
     */
33
    private $_model = "";
34
 
35
    /**
36
     * speed of the cpu in hertz
37
     *
38
     * @var Integer
39
     */
40
    private $_cpuSpeed = 0;
41
 
42
    /**
43
     * max speed of the cpu in hertz
44
     *
45
     * @var Integer
46
     */
47
    private $_cpuSpeedMax = 0;
48
 
49
    /**
50
     * min speed of the cpu in hertz
51
     *
52
     * @var Integer
53
     */
54
    private $_cpuSpeedMin = 0;
55
 
56
    /**
57
     * cache size in bytes, if available
58
     *
59
     * @var Integer
60
     */
61
    private $_cache = null;
62
 
63
    /**
64
     * virtualization, if available
65
     *
66
     * @var String
67
     */
68
    private $_virt = null;
69
 
70
    /**
71
     * busspeed in hertz, if available
72
     *
73
     * @var Integer
74
     */
75
    private $_busSpeed = null;
76
 
77
    /**
78
     * bogomips of the cpu, if available
79
     *
80
     * @var Integer
81
     */
82
    private $_bogomips = null;
83
 
84
    /**
85
     * temperature of the cpu, if available
86
     *
87
     * @var Integer
88
     */
89
    private $_temp = null;
90
 
91
    /**
92
     * vendorid, if available
93
     *
94
     * @var String
95
     */
96
    private $_vendorid = null;
97
 
98
    /**
99
     * current load in percent of the cpu, if available
100
     *
101
     * @var Integer
102
     */
103
    private $_load = null;
104
 
105
    /**
106
     * Returns $_model.
107
     *
108
     * @see Cpu::$_model
109
     *
110
     * @return String
111
     */
112
    public function getModel()
113
    {
114
        return $this->_model;
115
    }
116
 
117
    /**
118
     * Sets $_model.
119
     *
120
     * @param String $model cpumodel
121
     *
122
     * @see Cpu::$_model
123
     *
124
     * @return Void
125
     */
126
    public function setModel($model)
127
    {
128
        $this->_model = $model;
129
    }
130
 
131
    /**
132
     * Returns $_cpuSpeed.
133
     *
134
     * @see Cpu::$_cpuSpeed
135
     *
136
     * @return Integer
137
     */
138
    public function getCpuSpeed()
139
    {
140
        return $this->_cpuSpeed;
141
    }
142
 
143
    /**
144
     * Sets $_cpuSpeed.
145
     *
146
     * @param Integer $cpuSpeed cpuspeed
147
     *
148
     * @see Cpu::$_cpuSpeed
149
     *
150
     * @return Void
151
     */
152
    public function setCpuSpeed($cpuSpeed)
153
    {
154
        $this->_cpuSpeed = $cpuSpeed;
155
    }
156
 
157
    /**
158
     * Returns $_cpuSpeedMax.
159
     *
160
     * @see Cpu::$_cpuSpeedMAx
161
     *
162
     * @return Integer
163
     */
164
    public function getCpuSpeedMax()
165
    {
166
        return $this->_cpuSpeedMax;
167
    }
168
 
169
    /**
170
     * Sets $_cpuSpeedMax.
171
     *
172
     * @param Integer $cpuSpeedMax cpuspeedmax
173
     *
174
     * @see Cpu::$_cpuSpeedMax
175
     *
176
     * @return Void
177
     */
178
    public function setCpuSpeedMax($cpuSpeedMax)
179
    {
180
        $this->_cpuSpeedMax = $cpuSpeedMax;
181
    }
182
 
183
    /**
184
     * Returns $_cpuSpeedMin.
185
     *
186
     * @see Cpu::$_cpuSpeedMin
187
     *
188
     * @return Integer
189
     */
190
    public function getCpuSpeedMin()
191
    {
192
        return $this->_cpuSpeedMin;
193
    }
194
 
195
    /**
196
     * Sets $_cpuSpeedMin.
197
     *
198
     * @param Integer $cpuSpeedMin cpuspeedmin
199
     *
200
     * @see Cpu::$_cpuSpeedMin
201
     *
202
     * @return Void
203
     */
204
    public function setCpuSpeedMin($cpuSpeedMin)
205
    {
206
        $this->_cpuSpeedMin = $cpuSpeedMin;
207
    }
208
 
209
    /**
210
     * Returns $_cache.
211
     *
212
     * @see Cpu::$_cache
213
     *
214
     * @return Integer
215
     */
216
    public function getCache()
217
    {
218
        return $this->_cache;
219
    }
220
 
221
    /**
222
     * Sets $_cache.
223
     *
224
     * @param Integer $cache cache size
225
     *
226
     * @see Cpu::$_cache
227
     *
228
     * @return Void
229
     */
230
    public function setCache($cache)
231
    {
232
        $this->_cache = $cache;
233
    }
234
 
235
    /**
236
     * Returns $_virt.
237
     *
238
     * @see Cpu::$_virt
239
     *
240
     * @return String
241
     */
242
    public function getVirt()
243
    {
244
        return $this->_virt;
245
    }
246
 
247
    /**
248
     * Sets $_virt.
249
     *
250
     * @param string $virt
251
     *
252
     * @see Cpu::$_virt
253
     *
254
     * @return Void
255
     */
256
    public function setVirt($virt)
257
    {
258
        $this->_virt = $virt;
259
    }
260
 
261
    /**
262
     * Returns $_busSpeed.
263
     *
264
     * @see Cpu::$_busSpeed
265
     *
266
     * @return Integer
267
     */
268
    public function getBusSpeed()
269
    {
270
        return $this->_busSpeed;
271
    }
272
 
273
    /**
274
     * Sets $_busSpeed.
275
     *
276
     * @param Integer $busSpeed busspeed
277
     *
278
     * @see Cpu::$_busSpeed
279
     *
280
     * @return Void
281
     */
282
    public function setBusSpeed($busSpeed)
283
    {
284
        $this->_busSpeed = $busSpeed;
285
    }
286
 
287
    /**
288
     * Returns $_bogomips.
289
     *
290
     * @see Cpu::$_bogomips
291
     *
292
     * @return Integer
293
     */
294
    public function getBogomips()
295
    {
296
        return $this->_bogomips;
297
    }
298
 
299
    /**
300
     * Sets $_bogomips.
301
     *
302
     * @param Integer $bogomips bogompis
303
     *
304
     * @see Cpu::$_bogomips
305
     *
306
     * @return Void
307
     */
308
    public function setBogomips($bogomips)
309
    {
310
        $this->_bogomips = $bogomips;
311
    }
312
 
313
    /**
314
     * Returns $_temp.
315
     *
316
     * @see Cpu::$_temp
317
     *
318
     * @return Integer
319
     */
320
/*
321
    public function getTemp()
322
    {
323
        return $this->_temp;
324
    }
325
*/
326
 
327
    /**
328
     * Sets $_temp.
329
     *
330
     * @param Integer $temp temperature
331
     *
332
     * @see Cpu::$_temp
333
     *
334
     * @return Void
335
     */
336
/*
337
    public function setTemp($temp)
338
    {
339
        $this->_temp = $temp;
340
    }
341
*/
342
 
343
    /**
344
     * Returns $_vendorid.
345
     *
346
     * @see Cpu::$_vendorid
347
     *
348
     * @return String
349
     */
350
    public function getVendorId()
351
    {
352
        return $this->_vendorid;
353
    }
354
 
355
    /**
356
     * Sets $_vendorid.
357
     *
358
     * @param string $vendorid
359
     *
360
     * @see Cpu::$_vendorid
361
     *
362
     * @return Void
363
     */
364
    public function setVendorId($vendorid)
365
    {
366
        $this->_vendorid = $vendorid;
367
    }
368
 
369
    /**
370
     * Returns $_load.
371
     *
372
     * @see CpuDevice::$_load
373
     *
374
     * @return Integer
375
     */
376
    public function getLoad()
377
    {
378
        return $this->_load;
379
    }
380
 
381
    /**
382
     * Sets $_load.
383
     *
384
     * @param Integer $load load percent
385
     *
386
     * @see CpuDevice::$_load
387
     *
388
     * @return Void
389
     */
390
    public function setLoad($load)
391
    {
392
        $this->_load = $load;
393
    }
394
}