peersim.vector
Class ValueDumper
java.lang.Object
peersim.vector.VectControl
peersim.vector.ValueDumper
- All Implemented Interfaces:
- Control
public class ValueDumper
- extends VectControl
Dump the content of a vector in a file. Each line
represent a single node.
Values are dumped to a file whose name is obtained from a
configurable prefix (set by "outf"), a number that is
increased before each dump by one, and the extension ".vec".
This observer class can observe any protocol field containing a
primitive value, provided that the field is associated with a getter method
that reads it.
- See Also:
VectControl
,
peersim.vector
Parameter Summary |
outf
This is the base name of the file where the values are saved. |
Constructor Summary |
ValueDumper(java.lang.String prefix)
Standard constructor that reads the configuration parameters. |
Method Summary |
boolean |
execute()
Dump the content of a vector in a file. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
outf
- This is the base name of the file where the values are saved. The full name
will be baseName+cycleid+".vec".
ValueDumper
public ValueDumper(java.lang.String prefix)
- Standard constructor that reads the configuration parameters.
Invoked by the simulation engine.
- Parameters:
prefix
- the configuration prefix for this class
execute
public boolean execute()
- Dump the content of a vector in a file. Each line
represent a single node.
Values are dumped to a file whose name is obtained from a
configurable prefix (set by "outf"), a number that is
increased before each dump by one, and the extension ".vec".
- Returns:
- always false
- Throws:
java.lang.RuntimeException
- if there is an I/O problem