public class GraphTransceiver extends AbstractTransceiver
Variable | Type | Comments |
---|---|---|
timestamp | double | time of the event, in simulation time seconds |
graphId | String | a unique id for the graph, e.g. a UUID string |
width | int | width of the graph in pixels |
height | int | height of the graph in pixels |
description | String | textual description of the graph |
graphType | String | type of graph; one of TRAJECTORY, SPEED_CONTOUR, ACCELERATION_CONTOUR, DENSITY_CONTOUR, FLOW_CONTOUR, FUNDAMENTAL_DIAGRAM |
time_resolution | double | For the four types of contour graphs, and the trajectory graph, it provides the aggregation in seconds. 0.0 for other types of graphs. When the value is 0.0 for the trajectory graph, the graph is updated on the basis of events from the GTU. |
value_resolution | double | For the four types of contour graphs, it provides the aggregation in the SI unit of the value. 0.0 for other types of graphs |
networkId | String | id of the Network for which the Graph is made |
numberOfLanes | int | number of Link-Lane combinations for this Graph |
linkId_1 | String | id of the first Link; unique within the Network |
laneId_1 | String | id of the first Lane, unique within the Link |
... | ||
linkId_n | String | id of the last Link; unique within the Network |
laneId_n | String | id of the last Lane, unique within the Link |
transmissionInterval | double | transmission interval of the graph in seconds |
Variable | Type | Comments |
---|---|---|
timestamp | double | time of the event, in simulation time seconds |
graphId | String | the unique id for the graph, e.g. a UUID string |
width | int | width of the graph in pixels |
height | int | height of the graph in pixels |
image data | byte[] | image in PNG format; starts with the standard 8-byte signature 89 50 4E 47 0D 0A 1A 0A. |
Variable | Type | Comments |
---|---|---|
timestamp | double | time of the event, in simulation time seconds |
graphId | String | the unique id for the graph that is removed |
width | int | width of the graph in pixels |
height | int | height of the graph in pixels |
Copyright (c) 2013-2016 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
Constructor and Description |
---|
GraphTransceiver(org.opentrafficsim.imb.connector.Connector connector,
org.opentrafficsim.simulationengine.SimpleSimulatorInterface simulator,
org.opentrafficsim.core.network.Network network,
int width,
int height,
org.opentrafficsim.graphs.AbstractOTSPlot plot,
org.djunits.value.vdouble.scalar.Duration transmissionInterval)
Construct a new GraphTransceiver.
|
Modifier and Type | Method and Description |
---|---|
void |
makePNG(org.opentrafficsim.graphs.AbstractOTSPlot plot) |
addIMBtoOTSChannel, addIMBtoOTSChannel, addOTSToIMBChannel, getConnector, getId, getSimulator, handleMessageFromIMB, notify, removeOTSToIMBChannel, toString
addListener, addListener, addListener, addListener, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, removeAllListeners, removeAllListeners, removeListener
public GraphTransceiver(org.opentrafficsim.imb.connector.Connector connector, org.opentrafficsim.simulationengine.SimpleSimulatorInterface simulator, org.opentrafficsim.core.network.Network network, int width, int height, org.opentrafficsim.graphs.AbstractOTSPlot plot, org.djunits.value.vdouble.scalar.Duration transmissionInterval) throws org.opentrafficsim.imb.IMBException
connector
- Connector; the IMB connectorsimulator
- SimpleSimulatorInterface; the simulatornetwork
- Network; the networkwidth
- int; the width of the graph, in pixelsheight
- int; the height of the graph, in pixelsplot
- AbstractOTSPlot; the graphtransmissionInterval
- Duration; the interval between generation of graphsorg.opentrafficsim.imb.IMBException
- when the message cannot be posted, or the scheduling of the publish event failspublic void makePNG(org.opentrafficsim.graphs.AbstractOTSPlot plot) throws IOException, org.opentrafficsim.imb.IMBException, nl.tudelft.simulation.dsol.SimRuntimeException
plot
- the plot to generate the PNG forIOException
- when the creation of the PNG has failedorg.opentrafficsim.imb.IMBException
- when the transmission of the IMB message failsnl.tudelft.simulation.dsol.SimRuntimeException
- when the scheduling of the next publish event failsCopyright © 2014–2016 Delft University of Technology. All rights reserved.