J-Sim v1.2.1-p7 API

drcl.net.traffic
Class tsPeriodic

java.lang.Object
  extended bydrcl.DrclObj
      extended bydrcl.net.traffic.TrafficShaper
          extended bydrcl.net.traffic.tsPeriodic
All Implemented Interfaces:
java.lang.Cloneable, ObjectDuplicable, java.io.Serializable

public class tsPeriodic
extends TrafficShaper

This class implements a traffic shaper that conforms to the periodic traffic model.

See Also:
traffic_Periodic, Serialized Form

Constructor Summary
tsPeriodic()
           
tsPeriodic(traffic_Periodic traffic_)
           
 
Method Summary
protected  double adjust(double now_, int size_)
          Returns the time adjustment (relative to the current time now_) for outputing the packet.
 int getC()
           
 int getMaxPacketSize()
           
 double getPeriod()
           
 TrafficModel getTrafficModel()
          Returns the associated traffic model.
 java.lang.String info(java.lang.String prefix_)
          Prints out the content of this traffic shaper instance.
 void reset()
           
 void set(int c_, double p_, int mtu_)
           
 void setC(int c_)
           
 void setMaxPacketSize(int size_)
           
 void setPeriod(double p_)
           
 void setTrafficModel(TrafficModel traffic_)
          Sets the associated traffic model.
 
Methods inherited from class drcl.net.traffic.TrafficShaper
adjust, dequeue, duplicate, getAvailableBufferSize, getBufferLength, getBufferSize, nextOutputTime, setBufferSize
 
Methods inherited from class drcl.DrclObj
clone, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

tsPeriodic

public tsPeriodic()

tsPeriodic

public tsPeriodic(traffic_Periodic traffic_)
Method Detail

reset

public void reset()
Overrides:
reset in class TrafficShaper

info

public java.lang.String info(java.lang.String prefix_)
Description copied from class: TrafficShaper
Prints out the content of this traffic shaper instance. This class prints out the associated traffic model and the buffer. A subclass only needs to call super.info(prefix_) and then supply the content of the parameters defined in the subclass.

Overrides:
info in class TrafficShaper
Parameters:
prefix_ - prefix_ that should be prepended at each line.

getTrafficModel

public TrafficModel getTrafficModel()
Description copied from class: TrafficShaper
Returns the associated traffic model.

Specified by:
getTrafficModel in class TrafficShaper

setTrafficModel

public void setTrafficModel(TrafficModel traffic_)
Description copied from class: TrafficShaper
Sets the associated traffic model.

Specified by:
setTrafficModel in class TrafficShaper

adjust

protected double adjust(double now_,
                        int size_)
Description copied from class: TrafficShaper
Returns the time adjustment (relative to the current time now_) for outputing the packet. This is the main method a subclass must override to regulate the incoming packets. The current time passed to this method is maintained relatively to the time when this component starts.

Specified by:
adjust in class TrafficShaper
Parameters:
now_ - current time, relative to the start time of the shaper.
size_ - the packet size.

setMaxPacketSize

public void setMaxPacketSize(int size_)

getMaxPacketSize

public int getMaxPacketSize()

setC

public void setC(int c_)

getC

public int getC()

setPeriod

public void setPeriod(double p_)

getPeriod

public double getPeriod()

set

public void set(int c_,
                double p_,
                int mtu_)

J-Sim v1.2.1-p7 API

Copyright © 1998-2003 Distributed Real-time Computing Lab (DRCL). All Rights Reserved.     ~ To J-Sim Home ~