Subversion Repositories ALCASAR

Rev

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

Rev Author Line No. Line
2788 rexy 1
<?php
2
/**
3
 * SensorDevice 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.SensorDevice.inc.php 592 2012-07-03 10:55:51Z namiltd $
13
 * @link      http://phpsysinfo.sourceforge.net
14
 */
15
 /**
16
 * SensorDevice 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 SensorDevice
27
{
28
    /**
29
     * name of the sensor
30
     *
31
     * @var String
32
     */
33
    private $_name = "";
34
 
35
    /**
36
     * current value of the sensor
37
     *
38
     * @var Integer
39
     */
40
    private $_value = 0;
41
 
42
    /**
43
     * maximum value of the sensor
44
     *
45
     * @var Integer
46
     */
47
    private $_max = null;
48
 
49
    /**
50
     * minimum value of the sensor
51
     *
52
     * @var Integer
53
     */
54
    private $_min = null;
55
 
56
    /**
57
     * event of the sensor
58
     *
59
     * @var String
60
     */
61
    private $_event = "";
62
 
63
    /**
64
     * Returns $_max.
65
     *
66
     * @see Sensor::$_max
67
     *
68
     * @return Integer
69
     */
70
    public function getMax()
71
    {
72
        return $this->_max;
73
    }
74
 
75
    /**
76
     * Sets $_max.
77
     *
78
     * @param Integer $max maximum value
79
     *
80
     * @see Sensor::$_max
81
     *
82
     * @return Void
83
     */
84
    public function setMax($max)
85
    {
86
        $this->_max = $max;
87
    }
88
 
89
    /**
90
     * Returns $_min.
91
     *
92
     * @see Sensor::$_min
93
     *
94
     * @return Integer
95
     */
96
    public function getMin()
97
    {
98
        return $this->_min;
99
    }
100
 
101
    /**
102
     * Sets $_min.
103
     *
104
     * @param Integer $min minimum value
105
     *
106
     * @see Sensor::$_min
107
     *
108
     * @return Void
109
     */
110
    public function setMin($min)
111
    {
112
        $this->_min = $min;
113
    }
114
 
115
    /**
116
     * Returns $_name.
117
     *
118
     * @see Sensor::$_name
119
     *
120
     * @return String
121
     */
122
    public function getName()
123
    {
124
        return $this->_name;
125
    }
126
 
127
    /**
128
     * Sets $_name.
129
     *
130
     * @param String $name sensor name
131
     *
132
     * @see Sensor::$_name
133
     *
134
     * @return Void
135
     */
136
    public function setName($name)
137
    {
138
        $this->_name = $name;
139
    }
140
 
141
    /**
142
     * Returns $_value.
143
     *
144
     * @see Sensor::$_value
145
     *
146
     * @return Integer
147
     */
148
    public function getValue()
149
    {
150
        return $this->_value;
151
    }
152
 
153
    /**
154
     * Sets $_value.
155
     *
156
     * @param Integer $value current value
157
     *
158
     * @see Sensor::$_value
159
     *
160
     * @return Void
161
     */
162
    public function setValue($value)
163
    {
164
        $this->_value = $value;
165
    }
166
 
167
    /**
168
     * Returns $_event.
169
     *
170
     * @see Sensor::$_event
171
     *
172
     * @return String
173
     */
174
    public function getEvent()
175
    {
176
        return $this->_event;
177
    }
178
 
179
    /**
180
     * Sets $_event.
181
     *
182
     * @param String $event sensor event
183
     *
184
     * @see Sensor::$_event
185
     *
186
     * @return Void
187
     */
188
    public function setEvent($event)
189
    {
190
        $this->_event = $event;
191
    }
192
}