gov.nist.antd.optical
Class BasicQueue.Info

java.lang.Object
  |
  +--gov.nist.antd.optical.BasicQueue.Info
Enclosing class:
BasicQueue

private class BasicQueue.Info
extends java.lang.Object

internal class to store information about the queue of a specific lambda.


Field Summary
private  long lastTransmitTime
          The time of the last transmission
private  int pktCount
          auxiliary monitoring variable that stores the # of packet sent
private  int pktDropCount
          auxiliary monitoring variable that stores the # of packet dropped
private  long queueingDelay
          The current delay in the queue
 
Constructor Summary
BasicQueue.Info()
          Default constructor
 
Method Summary
private  long calibrate()
          If we have moved forward in time, recalibrate the accumulated delay so that it remains relative to "now".
 boolean enqueue(OpticalFrameHeader msg)
          Process the given packet
 long getLastTransmitTime()
          Get the time of the last transmission
 int getPktCount()
          Get the total number of packet sent
 int getPktDropCount()
          Get the total number of packet dropped
 long getQueueingDelay()
          Get the delay in the queue
 void setLastTransmitTime(long value)
          Set the delay in the queue
 void setQueueingDelay(long value)
          Set the delay in the queue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

queueingDelay

private long queueingDelay
The current delay in the queue


lastTransmitTime

private long lastTransmitTime
The time of the last transmission


pktCount

private int pktCount
auxiliary monitoring variable that stores the # of packet sent


pktDropCount

private int pktDropCount
auxiliary monitoring variable that stores the # of packet dropped

Constructor Detail

BasicQueue.Info

public BasicQueue.Info()
Default constructor

Method Detail

setQueueingDelay

public void setQueueingDelay(long value)
Set the delay in the queue

Parameters:
value - The value of the delay

setLastTransmitTime

public void setLastTransmitTime(long value)
Set the delay in the queue

Parameters:
value - The value of the delay

getQueueingDelay

public long getQueueingDelay()
Get the delay in the queue

Returns:
The delay in the queue

getLastTransmitTime

public long getLastTransmitTime()
Get the time of the last transmission

Returns:
The time of the last transmission

getPktCount

public int getPktCount()
Get the total number of packet sent

Returns:
The total number of packet sent

getPktDropCount

public int getPktDropCount()
Get the total number of packet dropped

Returns:
The total number of packet dropped

enqueue

public boolean enqueue(OpticalFrameHeader msg)
Process the given packet

Parameters:
msg - The message to enqueue
Returns:
True if the message is enqueue false if dropped

calibrate

private long calibrate()
If we have moved forward in time, recalibrate the accumulated delay so that it remains relative to "now". Re-calibrate before every transmission. Returns the recalibrated accumulated queueing delay.

Returns:
The queueing delay.