public class TraceFile
extends java.lang.Object
hh:mm:ss.sss length
The time information can either be absolute or relative to the preeceding
event (=interarrival time), this can be set by fAbsoluteTime
.
Further the behavior at the end of the trace file can be determined. If
fWrapFile
is set, the trace file is reread from the beginning,
but in the case of absolute time only the IAT between two succeeding events
is considered. In the other case the simulation interrupts with an error, if
the end of the trace file is reached.
Comments are initiated by a leading '#'.
TraceFile
is a parseable class. It accepts the following
keywords in the parameter file:
TRUE
if the times in the trace file represent
absolute times. Set to FALSE
if they represent relative times
(i.e., time differences). Default is TRUE
TRUE
if you want the trace to be reread from the
beginning once the end is reached. If set to FALSE, an exception will be
thrown when the end of the trace file is reached. Default is
FALSE
.Modifier and Type | Field and Description |
---|---|
protected boolean |
absoluteTime
Contains the traceFile absolute or relative times
|
protected TraceItem |
currentItem |
protected double |
currentTime |
protected boolean |
endOfFile |
protected java.io.RandomAccessFile |
file |
protected java.lang.String |
fileName |
protected boolean |
firstRunFinished |
protected double |
iat |
protected TraceItem |
lastItem |
protected double |
timeBase
Determined from the first value
|
protected boolean |
wrapFile
Behavior, if the end of the file is reached
|
Constructor and Description |
---|
TraceFile(Parameter par) |
TraceFile(java.lang.String filename) |
TraceFile(java.lang.String filename,
boolean absolutetime,
boolean wrapfile) |
Modifier and Type | Method and Description |
---|---|
protected double |
convertTime(TraceItem item) |
java.lang.String |
getFileName() |
double |
getNextEventTime(double _currentTime) |
TraceItem |
getNextItem() |
int |
getNextLength() |
protected java.lang.String fileName
protected java.io.RandomAccessFile file
protected boolean absoluteTime
protected boolean wrapFile
protected double timeBase
protected double currentTime
protected TraceItem currentItem
protected TraceItem lastItem
protected double iat
protected boolean endOfFile
protected boolean firstRunFinished
public TraceFile(java.lang.String filename, boolean absolutetime, boolean wrapfile)
public TraceFile(java.lang.String filename)
public TraceFile(Parameter par)