|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--generator2.Reporter
|
+--generator2.PositionReporter
Class for reporting the positions of moving objects into a file.
| Field Summary | |
protected java.io.DataOutputStream |
dOut
The data output stream. |
protected java.io.PrintWriter |
pOut
The print writer. |
| Fields inherited from class generator2.Reporter |
DEL_OBJECT, MOVE_OBJECT, NEW_OBJECT, numOfEdges, numOfPoints, objects, properties, random, SYMBOLLAYER, visualize, VIZ |
| Constructor Summary | |
PositionReporter(java.util.Properties properties,
DrawableObjects objects)
Constructor of the default reporter. |
|
| Method Summary | |
void |
close()
Closes the reporter. |
protected static void |
print(java.io.DataOutputStream out,
byte action,
long id,
int repNum,
int objClass,
int time,
double x,
double y,
double speed,
double doneDist,
int nextNodeX,
int nextNodeY)
Prints the given point to the DataOutputStream. |
protected static void |
print(java.io.PrintWriter out,
java.lang.String action,
long id,
int repNum,
int objClass,
int time,
double x,
double y,
double speed,
double doneDist,
int nextNodeX,
int nextNodeY)
Prints the given point to the print writer. |
void |
reportDisappearingObject(double time,
long id,
int repNum,
int objClass,
int x,
int y,
double doneDist,
int reportProbability)
Reports the characteristic properties of a dispappering object at a time stamp |
int |
reportMovingObject(int time,
long id,
int repNum,
int objClass,
double x,
double y,
double speed,
double doneDist,
int nextNodeX,
int nextNodeY,
int reportProbability)
Reports the characteristic properties of a moving object at a time stamp according to its report probability. |
int |
reportNewMovingObject(int time,
long id,
int objClass,
int x,
int y,
double speed,
int nextNodeX,
int nextNodeY,
int reportProbability)
Reports an new moving object if its report probability > 0. |
| Methods inherited from class generator2.Reporter |
getNumberOfReportedEdges, getNumberOfReportedPoints, removeReportedObjects, reportDisappearingExternalObject, reportDouble, reportEdge, reportInt, reportMovingExternalObject, reportNewExternalObject, visualizeExternalObject, visualizeMovingObject |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected java.io.DataOutputStream dOut
protected java.io.PrintWriter pOut
| Constructor Detail |
public PositionReporter(java.util.Properties properties,
DrawableObjects objects)
properties - properties of the generatorobjects - container of drawable objects| Method Detail |
public void close()
close in class Reporter
protected static void print(java.io.PrintWriter out,
java.lang.String action,
long id,
int repNum,
int objClass,
int time,
double x,
double y,
double speed,
double doneDist,
int nextNodeX,
int nextNodeY)
out - the print writeraction - the action of the objectid - object idrepNum - report numberobjClass - object classtime - time stampx - current x-coordinatey - current y-coordinatespeed - current speeddoneDist - the distance since the last reportingnextNodeX - x-coordinate of the next nodenextNodeY - y-coordinate of the next node
protected static void print(java.io.DataOutputStream out,
byte action,
long id,
int repNum,
int objClass,
int time,
double x,
double y,
double speed,
double doneDist,
int nextNodeX,
int nextNodeY)
out - the DataOutputStreamaction - the action of the objectid - object idrepNum - report numberobjClass - object classtime - time stampx - current x-coordinatey - current y-coordinatespeed - current speeddoneDist - the distance since the last reportingnextNodeX - x-coordinate of the next nodenextNodeY - y-coordinate of the next node
public void reportDisappearingObject(double time,
long id,
int repNum,
int objClass,
int x,
int y,
double doneDist,
int reportProbability)
reportDisappearingObject in class Reportertime - the arrival time (with fraction)id - object idrepNum - report numberobjClass - object classx - x-coordinatey - y-coordinatedoneDist - the distance since the last reportingreportProbability - value between (0..1000)
public int reportMovingObject(int time,
long id,
int repNum,
int objClass,
double x,
double y,
double speed,
double doneDist,
int nextNodeX,
int nextNodeY,
int reportProbability)
reportMovingObject in class Reportertime - time stampid - object idrepNum - report numberobjClass - object classx - x-coordinatey - y-coordinatespeed - current speeddoneDist - the distance since the last reportingnextNodeX - x-coordinate of the next nodenextNodeY - y-coordinate of the next nodereportProbability - value between (0..1000)
public int reportNewMovingObject(int time,
long id,
int objClass,
int x,
int y,
double speed,
int nextNodeX,
int nextNodeY,
int reportProbability)
reportNewMovingObject in class Reportertime - time stampid - object idobjClass - object classx - x-coordinate of starty - y-coordinate of startspeed - current speednextNodeX - x-coordinate of the next nodenextNodeY - y-coordinate of the next nodereportProbability - value between (0..1000)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||