Subversion Repositories ALCASAR

Rev

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

Rev Author Line No. Line
2788 rexy 1
<?php
2
/**
3
 * UPSDevice 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.UPSDevice.inc.php 262 2009-06-22 10:48:33Z bigmichi1 $
13
 * @link      http://phpsysinfo.sourceforge.net
14
 */
15
 /**
16
 * UPSDevice 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 UPSDevice
27
{
28
    /**
29
     * name of the ups
30
     *
31
     * @var String
32
     */
33
    private $_name = "";
34
 
35
    /**
36
     * model of the ups
37
     *
38
     * @var String
39
     */
40
    private $_model = "";
41
 
42
    /**
43
     * mode of the ups
44
     *
45
     * @var String
46
     */
47
    private $_mode = "";
48
 
49
    /**
50
     * last start time
51
     *
52
     * @var String
53
     */
54
    private $_startTime = "";
55
 
56
    /**
57
     * status of the ups
58
     *
59
     * @var String
60
     */
61
    private $_status = "";
62
 
63
    /**
64
     * temperature of the ups
65
     *
66
     * @var Integer
67
     */
68
    private $_temperatur = null;
69
 
70
    /**
71
     * outages count
72
     *
73
     * @var Integer
74
     */
75
    private $_outages = null;
76
 
77
    /**
78
     * date of last outtage
79
     *
80
     * @var String
81
     */
82
    private $_lastOutage = null;
83
 
84
    /**
85
     * date of last outage finish
86
     *
87
     * @var String
88
     */
89
    private $_lastOutageFinish = null;
90
 
91
    /**
92
     * line volt
93
     *
94
     * @var Integer
95
     */
96
    private $_lineVoltage = null;
97
 
98
    /**
99
     * line freq
100
     *
101
     * @var Integer
102
     */
103
    private $_lineFrequency = null;
104
 
105
    /**
106
     * current load of the ups in percent
107
     *
108
     * @var Integer
109
     */
110
    private $_load = null;
111
 
112
    /**
113
     * battery installation date
114
     *
115
     * @var String
116
     */
117
    private $_batteryDate = null;
118
 
119
    /**
120
     * current battery volt
121
     *
122
     * @var Integer
123
     */
124
    private $_batteryVoltage = null;
125
 
126
    /**
127
     * current charge in percent of the battery
128
     *
129
     * @var Integer
130
     */
131
    private $_batterCharge = null;
132
 
133
    /**
134
     * time left
135
     *
136
     * @var String
137
     */
138
    private $_timeLeft = null;
139
 
140
    /**
141
     * Returns $_batterCharge.
142
     *
143
     * @see UPSDevice::$_batterCharge
144
     *
145
     * @return integer
146
     */
147
    public function getBatterCharge()
148
    {
149
        return $this->_batterCharge;
150
    }
151
 
152
    /**
153
     * Sets $_batterCharge.
154
     *
155
     * @param Integer $batterCharge battery charge
156
     *
157
     * @see UPSDevice::$_batterCharge
158
     *
159
     * @return void
160
     */
161
    public function setBatterCharge($batterCharge)
162
    {
163
        $this->_batterCharge = $batterCharge;
164
    }
165
 
166
    /**
167
     * Returns $_batteryDate.
168
     *
169
     * @see UPSDevice::$_batteryDate
170
     *
171
     * @return String
172
     */
173
    public function getBatteryDate()
174
    {
175
        return $this->_batteryDate;
176
    }
177
 
178
    /**
179
     * Sets $_batteryDate.
180
     *
181
     * @param object $batteryDate battery date
182
     *
183
     * @see UPSDevice::$_batteryDate
184
     *
185
     * @return Void
186
     */
187
    public function setBatteryDate($batteryDate)
188
    {
189
        $this->_batteryDate = $batteryDate;
190
    }
191
 
192
    /**
193
     * Returns $_batteryVoltage.
194
     *
195
     * @see UPSDevice::$_batteryVoltage
196
     *
197
     * @return Integer
198
     */
199
    public function getBatteryVoltage()
200
    {
201
        return $this->_batteryVoltage;
202
    }
203
 
204
    /**
205
     * Sets $_batteryVoltage.
206
     *
207
     * @param Integer $batteryVoltage battery volt
208
     *
209
     * @see UPSDevice::$_batteryVoltage
210
     *
211
     * @return Void
212
     */
213
    public function setBatteryVoltage($batteryVoltage)
214
    {
215
        $this->_batteryVoltage = $batteryVoltage;
216
    }
217
 
218
    /**
219
     * Returns $_lastOutage.
220
     *
221
     * @see UPSDevice::$_lastOutage
222
     *
223
     * @return String
224
     */
225
    public function getLastOutage()
226
    {
227
        return $this->_lastOutage;
228
    }
229
 
230
    /**
231
     * Sets $_lastOutage.
232
     *
233
     * @param String $lastOutage last Outage
234
     *
235
     * @see UPSDevice::$lastOutage
236
     *
237
     * @return Void
238
     */
239
    public function setLastOutage($lastOutage)
240
    {
241
        $this->_lastOutage = $lastOutage;
242
    }
243
 
244
    /**
245
     * Returns $_lastOutageFinish.
246
     *
247
     * @see UPSDevice::$_lastOutageFinish
248
     *
249
     * @return String
250
     */
251
    public function getLastOutageFinish()
252
    {
253
        return $this->_lastOutageFinish;
254
    }
255
 
256
    /**
257
     * Sets $_lastOutageFinish.
258
     *
259
     * @param String $lastOutageFinish last outage finish
260
     *
261
     * @see UPSDevice::$_lastOutageFinish
262
     *
263
     * @return Void
264
     */
265
    public function setLastOutageFinish($lastOutageFinish)
266
    {
267
        $this->_lastOutageFinish = $lastOutageFinish;
268
    }
269
 
270
    /**
271
     * Returns $_lineVoltage.
272
     *
273
     * @see UPSDevice::$_lineVoltage
274
     *
275
     * @return Integer
276
     */
277
    public function getLineVoltage()
278
    {
279
        return $this->_lineVoltage;
280
    }
281
 
282
    /**
283
     * Sets $_lineVoltage.
284
     *
285
     * @param Integer $lineVoltage line voltage
286
     *
287
     * @see UPSDevice::$_lineVoltage
288
     *
289
     * @return Void
290
     */
291
    public function setLineVoltage($lineVoltage)
292
    {
293
        $this->_lineVoltage = $lineVoltage;
294
    }
295
 
296
    /**
297
     * Returns $_lineFrequency.
298
     *
299
     * @see UPSDevice::$_lineFrequency
300
     *
301
     * @return Integer
302
     */
303
    public function getLineFrequency()
304
    {
305
        return $this->_lineFrequency;
306
    }
307
 
308
    /**
309
     * Sets $_lineFrequency.
310
     *
311
     * @param Integer $lineFrequency line frequency
312
     *
313
     * @see UPSDevice::$_lineFrequency
314
     *
315
     * @return Void
316
     */
317
    public function setLineFrequency($lineFrequency)
318
    {
319
        $this->_lineFrequency = $lineFrequency;
320
    }
321
 
322
    /**
323
     * Returns $_load.
324
     *
325
     * @see UPSDevice::$_load
326
     *
327
     * @return Integer
328
     */
329
    public function getLoad()
330
    {
331
        return $this->_load;
332
    }
333
 
334
    /**
335
     * Sets $_load.
336
     *
337
     * @param Integer $load current load
338
     *
339
     * @see UPSDevice::$_load
340
     *
341
     * @return Void
342
     */
343
    public function setLoad($load)
344
    {
345
        $this->_load = $load;
346
    }
347
 
348
    /**
349
     * Returns $_mode.
350
     *
351
     * @see UPSDevice::$_mode
352
     *
353
     * @return String
354
     */
355
    public function getMode()
356
    {
357
        return $this->_mode;
358
    }
359
 
360
    /**
361
     * Sets $_mode.
362
     *
363
     * @param String $mode mode
364
     *
365
     * @see UPSDevice::$_mode
366
     *
367
     * @return Void
368
     */
369
    public function setMode($mode)
370
    {
371
        $this->_mode = $mode;
372
    }
373
 
374
    /**
375
     * Returns $_model.
376
     *
377
     * @see UPSDevice::$_model
378
     *
379
     * @return String
380
     */
381
    public function getModel()
382
    {
383
        return $this->_model;
384
    }
385
 
386
    /**
387
     * Sets $_model.
388
     *
389
     * @param String $model model
390
     *
391
     * @see UPSDevice::$_model
392
     *
393
     * @return Void
394
     */
395
    public function setModel($model)
396
    {
397
        $this->_model = $model;
398
    }
399
 
400
    /**
401
     * Returns $_name.
402
     *
403
     * @see UPSDevice::$_name
404
     *
405
     * @return String
406
     */
407
    public function getName()
408
    {
409
        return $this->_name;
410
    }
411
 
412
    /**
413
     * Sets $_name.
414
     *
415
     * @param String $name name
416
     *
417
     * @see UPSDevice::$_name
418
     *
419
     * @return Void
420
     */
421
    public function setName($name)
422
    {
423
        $this->_name = $name;
424
    }
425
 
426
    /**
427
     * Returns $_outages.
428
     *
429
     * @see UPSDevice::$_outages
430
     *
431
     * @return Integer
432
     */
433
    public function getOutages()
434
    {
435
        return $this->_outages;
436
    }
437
 
438
    /**
439
     * Sets $_outages.
440
     *
441
     * @param Integer $outages outages count
442
     *
443
     * @see UPSDevice::$_outages
444
     *
445
     * @return Void
446
     */
447
    public function setOutages($outages)
448
    {
449
        $this->_outages = $outages;
450
    }
451
 
452
    /**
453
     * Returns $_startTime.
454
     *
455
     * @see UPSDevice::$_startTime
456
     *
457
     * @return String
458
     */
459
    public function getStartTime()
460
    {
461
        return $this->_startTime;
462
    }
463
 
464
    /**
465
     * Sets $_startTime.
466
     *
467
     * @param String $startTime startTime
468
     *
469
     * @see UPSDevice::$_startTime
470
     *
471
     * @return Void
472
     */
473
    public function setStartTime($startTime)
474
    {
475
        $this->_startTime = $startTime;
476
    }
477
 
478
    /**
479
     * Returns $_status.
480
     *
481
     * @see UPSDevice::$_status
482
     *
483
     * @return String
484
     */
485
    public function getStatus()
486
    {
487
        return $this->_status;
488
    }
489
 
490
    /**
491
     * Sets $_status.
492
     *
493
     * @param String $status status
494
     *
495
     * @see UPSDevice::$_status
496
     *
497
     * @return Void
498
     */
499
    public function setStatus($status)
500
    {
501
        $this->_status = $status;
502
    }
503
 
504
    /**
505
     * Returns $_temperatur.
506
     *
507
     * @see UPSDevice::$_temperatur
508
     *
509
     * @return Integer
510
     */
511
    public function getTemperatur()
512
    {
513
        return $this->_temperatur;
514
    }
515
 
516
    /**
517
     * Sets $_temperatur.
518
     *
519
     * @param Integer $temperatur temperature
520
     *
521
     * @see UPSDevice::$_temperatur
522
     *
523
     * @return Void
524
     */
525
    public function setTemperatur($temperatur)
526
    {
527
        $this->_temperatur = $temperatur;
528
    }
529
 
530
    /**
531
     * Returns $_timeLeft.
532
     *
533
     * @see UPSDevice::$_timeLeft
534
     *
535
     * @return String
536
     */
537
    public function getTimeLeft()
538
    {
539
        return $this->_timeLeft;
540
    }
541
 
542
    /**
543
     * Sets $_timeLeft.
544
     *
545
     * @param String $timeLeft time left
546
     *
547
     * @see UPSDevice::$_timeLeft
548
     *
549
     * @return Void
550
     */
551
    public function setTimeLeft($timeLeft)
552
    {
553
        $this->_timeLeft = $timeLeft;
554
    }
555
}