Class GraphTransceiver
- java.lang.Object
-
- org.djutils.event.EventProducer
-
- org.opentrafficsim.imb.transceiver.AbstractTransceiver
-
- org.opentrafficsim.core.graphs.imb.GraphTransceiver
-
- All Implemented Interfaces:
java.io.Serializable,java.util.EventListener,EventListenerInterface,EventProducerInterface,Identifiable,org.opentrafficsim.imb.transceiver.EventTransceiver,org.opentrafficsim.imb.transceiver.Transceiver
public class GraphTransceiver extends AbstractTransceiver
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.djutils.event.EventProducer
eventProducerImpl
-
Fields inherited from interface org.djutils.event.EventProducerInterface
FIRST_POSITION, LAST_POSITION
-
-
Constructor Summary
Constructors Constructor Description GraphTransceiver(org.opentrafficsim.imb.connector.Connector connector, OTSSimulatorInterface simulator, Network network, int width, int height, AbstractPlot plot, Duration transmissionInterval)Construct a new GraphTransceiver.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.io.SerializablegetSourceId()voidmakePNG(AbstractPlot plot)-
Methods inherited from class org.opentrafficsim.imb.transceiver.AbstractTransceiver
addIMBtoOTSChannel, addIMBtoOTSChannel, addOTSToIMBChannel, getConnector, getId, getSimulator, handleMessageFromIMB, notify, removeOTSToIMBChannel, toString
-
Methods inherited from class org.djutils.event.EventProducer
addListener, addListener, addListener, addListener, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireUnverifiedEvent, fireUnverifiedEvent, fireUnverifiedEvent, fireUnverifiedEvent, fireUnverifiedEvent, fireUnverifiedEvent, fireUnverifiedEvent, fireUnverifiedEvent, fireUnverifiedEvent, fireUnverifiedEvent, fireUnverifiedEvent, fireUnverifiedTimedEvent, fireUnverifiedTimedEvent, fireUnverifiedTimedEvent, fireUnverifiedTimedEvent, fireUnverifiedTimedEvent, fireUnverifiedTimedEvent, fireUnverifiedTimedEvent, fireUnverifiedTimedEvent, fireUnverifiedTimedEvent, fireUnverifiedTimedEvent, fireUnverifiedTimedEvent, getEventTypesWithListeners, getListenerReferences, hasListeners, numberOfListeners, removeAllListeners, removeAllListeners, removeListener
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.djutils.event.EventProducerInterface
addListener, addListener, addListener, addListener, getEventTypesWithListeners, hasListeners, numberOfListeners, removeListener
-
-
-
-
Constructor Detail
-
GraphTransceiver
public GraphTransceiver(org.opentrafficsim.imb.connector.Connector connector, OTSSimulatorInterface simulator, Network network, int width, int height, AbstractPlot plot, Duration transmissionInterval) throws org.opentrafficsim.imb.IMBExceptionConstruct a new GraphTransceiver.- Parameters:
connector- Connector; the IMB connectorsimulator- OTSSimulatorInterface; the simulatornetwork- Network; the networkwidth- int; the width of the graph, in pixelsheight- int; the height of the graph, in pixelsplot- AbstractPlot; the graphtransmissionInterval- Duration; the interval between generation of graphs- Throws:
org.opentrafficsim.imb.IMBException- when the message cannot be posted, or the scheduling of the publish event fails
-
-
Method Detail
-
makePNG
public void makePNG(AbstractPlot plot) throws java.io.IOException, org.opentrafficsim.imb.IMBException, SimRuntimeException
- Parameters:
plot- AbstractPlot; the plot to generate the PNG for- Throws:
java.io.IOException- when the creation of the PNG has failedorg.opentrafficsim.imb.IMBException- when the transmission of the IMB message failsSimRuntimeException- when the scheduling of the next publish event fails
-
getSourceId
public java.io.Serializable getSourceId()
- Specified by:
getSourceIdin interfaceEventProducerInterface- Specified by:
getSourceIdin classEventProducer
-
-