Subversion Repositories ALCASAR

Rev

Rev 2976 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 2976 Rev 3037
1
<?php
1
<?php
2
/**
2
/**
3
 * SensorDevice TO class
3
 * SensorDevice TO class
4
 *
4
 *
5
 * PHP version 5
5
 * PHP version 5
6
 *
6
 *
7
 * @category  PHP
7
 * @category  PHP
8
 * @package   PSI_TO
8
 * @package   PSI_TO
9
 * @author    Michael Cramer <BigMichi1@users.sourceforge.net>
9
 * @author    Michael Cramer <BigMichi1@users.sourceforge.net>
10
 * @copyright 2009 phpSysInfo
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
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.SensorDevice.inc.php 592 2012-07-03 10:55:51Z namiltd $
12
 * @version   SVN: $Id: class.SensorDevice.inc.php 592 2012-07-03 10:55:51Z namiltd $
13
 * @link      http://phpsysinfo.sourceforge.net
13
 * @link      http://phpsysinfo.sourceforge.net
14
 */
14
 */
15
 /**
15
 /**
16
 * SensorDevice TO class
16
 * SensorDevice TO class
17
 *
17
 *
18
 * @category  PHP
18
 * @category  PHP
19
 * @package   PSI_TO
19
 * @package   PSI_TO
20
 * @author    Michael Cramer <BigMichi1@users.sourceforge.net>
20
 * @author    Michael Cramer <BigMichi1@users.sourceforge.net>
21
 * @copyright 2009 phpSysInfo
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
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
23
 * @version   Release: 3.0
24
 * @link      http://phpsysinfo.sourceforge.net
24
 * @link      http://phpsysinfo.sourceforge.net
25
 */
25
 */
26
class SensorDevice
26
class SensorDevice
27
{
27
{
28
    /**
28
    /**
29
     * name of the sensor
29
     * name of the sensor
30
     *
30
     *
31
     * @var String
31
     * @var string
32
     */
32
     */
33
    private $_name = "";
33
    private $_name = "";
34
 
34
 
35
    /**
35
    /**
36
     * current value of the sensor
36
     * current value of the sensor
37
     *
37
     *
38
     * @var Integer
38
     * @var int
39
     */
39
     */
40
    private $_value = 0;
40
    private $_value = 0;
41
 
41
 
42
    /**
42
    /**
43
     * maximum value of the sensor
43
     * maximum value of the sensor
44
     *
44
     *
45
     * @var Integer
45
     * @var int
46
     */
46
     */
47
    private $_max = null;
47
    private $_max = null;
48
 
48
 
49
    /**
49
    /**
50
     * minimum value of the sensor
50
     * minimum value of the sensor
51
     *
51
     *
52
     * @var Integer
52
     * @var int
53
     */
53
     */
54
    private $_min = null;
54
    private $_min = null;
55
 
55
 
56
    /**
56
    /**
57
     * event of the sensor
57
     * event of the sensor
58
     *
58
     *
59
     * @var String
59
     * @var string
60
     */
60
     */
61
    private $_event = "";
61
    private $_event = "";
62
 
62
 
63
    /**
63
    /**
64
     * unit of values of the sensor
64
     * unit of values of the sensor
65
     *
65
     *
66
     * @var String
66
     * @var string
67
     */
67
     */
68
    private $_unit = "";
68
    private $_unit = "";
69
 
69
 
70
    /**
70
    /**
71
     * Returns $_max.
71
     * Returns $_max.
72
     *
72
     *
73
     * @see Sensor::$_max
73
     * @see Sensor::$_max
74
     *
74
     *
75
     * @return Integer
75
     * @return int
76
     */
76
     */
77
    public function getMax()
77
    public function getMax()
78
    {
78
    {
79
        return $this->_max;
79
        return $this->_max;
80
    }
80
    }
81
 
81
 
82
    /**
82
    /**
83
     * Sets $_max.
83
     * Sets $_max.
84
     *
84
     *
85
     * @param Integer $max maximum value
85
     * @param int $max maximum value
86
     *
86
     *
87
     * @see Sensor::$_max
87
     * @see Sensor::$_max
88
     *
88
     *
89
     * @return Void
89
     * @return void
90
     */
90
     */
91
    public function setMax($max)
91
    public function setMax($max)
92
    {
92
    {
93
        $this->_max = $max;
93
        $this->_max = $max;
94
    }
94
    }
95
 
95
 
96
    /**
96
    /**
97
     * Returns $_min.
97
     * Returns $_min.
98
     *
98
     *
99
     * @see Sensor::$_min
99
     * @see Sensor::$_min
100
     *
100
     *
101
     * @return Integer
101
     * @return int
102
     */
102
     */
103
    public function getMin()
103
    public function getMin()
104
    {
104
    {
105
        return $this->_min;
105
        return $this->_min;
106
    }
106
    }
107
 
107
 
108
    /**
108
    /**
109
     * Sets $_min.
109
     * Sets $_min.
110
     *
110
     *
111
     * @param Integer $min minimum value
111
     * @param int $min minimum value
112
     *
112
     *
113
     * @see Sensor::$_min
113
     * @see Sensor::$_min
114
     *
114
     *
115
     * @return Void
115
     * @return void
116
     */
116
     */
117
    public function setMin($min)
117
    public function setMin($min)
118
    {
118
    {
119
        $this->_min = $min;
119
        $this->_min = $min;
120
    }
120
    }
121
 
121
 
122
    /**
122
    /**
123
     * Returns $_name.
123
     * Returns $_name.
124
     *
124
     *
125
     * @see Sensor::$_name
125
     * @see Sensor::$_name
126
     *
126
     *
127
     * @return String
127
     * @return String
128
     */
128
     */
129
    public function getName()
129
    public function getName()
130
    {
130
    {
131
        return $this->_name;
131
        return $this->_name;
132
    }
132
    }
133
 
133
 
134
    /**
134
    /**
135
     * Sets $_name.
135
     * Sets $_name.
136
     *
136
     *
137
     * @param String $name sensor name
137
     * @param String $name sensor name
138
     *
138
     *
139
     * @see Sensor::$_name
139
     * @see Sensor::$_name
140
     *
140
     *
141
     * @return Void
141
     * @return void
142
     */
142
     */
143
    public function setName($name)
143
    public function setName($name)
144
    {
144
    {
145
        $this->_name = $name;
145
        $this->_name = $name;
146
    }
146
    }
147
 
147
 
148
    /**
148
    /**
149
     * Returns $_value.
149
     * Returns $_value.
150
     *
150
     *
151
     * @see Sensor::$_value
151
     * @see Sensor::$_value
152
     *
152
     *
153
     * @return Integer
153
     * @return int
154
     */
154
     */
155
    public function getValue()
155
    public function getValue()
156
    {
156
    {
157
        return $this->_value;
157
        return $this->_value;
158
    }
158
    }
159
 
159
 
160
    /**
160
    /**
161
     * Sets $_value.
161
     * Sets $_value.
162
     *
162
     *
163
     * @param Integer $value current value
163
     * @param int $value current value
164
     *
164
     *
165
     * @see Sensor::$_value
165
     * @see Sensor::$_value
166
     *
166
     *
167
     * @return Void
167
     * @return void
168
     */
168
     */
169
    public function setValue($value)
169
    public function setValue($value)
170
    {
170
    {
171
        $this->_value = $value;
171
        $this->_value = $value;
172
    }
172
    }
173
 
173
 
174
    /**
174
    /**
175
     * Returns $_event.
175
     * Returns $_event.
176
     *
176
     *
177
     * @see Sensor::$_event
177
     * @see Sensor::$_event
178
     *
178
     *
179
     * @return String
179
     * @return String
180
     */
180
     */
181
    public function getEvent()
181
    public function getEvent()
182
    {
182
    {
183
        return $this->_event;
183
        return $this->_event;
184
    }
184
    }
185
 
185
 
186
    /**
186
    /**
187
     * Sets $_event.
187
     * Sets $_event.
188
     *
188
     *
189
     * @param String $event sensor event
189
     * @param String $event sensor event
190
     *
190
     *
191
     * @see Sensor::$_event
191
     * @see Sensor::$_event
192
     *
192
     *
193
     * @return Void
193
     * @return void
194
     */
194
     */
195
    public function setEvent($event)
195
    public function setEvent($event)
196
    {
196
    {
197
        $this->_event = $event;
197
        $this->_event = $event;
198
    }
198
    }
199
 
199
 
200
    /**
200
    /**
201
     * Returns $_unit.
201
     * Returns $_unit.
202
     *
202
     *
203
     * @see Sensor::$_unit
203
     * @see Sensor::$_unit
204
     *
204
     *
205
     * @return String
205
     * @return String
206
     */
206
     */
207
    public function getUnit()
207
    public function getUnit()
208
    {
208
    {
209
        return $this->_unit;
209
        return $this->_unit;
210
    }
210
    }
211
 
211
 
212
    /**
212
    /**
213
     * Sets $_unit.
213
     * Sets $_unit.
214
     *
214
     *
215
     * @param String $unit sensor unit
215
     * @param String $unit sensor unit
216
     *
216
     *
217
     * @see Sensor::$_unit
217
     * @see Sensor::$_unit
218
     *
218
     *
219
     * @return Void
219
     * @return void
220
     */
220
     */
221
    public function setUnit($unit)
221
    public function setUnit($unit)
222
    {
222
    {
223
        $this->_unit = $unit;
223
        $this->_unit = $unit;
224
    }
224
    }
225
}
225
}
226
 
226