|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--generator2.Reporter
|
+--generator2.NodeReporter
Class for reporting the passed nodes into a file. Requires SDK 1.2 or higher.
| Nested Class Summary | |
protected class |
NodeReporter.ReportObject
Internal class for representing report objects. |
| Field Summary | |
protected java.io.DataOutputStream |
dOut
The data output stream. |
protected java.io.PrintWriter |
pOut
The print writer. |
protected java.util.Vector |
repObjs
Vector for storing report objects. |
| Fields inherited from class generator2.Reporter |
DEL_OBJECT, MOVE_OBJECT, NEW_OBJECT, numOfEdges, numOfPoints, objects, properties, random, SYMBOLLAYER, visualize, VIZ |
| Constructor Summary | |
NodeReporter(java.util.Properties properties,
DrawableObjects objects)
Constructor of the reporter. |
|
| Method Summary | |
void |
close()
Closes the reporter. |
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 |
void |
reportEdge(double time,
long objId,
int edgeRepNum,
int objClass,
long edgeId,
int edgeClass,
int x1,
int y1,
double speed,
int x2,
int y2,
int reportProbability)
Does nothing. |
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. |
protected void |
reportObjects()
Reports the objects from the "repObjs" vector. |
| Methods inherited from class generator2.Reporter |
getNumberOfReportedEdges, getNumberOfReportedPoints, removeReportedObjects, reportDisappearingExternalObject, reportDouble, 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
protected java.util.Vector repObjs
| Constructor Detail |
public NodeReporter(java.util.Properties properties,
DrawableObjects objects)
properties - properties of the generatorobjects - container of drawable objects| Method Detail |
public void close()
close in class Reporter
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 void reportEdge(double time,
long objId,
int edgeRepNum,
int objClass,
long edgeId,
int edgeClass,
int x1,
int y1,
double speed,
int x2,
int y2,
int reportProbability)
reportEdge in class Reportertime - time stamp (with fraction) when the edge is entriedobjId - the id of the moving object idedgeRepNum - the edge report numberobjClass - object classedgeId - the edge idedgeClass - the edge classx1 - the first x-coordinatey1 - the first y-coordinatespeed - current speedx2 - the second x-coordinatey2 - the second y-coordinatereportProbability - (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)protected void reportObjects()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||