Subversion Repositories ALCASAR

Rev

Rev 2788 | Rev 3100 | Go to most recent revision | Details | Compare with Previous | 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
     *
3037 rexy 31
     * @var string
2788 rexy 32
     */
33
    private $_name = "";
34
 
35
    /**
36
     * transmitted bytes
37
     *
3037 rexy 38
     * @var int
2788 rexy 39
     */
40
    private $_txBytes = 0;
41
 
42
    /**
43
     * received bytes
44
     *
3037 rexy 45
     * @var int
2788 rexy 46
     */
47
    private $_rxBytes = 0;
48
 
49
    /**
50
     * counted error packages
51
     *
3037 rexy 52
     * @var int
2788 rexy 53
     */
54
    private $_errors = 0;
55
 
56
    /**
57
     * counted droped packages
58
     *
3037 rexy 59
     * @var int
2788 rexy 60
     */
61
    private $_drops = 0;
62
 
63
    /**
64
     * string with info
65
     *
3037 rexy 66
     * @var string
2788 rexy 67
     */
68
    private $_info = null;
69
 
70
    /**
71
     * Returns $_drops.
72
     *
73
     * @see NetDevice::$_drops
74
     *
3037 rexy 75
     * @return int
2788 rexy 76
     */
77
    public function getDrops()
78
    {
79
        return $this->_drops;
80
    }
81
 
82
    /**
83
     * Sets $_drops.
84
     *
3037 rexy 85
     * @param int $drops dropped packages
2788 rexy 86
     *
87
     * @see NetDevice::$_drops
88
     *
3037 rexy 89
     * @return void
2788 rexy 90
     */
91
    public function setDrops($drops)
92
    {
93
        $this->_drops = $drops;
94
    }
95
 
96
    /**
97
     * Returns $_errors.
98
     *
99
     * @see NetDevice::$_errors
100
     *
3037 rexy 101
     * @return int
2788 rexy 102
     */
103
    public function getErrors()
104
    {
105
        return $this->_errors;
106
    }
107
 
108
    /**
109
     * Sets $_errors.
110
     *
3037 rexy 111
     * @param int $errors error packages
2788 rexy 112
     *
113
     * @see NetDevice::$_errors
114
     *
3037 rexy 115
     * @return void
2788 rexy 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
     *
3037 rexy 141
     * @return void
2788 rexy 142
     */
143
    public function setName($name)
144
    {
145
        $this->_name = $name;
146
    }
147
 
148
    /**
149
     * Returns $_rxBytes.
150
     *
151
     * @see NetDevice::$_rxBytes
152
     *
3037 rexy 153
     * @return int
2788 rexy 154
     */
155
    public function getRxBytes()
156
    {
157
        return $this->_rxBytes;
158
    }
159
 
160
    /**
161
     * Sets $_rxBytes.
162
     *
3037 rexy 163
     * @param int $rxBytes received bytes
2788 rexy 164
     *
165
     * @see NetDevice::$_rxBytes
166
     *
3037 rexy 167
     * @return void
2788 rexy 168
     */
169
    public function setRxBytes($rxBytes)
170
    {
171
        $this->_rxBytes = $rxBytes;
172
    }
173
 
174
    /**
175
     * Returns $_txBytes.
176
     *
177
     * @see NetDevice::$_txBytes
178
     *
3037 rexy 179
     * @return int
2788 rexy 180
     */
181
    public function getTxBytes()
182
    {
183
        return $this->_txBytes;
184
    }
185
 
186
    /**
187
     * Sets $_txBytes.
188
     *
3037 rexy 189
     * @param int $txBytes transmitted bytes
2788 rexy 190
     *
191
     * @see NetDevice::$_txBytes
192
     *
3037 rexy 193
     * @return void
2788 rexy 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
     *
3037 rexy 219
     * @return void
2788 rexy 220
     */
221
    public function setInfo($info)
222
    {
223
        $this->_info = $info;
224
    }
225
}