|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectreport.Report
public abstract class Report
Abstract superclass for all reports. All settings defined in this class
can be used for all Report classes. Some reports don't implement intervalled
reports (INTERVAL_SETTING) and will ignore that setting.
| Field Summary | |
|---|---|
static int |
DEF_PRECISION
Default precision of formatted double values |
static java.lang.String |
INTERVAL_SETTING
The interval (simulated seconds) of creating new settings files -setting id ("interval") |
static java.lang.String |
INTERVALLED_FORMAT
Suffix for reports that are created on n second intervals |
protected java.io.PrintWriter |
out
The print writer used to write output. |
static java.lang.String |
OUT_SUFFIX
Suffix of report files without explicit output |
static java.lang.String |
OUTPUT_SETTING
The output file path of the report -setting id ("output") |
static java.lang.String |
PRECISION_SETTING
Precision of formatted double values - setting id ("precision"). |
static java.lang.String |
REPORTDIR_SETTING
The default output directory of reports (can be overriden per report with OUTPUT_SETTING) -setting id ("Report.reportDir") |
| Constructor Summary | |
|---|---|
Report()
Constructor. |
|
| Method Summary | |
|---|---|
void |
done()
Called when the simulation is done, user requested premature termination or intervalled report generating decided that it's time for the next report. |
protected java.lang.String |
format(double value)
Formats a double value according to current precision setting (see PRECISION_SETTING) and returns it in a string. |
protected java.lang.String |
getScenarioName()
Returns the name of the scenario as read from the settings |
protected double |
getSimTime()
Returns the current simulation time from the SimClock |
protected void |
init()
Intializes the report output. |
protected void |
newEvent()
This method should be called before every new (complete) event the report logs. |
protected void |
setPrefix(java.lang.String txt)
Sets a prefix that will be inserted before every line in the report |
protected void |
write(java.lang.String txt)
Writes a line to report using defined prefix and out writer. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String INTERVAL_SETTING
public static final java.lang.String OUTPUT_SETTING
public static final java.lang.String PRECISION_SETTING
public static final int DEF_PRECISION
public static final java.lang.String REPORTDIR_SETTING
OUTPUT_SETTING) -setting id ("Report.reportDir")
public static final java.lang.String OUT_SUFFIX
public static final java.lang.String INTERVALLED_FORMAT
protected java.io.PrintWriter out
write(String)
| Constructor Detail |
|---|
public Report()
| Method Detail |
|---|
protected void init()
protected void newEvent()
protected void write(java.lang.String txt)
out writer.
txt - Line to writesetPrefix(String)protected java.lang.String format(double value)
PRECISION_SETTING) and returns it in a string.
value - The value to format
protected void setPrefix(java.lang.String txt)
txt - Text to use as the prefixprotected java.lang.String getScenarioName()
protected double getSimTime()
public void done()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||