Subversion Repositories ALCASAR

Rev

Rev 2976 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 2976 Rev 3037
Line 26... Line 26...
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
    }
Line 96... Line 96...
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
    }
Line 136... Line 136...
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
    }
Line 148... Line 148...
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
    }
Line 188... Line 188...
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
    }
Line 214... Line 214...
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
    }