|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--gov.nist.antd.optical.BasicQueue
This class allows the transmission of messages along different lambdas at the same time. A queue is managed for each lambda.
This class was developed at the National Institute of Standards and Technology by employees of the Federal Government in the course of their official duties. Pursuant to title 17 Section 105 of the United States Code this software is not subject to copyright protection and is in the public domain. NIST assumes no responsibility whatsoever for its use by other parties, and makes no guarantees, expressed or implied, about its quality, reliability, or any other characteristic.
We would appreciate acknowledgement if the software is used.
NIST ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" CONDITION AND DISCLAIM ANY LIABILITY OF ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
| Nested Class Summary | |
private class |
BasicQueue.Info
internal class to store information about the queue of a specific lambda. |
| Field Summary | |
private ONIC |
forNIC
The ONIC that uses this queue |
private Host |
localHost
The host where this queue is running |
private long |
maxQueueingDelay
The maximum delay for transmission |
private PacketQueueMonitor |
myMonitor
The packet queue monitor |
private boolean |
pktDropped
Indicates if the packet has been dropped |
(package private) java.util.Hashtable |
table
Map a lambda to the delay information. |
| Constructor Summary | |
BasicQueue()
Default constructor |
|
BasicQueue(ONIC onic)
Called by NIC if DML attribute interface.queue is omitted; then BasicQueue is the default packetQueue installed. |
|
| Method Summary | |
private long |
calibrate(BasicQueue.Info info)
If we have moved forward in time, recalibrate the accumulated delay so that it remains relative to "now". |
void |
config(NIC nic,
com.renesys.raceway.DML.Configuration cfg)
Does not accept any user-defined Configuration. |
void |
configure(OpticalLink link)
Configure the hashtable that map a lambda to the sending information |
boolean |
enqueue(ProtocolMessage msg)
Put the given message in the queue. |
long |
getNumberOfBitsInQueue(Lambda lambda)
Returns queue size in bits at the moment of calling. |
int |
getPktCount(Lambda lambda)
Return the total number of packets used for this lambda |
int |
getPktDropCount(Lambda lambda)
Return the total number of packets dropped for this lambda |
void |
init()
Required by interface packetQueue. |
boolean |
isPktDropped()
Indicates if the last packet has been dropped |
void |
setMonitor(PacketQueueMonitor mon)
Set reference to a correctly configured class implementing the Java interface PacketQueueMonitor. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private long maxQueueingDelay
private ONIC forNIC
private Host localHost
private boolean pktDropped
private PacketQueueMonitor myMonitor
java.util.Hashtable table
| Constructor Detail |
public BasicQueue()
public BasicQueue(ONIC onic)
onic - The ONIC that uses this queue.| Method Detail |
public void config(NIC nic,
com.renesys.raceway.DML.Configuration cfg)
config in interface packetQueuenic - the ONIC that use this queue.cfg - The DML configurationpublic void init()
init in interface packetQueuepublic void setMonitor(PacketQueueMonitor mon)
mon - The PacketQueueMonitorpublic boolean enqueue(ProtocolMessage msg)
enqueue in interface packetQueuemsg - The message to send.
private long calibrate(BasicQueue.Info info)
info - The information for the transmission.
public long getNumberOfBitsInQueue(Lambda lambda)
lambda - The lambda used for the transmission
public void configure(OpticalLink link)
link - The optical link that contains all the lambdas.public boolean isPktDropped()
public int getPktCount(Lambda lambda)
lambda - The lambda we want the information from
public int getPktDropCount(Lambda lambda)
lambda - The lambda we want the information from
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||