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
 * NetDevice 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.NetDevice.inc.php 547 2012-03-22 09:44:38Z namiltd $
13
 * @link      http://phpsysinfo.sourceforge.net
14
 */
15
 /**
16
 * NetDevice 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 NetDevice
27
{
28
    /**
29
     * name of the device
30
     *
31
     * @var String
32
     */
33
    private $_name = "";
34
 
35
    /**
36
     * transmitted bytes
37
     *
38
     * @var Integer
39
     */
40
    private $_txBytes = 0;
41
 
42
    /**
43
     * received bytes
44
     *
45
     * @var Integer
46
     */
47
    private $_rxBytes = 0;
48
 
49
    /**
50
     * counted error packages
51
     *
52
     * @var Integer
53
     */
54
    private $_errors = 0;
55
 
56
    /**
57
     * counted droped packages
58
     *
59
     * @var Integer
60
     */
61
    private $_drops = 0;
62
 
63
    /**
64
     * string with info
65
     *
66
     * @var String
67
     */
68
    private $_info = null;
69
 
70
    /**
71
     * Returns $_drops.
72
     *
73
     * @see NetDevice::$_drops
74
     *
75
     * @return Integer
76
     */
77
    public function getDrops()
78
    {
79
        return $this->_drops;
80
    }
81
 
82
    /**
83
     * Sets $_drops.
84
     *
85
     * @param Integer $drops dropped packages
86
     *
87
     * @see NetDevice::$_drops
88
     *
89
     * @return Void
90
     */
91
    public function setDrops($drops)
92
    {
93
        $this->_drops = $drops;
94
    }
95
 
96
    /**
97
     * Returns $_errors.
98
     *
99
     * @see NetDevice::$_errors
100
     *
101
     * @return Integer
102
     */
103
    public function getErrors()
104
    {
105
        return $this->_errors;
106
    }
107
 
108
    /**
109
     * Sets $_errors.
110
     *
111
     * @param Integer $errors error packages
112
     *
113
     * @see NetDevice::$_errors
114
     *
115
     * @return Void
116
     */
117
    public function setErrors($errors)
118
    {
119
        $this->_errors = $errors;
120
    }
121
 
122
    /**
123
     * Returns $_name.
124
     *
125
     * @see NetDevice::$_name
126
     *
127
     * @return String
128
     */
129
    public function getName()
130
    {
131
        return $this->_name;
132
    }
133
 
134
    /**
135
     * Sets $_name.
136
     *
137
     * @param String $name device name
138
     *
139
     * @see NetDevice::$_name
140
     *
141
     * @return Void
142
     */
143
    public function setName($name)
144
    {
145
        $this->_name = $name;
146
    }
147
 
148
    /**
149
     * Returns $_rxBytes.
150
     *
151
     * @see NetDevice::$_rxBytes
152
     *
153
     * @return Integer
154
     */
155
    public function getRxBytes()
156
    {
157
        return $this->_rxBytes;
158
    }
159
 
160
    /**
161
     * Sets $_rxBytes.
162
     *
163
     * @param Integer $rxBytes received bytes
164
     *
165
     * @see NetDevice::$_rxBytes
166
     *
167
     * @return Void
168
     */
169
    public function setRxBytes($rxBytes)
170
    {
171
        $this->_rxBytes = $rxBytes;
172
    }
173
 
174
    /**
175
     * Returns $_txBytes.
176
     *
177
     * @see NetDevice::$_txBytes
178
     *
179
     * @return Integer
180
     */
181
    public function getTxBytes()
182
    {
183
        return $this->_txBytes;
184
    }
185
 
186
    /**
187
     * Sets $_txBytes.
188
     *
189
     * @param Integer $txBytes transmitted bytes
190
     *
191
     * @see NetDevice::$_txBytes
192
     *
193
     * @return Void
194
     */
195
    public function setTxBytes($txBytes)
196
    {
197
        $this->_txBytes = $txBytes;
198
    }
199
 
200
    /**
201
     * Returns $_info.
202
     *
203
     * @see NetDevice::$_info
204
     *
205
     * @return String
206
     */
207
    public function getInfo()
208
    {
209
        return $this->_info;
210
    }
211
 
212
    /**
213
     * Sets $_info.
214
     *
215
     * @param String $info info string
216
     *
217
     * @see NetDevice::$_info
218
     *
219
     * @return Void
220
     */
221
    public function setInfo($info)
222
    {
223
        $this->_info = $info;
224
    }
225
}