gov.nist.antd.optical
Class BasicQueueMonitor

java.lang.Object
  |
  +--gov.nist.antd.optical.BasicQueueMonitor
All Implemented Interfaces:
PacketQueueMonitor

public class BasicQueueMonitor
extends java.lang.Object
implements PacketQueueMonitor

Monitor for the BasicQueue. This class monitor 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.

Author:
borchert
, rouil

Nested Class Summary
private  class BasicQueueMonitor.LambdaInfo
          This class contains the information related to a specific lambda
 
Field Summary
private  boolean debug
          Indicates if debug information should be printed
private  java.text.DecimalFormat fm
          Specifies the format for the time
private  long frequency
          The frequency of the OpNet
private  int hostcode
          The code for the local host
private  double intervalSec
          The interval between to samples (in seconds)
private  long intervalTick
          The interval between to samples (in tick)
private  ExtRouter localHost
          The ExtRouter that contains the ONIC
private  ONIC onic
          The ONIC to monitor
private  BasicQueue queue
          The queue that is monitored
private  SSF.Util.Streams.StreamInterface streamInt
          The stream (Recorder) to write monitor information
private  java.util.Hashtable table
          Store the information for each lambda
private  int typeCode
          The code for this type of monitor information
 
Constructor Summary
BasicQueueMonitor()
           
 
Method Summary
 void config(NIC ownerNIC, com.renesys.raceway.DML.Configuration cfg)
          Method called by ONIC during model configuration phase if the attribute interface.monitor is present.
 void init()
          Method called by ONIC during model initialization phase Any configuration actions depending on other protocols should be done in the "init" phase.
 void receive(ProtocolMessage packet)
          Method called by class implementing SSF.Net.packetQueue when a packet is enqueued.
private  void sendRecord()
          Send the information collected.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

localHost

private ExtRouter localHost
The ExtRouter that contains the ONIC


onic

private ONIC onic
The ONIC to monitor


queue

private BasicQueue queue
The queue that is monitored


streamInt

private SSF.Util.Streams.StreamInterface streamInt
The stream (Recorder) to write monitor information


hostcode

private int hostcode
The code for the local host


typeCode

private int typeCode
The code for this type of monitor information


intervalTick

private long intervalTick
The interval between to samples (in tick)


intervalSec

private double intervalSec
The interval between to samples (in seconds)


debug

private boolean debug
Indicates if debug information should be printed


frequency

private long frequency
The frequency of the OpNet


table

private java.util.Hashtable table
Store the information for each lambda


fm

private java.text.DecimalFormat fm
Specifies the format for the time

Constructor Detail

BasicQueueMonitor

public BasicQueueMonitor()
Method Detail

config

public void config(NIC ownerNIC,
                   com.renesys.raceway.DML.Configuration cfg)
            throws com.renesys.raceway.DML.configException
Method called by ONIC during model configuration phase if the attribute interface.monitor is present. Required attributes:
interface [
    ...
     monitor [
       use "classname"

       ... any user-defined monitor attributes here
     ]
   ]

Specified by:
config in interface PacketQueueMonitor
Parameters:
ownerNIC - The ONIC to monitor
cfg - The DML configuration of the monitor
com.renesys.raceway.DML.configException

init

public void init()
Method called by ONIC during model initialization phase Any configuration actions depending on other protocols should be done in the "init" phase.

Specified by:
init in interface PacketQueueMonitor

receive

public void receive(ProtocolMessage packet)
Method called by class implementing SSF.Net.packetQueue when a packet is enqueued.

Specified by:
receive in interface PacketQueueMonitor
Parameters:
packet - The ProtocolMessage that entered the queue

sendRecord

private void sendRecord()
Send the information collected.