Subversion Repositories ALCASAR

Rev

Rev 2788 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 2788 Rev 3037
Line 26... Line 26...
26
class UPSDevice
26
class UPSDevice
27
{
27
{
28
    /**
28
    /**
29
     * name of the ups
29
     * name of the ups
30
     *
30
     *
31
     * @var String
31
     * @var string
32
     */
32
     */
33
    private $_name = "";
33
    private $_name = "";
34
 
34
 
35
    /**
35
    /**
36
     * model of the ups
36
     * model of the ups
37
     *
37
     *
38
     * @var String
38
     * @var string
39
     */
39
     */
40
    private $_model = "";
40
    private $_model = "";
41
 
41
 
42
    /**
42
    /**
43
     * mode of the ups
43
     * mode of the ups
44
     *
44
     *
45
     * @var String
45
     * @var string
46
     */
46
     */
47
    private $_mode = "";
47
    private $_mode = "";
48
 
48
 
49
    /**
49
    /**
50
     * last start time
50
     * last start time
51
     *
51
     *
52
     * @var String
52
     * @var string
53
     */
53
     */
54
    private $_startTime = "";
54
    private $_startTime = "";
55
 
55
 
56
    /**
56
    /**
57
     * status of the ups
57
     * status of the ups
58
     *
58
     *
59
     * @var String
59
     * @var string
60
     */
60
     */
61
    private $_status = "";
61
    private $_status = "";
62
 
62
 
63
    /**
63
    /**
64
     * temperature of the ups
64
     * temperature of the ups
65
     *
65
     *
66
     * @var Integer
66
     * @var int
67
     */
67
     */
68
    private $_temperatur = null;
68
    private $_temperatur = null;
69
 
69
 
70
    /**
70
    /**
71
     * outages count
71
     * outages count
72
     *
72
     *
73
     * @var Integer
73
     * @var int
74
     */
74
     */
75
    private $_outages = null;
75
    private $_outages = null;
76
 
76
 
77
    /**
77
    /**
78
     * date of last outtage
78
     * date of last outtage
79
     *
79
     *
80
     * @var String
80
     * @var string
81
     */
81
     */
82
    private $_lastOutage = null;
82
    private $_lastOutage = null;
83
 
83
 
84
    /**
84
    /**
85
     * date of last outage finish
85
     * date of last outage finish
86
     *
86
     *
87
     * @var String
87
     * @var string
88
     */
88
     */
89
    private $_lastOutageFinish = null;
89
    private $_lastOutageFinish = null;
90
 
90
 
91
    /**
91
    /**
92
     * line volt
92
     * line volt
93
     *
93
     *
94
     * @var Integer
94
     * @var int
95
     */
95
     */
96
    private $_lineVoltage = null;
96
    private $_lineVoltage = null;
97
 
97
 
98
    /**
98
    /**
99
     * line freq
99
     * line freq
100
     *
100
     *
101
     * @var Integer
101
     * @var int
102
     */
102
     */
103
    private $_lineFrequency = null;
103
    private $_lineFrequency = null;
104
 
104
 
105
    /**
105
    /**
106
     * current load of the ups in percent
106
     * current load of the ups in percent
107
     *
107
     *
108
     * @var Integer
108
     * @var int
109
     */
109
     */
110
    private $_load = null;
110
    private $_load = null;
111
 
111
 
112
    /**
112
    /**
113
     * battery installation date
113
     * battery installation date
114
     *
114
     *
115
     * @var String
115
     * @var string
116
     */
116
     */
117
    private $_batteryDate = null;
117
    private $_batteryDate = null;
118
 
118
 
119
    /**
119
    /**
120
     * current battery volt
120
     * current battery volt
121
     *
121
     *
122
     * @var Integer
122
     * @var int
123
     */
123
     */
124
    private $_batteryVoltage = null;
124
    private $_batteryVoltage = null;
125
 
125
 
126
    /**
126
    /**
127
     * current charge in percent of the battery
127
     * current charge in percent of the battery
128
     *
128
     *
129
     * @var Integer
129
     * @var int
130
     */
130
     */
131
    private $_batterCharge = null;
131
    private $_batterCharge = null;
132
 
132
 
133
    /**
133
    /**
134
     * time left
134
     * time left
135
     *
135
     *
136
     * @var String
136
     * @var string
137
     */
137
     */
138
    private $_timeLeft = null;
138
    private $_timeLeft = null;
139
 
139
 
140
    /**
140
    /**
-
 
141
     * beeper enabled or disabled
-
 
142
     *
-
 
143
     * @var string
-
 
144
     */
-
 
145
    private $_beeperStatus = null;
-
 
146
 
-
 
147
    /**
141
     * Returns $_batterCharge.
148
     * Returns $_batterCharge.
142
     *
149
     *
143
     * @see UPSDevice::$_batterCharge
150
     * @see UPSDevice::$_batterCharge
144
     *
151
     *
145
     * @return integer
152
     * @return integer
Line 150... Line 157...
150
    }
157
    }
151
 
158
 
152
    /**
159
    /**
153
     * Sets $_batterCharge.
160
     * Sets $_batterCharge.
154
     *
161
     *
155
     * @param Integer $batterCharge battery charge
162
     * @param int $batterCharge battery charge
156
     *
163
     *
157
     * @see UPSDevice::$_batterCharge
164
     * @see UPSDevice::$_batterCharge
158
     *
165
     *
159
     * @return void
166
     * @return void
160
     */
167
     */
Line 180... Line 187...
180
     *
187
     *
181
     * @param object $batteryDate battery date
188
     * @param object $batteryDate battery date
182
     *
189
     *
183
     * @see UPSDevice::$_batteryDate
190
     * @see UPSDevice::$_batteryDate
184
     *
191
     *
185
     * @return Void
192
     * @return void
186
     */
193
     */
187
    public function setBatteryDate($batteryDate)
194
    public function setBatteryDate($batteryDate)
188
    {
195
    {
189
        $this->_batteryDate = $batteryDate;
196
        $this->_batteryDate = $batteryDate;
190
    }
197
    }
Line 192... Line 199...
192
    /**
199
    /**
193
     * Returns $_batteryVoltage.
200
     * Returns $_batteryVoltage.
194
     *
201
     *
195
     * @see UPSDevice::$_batteryVoltage
202
     * @see UPSDevice::$_batteryVoltage
196
     *
203
     *
197
     * @return Integer
204
     * @return int
198
     */
205
     */
199
    public function getBatteryVoltage()
206
    public function getBatteryVoltage()
200
    {
207
    {
201
        return $this->_batteryVoltage;
208
        return $this->_batteryVoltage;
202
    }
209
    }
203
 
210
 
204
    /**
211
    /**
205
     * Sets $_batteryVoltage.
212
     * Sets $_batteryVoltage.
206
     *
213
     *
207
     * @param Integer $batteryVoltage battery volt
214
     * @param int $batteryVoltage battery volt
208
     *
215
     *
209
     * @see UPSDevice::$_batteryVoltage
216
     * @see UPSDevice::$_batteryVoltage
210
     *
217
     *
211
     * @return Void
218
     * @return void
212
     */
219
     */
213
    public function setBatteryVoltage($batteryVoltage)
220
    public function setBatteryVoltage($batteryVoltage)
214
    {
221
    {
215
        $this->_batteryVoltage = $batteryVoltage;
222
        $this->_batteryVoltage = $batteryVoltage;
216
    }
223
    }
Line 232... Line 239...
232
     *
239
     *
233
     * @param String $lastOutage last Outage
240
     * @param String $lastOutage last Outage
234
     *
241
     *
235
     * @see UPSDevice::$lastOutage
242
     * @see UPSDevice::$lastOutage
236
     *
243
     *
237
     * @return Void
244
     * @return void
238
     */
245
     */
239
    public function setLastOutage($lastOutage)
246
    public function setLastOutage($lastOutage)
240
    {
247
    {
241
        $this->_lastOutage = $lastOutage;
248
        $this->_lastOutage = $lastOutage;
242
    }
249
    }
Line 258... Line 265...
258
     *
265
     *
259
     * @param String $lastOutageFinish last outage finish
266
     * @param String $lastOutageFinish last outage finish
260
     *
267
     *
261
     * @see UPSDevice::$_lastOutageFinish
268
     * @see UPSDevice::$_lastOutageFinish
262
     *
269
     *
263
     * @return Void
270
     * @return void
264
     */
271
     */
265
    public function setLastOutageFinish($lastOutageFinish)
272
    public function setLastOutageFinish($lastOutageFinish)
266
    {
273
    {
267
        $this->_lastOutageFinish = $lastOutageFinish;
274
        $this->_lastOutageFinish = $lastOutageFinish;
268
    }
275
    }
Line 270... Line 277...
270
    /**
277
    /**
271
     * Returns $_lineVoltage.
278
     * Returns $_lineVoltage.
272
     *
279
     *
273
     * @see UPSDevice::$_lineVoltage
280
     * @see UPSDevice::$_lineVoltage
274
     *
281
     *
275
     * @return Integer
282
     * @return int
276
     */
283
     */
277
    public function getLineVoltage()
284
    public function getLineVoltage()
278
    {
285
    {
279
        return $this->_lineVoltage;
286
        return $this->_lineVoltage;
280
    }
287
    }
281
 
288
 
282
    /**
289
    /**
283
     * Sets $_lineVoltage.
290
     * Sets $_lineVoltage.
284
     *
291
     *
285
     * @param Integer $lineVoltage line voltage
292
     * @param int $lineVoltage line voltage
286
     *
293
     *
287
     * @see UPSDevice::$_lineVoltage
294
     * @see UPSDevice::$_lineVoltage
288
     *
295
     *
289
     * @return Void
296
     * @return void
290
     */
297
     */
291
    public function setLineVoltage($lineVoltage)
298
    public function setLineVoltage($lineVoltage)
292
    {
299
    {
293
        $this->_lineVoltage = $lineVoltage;
300
        $this->_lineVoltage = $lineVoltage;
294
    }
301
    }
Line 296... Line 303...
296
    /**
303
    /**
297
     * Returns $_lineFrequency.
304
     * Returns $_lineFrequency.
298
     *
305
     *
299
     * @see UPSDevice::$_lineFrequency
306
     * @see UPSDevice::$_lineFrequency
300
     *
307
     *
301
     * @return Integer
308
     * @return int
302
     */
309
     */
303
    public function getLineFrequency()
310
    public function getLineFrequency()
304
    {
311
    {
305
        return $this->_lineFrequency;
312
        return $this->_lineFrequency;
306
    }
313
    }
307
 
314
 
308
    /**
315
    /**
309
     * Sets $_lineFrequency.
316
     * Sets $_lineFrequency.
310
     *
317
     *
311
     * @param Integer $lineFrequency line frequency
318
     * @param int $lineFrequency line frequency
312
     *
319
     *
313
     * @see UPSDevice::$_lineFrequency
320
     * @see UPSDevice::$_lineFrequency
314
     *
321
     *
315
     * @return Void
322
     * @return void
316
     */
323
     */
317
    public function setLineFrequency($lineFrequency)
324
    public function setLineFrequency($lineFrequency)
318
    {
325
    {
319
        $this->_lineFrequency = $lineFrequency;
326
        $this->_lineFrequency = $lineFrequency;
320
    }
327
    }
Line 322... Line 329...
322
    /**
329
    /**
323
     * Returns $_load.
330
     * Returns $_load.
324
     *
331
     *
325
     * @see UPSDevice::$_load
332
     * @see UPSDevice::$_load
326
     *
333
     *
327
     * @return Integer
334
     * @return int
328
     */
335
     */
329
    public function getLoad()
336
    public function getLoad()
330
    {
337
    {
331
        return $this->_load;
338
        return $this->_load;
332
    }
339
    }
333
 
340
 
334
    /**
341
    /**
335
     * Sets $_load.
342
     * Sets $_load.
336
     *
343
     *
337
     * @param Integer $load current load
344
     * @param int $load current load
338
     *
345
     *
339
     * @see UPSDevice::$_load
346
     * @see UPSDevice::$_load
340
     *
347
     *
341
     * @return Void
348
     * @return void
342
     */
349
     */
343
    public function setLoad($load)
350
    public function setLoad($load)
344
    {
351
    {
345
        $this->_load = $load;
352
        $this->_load = $load;
346
    }
353
    }
Line 362... Line 369...
362
     *
369
     *
363
     * @param String $mode mode
370
     * @param String $mode mode
364
     *
371
     *
365
     * @see UPSDevice::$_mode
372
     * @see UPSDevice::$_mode
366
     *
373
     *
367
     * @return Void
374
     * @return void
368
     */
375
     */
369
    public function setMode($mode)
376
    public function setMode($mode)
370
    {
377
    {
371
        $this->_mode = $mode;
378
        $this->_mode = $mode;
372
    }
379
    }
Line 388... Line 395...
388
     *
395
     *
389
     * @param String $model model
396
     * @param String $model model
390
     *
397
     *
391
     * @see UPSDevice::$_model
398
     * @see UPSDevice::$_model
392
     *
399
     *
393
     * @return Void
400
     * @return void
394
     */
401
     */
395
    public function setModel($model)
402
    public function setModel($model)
396
    {
403
    {
397
        $this->_model = $model;
404
        $this->_model = $model;
398
    }
405
    }
Line 414... Line 421...
414
     *
421
     *
415
     * @param String $name name
422
     * @param String $name name
416
     *
423
     *
417
     * @see UPSDevice::$_name
424
     * @see UPSDevice::$_name
418
     *
425
     *
419
     * @return Void
426
     * @return void
420
     */
427
     */
421
    public function setName($name)
428
    public function setName($name)
422
    {
429
    {
423
        $this->_name = $name;
430
        $this->_name = $name;
424
    }
431
    }
Line 426... Line 433...
426
    /**
433
    /**
427
     * Returns $_outages.
434
     * Returns $_outages.
428
     *
435
     *
429
     * @see UPSDevice::$_outages
436
     * @see UPSDevice::$_outages
430
     *
437
     *
431
     * @return Integer
438
     * @return int
432
     */
439
     */
433
    public function getOutages()
440
    public function getOutages()
434
    {
441
    {
435
        return $this->_outages;
442
        return $this->_outages;
436
    }
443
    }
437
 
444
 
438
    /**
445
    /**
439
     * Sets $_outages.
446
     * Sets $_outages.
440
     *
447
     *
441
     * @param Integer $outages outages count
448
     * @param int $outages outages count
442
     *
449
     *
443
     * @see UPSDevice::$_outages
450
     * @see UPSDevice::$_outages
444
     *
451
     *
445
     * @return Void
452
     * @return void
446
     */
453
     */
447
    public function setOutages($outages)
454
    public function setOutages($outages)
448
    {
455
    {
449
        $this->_outages = $outages;
456
        $this->_outages = $outages;
450
    }
457
    }
Line 466... Line 473...
466
     *
473
     *
467
     * @param String $startTime startTime
474
     * @param String $startTime startTime
468
     *
475
     *
469
     * @see UPSDevice::$_startTime
476
     * @see UPSDevice::$_startTime
470
     *
477
     *
471
     * @return Void
478
     * @return void
472
     */
479
     */
473
    public function setStartTime($startTime)
480
    public function setStartTime($startTime)
474
    {
481
    {
475
        $this->_startTime = $startTime;
482
        $this->_startTime = $startTime;
476
    }
483
    }
Line 492... Line 499...
492
     *
499
     *
493
     * @param String $status status
500
     * @param String $status status
494
     *
501
     *
495
     * @see UPSDevice::$_status
502
     * @see UPSDevice::$_status
496
     *
503
     *
497
     * @return Void
504
     * @return void
498
     */
505
     */
499
    public function setStatus($status)
506
    public function setStatus($status)
500
    {
507
    {
501
        $this->_status = $status;
508
        $this->_status = $status;
502
    }
509
    }
Line 504... Line 511...
504
    /**
511
    /**
505
     * Returns $_temperatur.
512
     * Returns $_temperatur.
506
     *
513
     *
507
     * @see UPSDevice::$_temperatur
514
     * @see UPSDevice::$_temperatur
508
     *
515
     *
509
     * @return Integer
516
     * @return int
510
     */
517
     */
511
    public function getTemperatur()
518
    public function getTemperatur()
512
    {
519
    {
513
        return $this->_temperatur;
520
        return $this->_temperatur;
514
    }
521
    }
515
 
522
 
516
    /**
523
    /**
517
     * Sets $_temperatur.
524
     * Sets $_temperatur.
518
     *
525
     *
519
     * @param Integer $temperatur temperature
526
     * @param int $temperatur temperature
520
     *
527
     *
521
     * @see UPSDevice::$_temperatur
528
     * @see UPSDevice::$_temperatur
522
     *
529
     *
523
     * @return Void
530
     * @return void
524
     */
531
     */
525
    public function setTemperatur($temperatur)
532
    public function setTemperatur($temperatur)
526
    {
533
    {
527
        $this->_temperatur = $temperatur;
534
        $this->_temperatur = $temperatur;
528
    }
535
    }
Line 544... Line 551...
544
     *
551
     *
545
     * @param String $timeLeft time left
552
     * @param String $timeLeft time left
546
     *
553
     *
547
     * @see UPSDevice::$_timeLeft
554
     * @see UPSDevice::$_timeLeft
548
     *
555
     *
549
     * @return Void
556
     * @return void
550
     */
557
     */
551
    public function setTimeLeft($timeLeft)
558
    public function setTimeLeft($timeLeft)
552
    {
559
    {
553
        $this->_timeLeft = $timeLeft;
560
        $this->_timeLeft = $timeLeft;
554
    }
561
    }
-
 
562
 
-
 
563
    /**
-
 
564
     * Returns $_beeperStatus.
-
 
565
     *
-
 
566
     * @see UPSDevice::$_beeperStatus
-
 
567
     *
-
 
568
     * @return String
-
 
569
     */
-
 
570
    public function getBeeperStatus()
-
 
571
    {
-
 
572
        return $this->_beeperStatus;
-
 
573
    }
-
 
574
 
-
 
575
    /**
-
 
576
     * Sets $_beeperStatus.
-
 
577
     *
-
 
578
     * @param String $beeperStatus beeper status
-
 
579
     *
-
 
580
     * @see UPSDevice::$_beeperStatus
-
 
581
     *
-
 
582
     * @return void
-
 
583
     */
-
 
584
    public function setBeeperStatus($beeperStatus)
-
 
585
    {
-
 
586
        $this->_beeperStatus = $beeperStatus;
-
 
587
    }
555
}
588
}