pamvotis.core
Class VirtualPacket

java.lang.Object
  extended by pamvotis.core.VirtualPacket

public class VirtualPacket
extends java.lang.Object

Simulates a packet generated from a session. Be careful, this packet is not yet generated. It is just a prediction of what the source will generate. More specifically, when we want to generate a session of packets, then a row of virtual packets is generated, each one having a field called interarrival. When this time expires, then the real packet is generated and added to the packet queue through the Source.getNextPacket fuction.

Author:
Dimitris El. Vassis
See Also:
Source.getNextPacket()

Field Summary
 int id
          The ID of the packet that will be generated.
 int interarrival
          The interarrival time of a packet.
 int length
          The packet length in bits.
 
Constructor Summary
VirtualPacket(int length, int interarrival, int id)
          Creates a virtual packet.
 
Method Summary
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

length

public int length
The packet length in bits.


interarrival

public int interarrival
The interarrival time of a packet. When this time expires, the real packet will be generated.


id

public int id
The ID of the packet that will be generated.

Constructor Detail

VirtualPacket

public VirtualPacket(int length,
                     int interarrival,
                     int id)
Creates a virtual packet.

Parameters:
length - The packet length in bits.
interarrival - The interarrival time of a packet. When this time expires, the real packet will be generated.
id - The ID of the packet that will be generated.