vNIC
The class "vNIC" serves as the implementation of the network interface card in the simulation. It includes a queue specifically designed to store "vPacket" objects and has the capability to establish connections with other "vNIC" instances. The "vNIC" class is equipped with two resources: uplink bandwidth and downlink bandwidth. These resources are allocated to the transmission and reception of "vPacket" objects respectively. The transmission and reception functionalities of "vPacket" are implemented as member functions within the class. Upon receiving a "vPacket", a specialized "vProcess" called PacketHandler is created to simulate the decoding process and the associated processing delay. If there is insufficient uplink or downlink bandwidth available, the "vPacket" will be kept in the queue until the necessary resources become available.
Bases: vHardwareComponent
Source code in PyCloudSim\entity\v_nic.py
132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 |
|
host
property
Return the host of this NIC.
packet_queue
property
Return the packet queue of this NIC.
ports
property
Return the ports of this NIC.
__init__(host, label=None, create_at=None, terminate_at=None, precursor=None)
Create a simulated NIC.
Source code in PyCloudSim\entity\v_nic.py
133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 |
|
add_port(endpoint, bandwidth, ip_address, at)
Add a port to this virtual NIC.
Source code in PyCloudSim\entity\v_nic.py
235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 |
|
egress_usage(duration=None)
Return the egress bandwidth usage of this NIC.
Source code in PyCloudSim\entity\v_nic.py
280 281 282 |
|
egress_utilization(duration=None)
Return the egress bandwidth utilization of this NIC.
Source code in PyCloudSim\entity\v_nic.py
284 285 286 287 288 |
|
ingress_usage(duration=None)
Return the ingress bandwidth usage of this NIC.
Source code in PyCloudSim\entity\v_nic.py
290 291 292 293 294 295 296 297 298 299 300 |
|
ingress_utilization(duration=None)
Return the ingress bandwidth utilization of this NIC.
Source code in PyCloudSim\entity\v_nic.py
302 303 304 305 306 307 308 309 310 311 312 |
|
on_power_off()
Power off the simulated NIC.
Source code in PyCloudSim\entity\v_nic.py
228 229 230 231 232 233 |
|
on_power_on()
Power on the simulated NIC.
Source code in PyCloudSim\entity\v_nic.py
155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 |
|
remove_port(endpoint, at)
Remove a port from this virtual NIC.
Source code in PyCloudSim\entity\v_nic.py
256 257 258 259 260 261 262 263 |
|