|
DRCL J-Sim API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectdrcl.DrclObj
drcl.comp.Component
drcl.net.traffic.TrafficComponent
drcl.net.traffic.TrafficSourceComponent
drcl.net.traffic.TraceInput
TraceInput output packets to down@ port based on a trace file.
To use the class, one must assigned to it a java.io.Reader which is associated with
the opened trace file.
A subclass must override #setNextPacket(drcl.net.FooPacket) to
set the size of next packet and return its birth time based on the trace file.
In addition, a subclass also needs to implement the looping operation.
When the looping flag is enabled, the trace file is repeated every loopPeriod second.
The associated traffic model is made up by the load, burst and MTU properties.
| Nested Class Summary |
| Nested classes inherited from class drcl.comp.Component |
Component.Locks |
| Field Summary | |
int |
burst
|
double |
load
|
int |
mtu
|
| Constructor Summary | |
TraceInput()
|
|
TraceInput(java.lang.String id_)
|
|
| Method Summary | |
void |
duplicate(java.lang.Object source_)
Duplicates the content of source_, including ID, name, child components and connections among them, to this component. |
int |
getBurst()
|
double |
getLoad()
|
double |
getLoopPeriod()
Returns the looping period. |
int |
getMTU()
|
java.io.Reader |
getReader()
|
TrafficModel |
getTrafficModel()
Returns the associated traffic model. |
java.lang.String |
info()
Returns information regarding this component. |
boolean |
isLoopEnabled()
Returns true if looping the trace is enabled. |
void |
load(java.lang.String filename_)
Loads the trace file into this component. |
void |
reset()
Resets the component for being used anew. |
void |
setBurst(int b_)
|
void |
setLoad(double load_)
|
void |
setLoopEnabled(boolean v_)
Enables/disables looping. |
void |
setLoopPeriod(double p_)
Sets the looping period. |
void |
setMTU(int mtu_)
|
void |
setReader(java.io.Reader r_)
|
void |
setTrafficModel(TrafficModel traffic_)
Sets the associated traffic model. |
| Methods inherited from class drcl.net.traffic.TrafficSourceComponent |
_resume, _start, _stop, getBufferSize, getSeed, getShaper, info, isSendUnshapedTrafficEnabled, isTimestampEnabled, setBufferSize, setSeed, setSendUnshapedTrafficEnabled, setShaper, setTimestampEnabled |
| Methods inherited from class drcl.net.traffic.TrafficComponent |
getPacketWrapper, setPacketWrapper |
| Methods inherited from class drcl.DrclObj |
clone |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public double load
public int mtu
public int burst
| Constructor Detail |
public TraceInput()
public TraceInput(java.lang.String id_)
| Method Detail |
public void reset()
Component
reset in class TrafficSourceComponentpublic void duplicate(java.lang.Object source_)
Component
duplicate in interface ObjectDuplicableduplicate in class TrafficSourceComponentpublic java.lang.String info()
Component
info in class TrafficComponentpublic void load(java.lang.String filename_)
public void setReader(java.io.Reader r_)
public java.io.Reader getReader()
public void setTrafficModel(TrafficModel traffic_)
TrafficComponent
setTrafficModel in class TrafficComponentpublic TrafficModel getTrafficModel()
TrafficComponent
getTrafficModel in class TrafficComponentpublic void setLoad(double load_)
public double getLoad()
public void setBurst(int b_)
public int getBurst()
public void setMTU(int mtu_)
public int getMTU()
public boolean isLoopEnabled()
public void setLoopEnabled(boolean v_)
public double getLoopPeriod()
public void setLoopPeriod(double p_)
|
DRCL J-Sim API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||