Class GraphTransceiver

    • 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.IMBException
        Construct a new GraphTransceiver.
        Parameters:
        connector - Connector; the IMB connector
        simulator - OTSSimulatorInterface; the simulator
        network - Network; the network
        width - int; the width of the graph, in pixels
        height - int; the height of the graph, in pixels
        plot - AbstractPlot; the graph
        transmissionInterval - 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 failed
        org.opentrafficsim.imb.IMBException - when the transmission of the IMB message fails
        SimRuntimeException - when the scheduling of the next publish event fails