Class Query

    • Constructor Detail

      • Query

        public Query​(Socket sock)
              throws IOException
        Instantiates a new query.
        Parameters:
        sock - the sock
        Throws:
        IOException - Signals that an I/O exception has occurred.
    • Method Detail

      • doQuery

        protected ResponseMessage doQuery​(RequestMessage msg)
                                   throws IOException
        Sends a request message to SUMO and returns a response message.
        Parameters:
        msg - the msg
        Returns:
        the response message
        Throws:
        IOException - Signals that an I/O exception has occurred.
      • doSetOrder

        protected void doSetOrder​(int index)
                           throws IOException
        Set multi-client ordering index.
        Parameters:
        index - the index
        Throws:
        IOException - Signals that an I/O exception has occurred.
      • doClose

        protected void doClose()
                        throws IOException
        Disconnect client from the sumo server.
        Throws:
        IOException - Signals that an I/O exception has occurred.
      • doSimulationStep

        protected void doSimulationStep​(double targetTime)
                                 throws IOException
        Do next time step and update subscription results.
        Parameters:
        targetTime - the target time
        Throws:
        IOException - Signals that an I/O exception has occurred.
      • fireAndForget

        protected void fireAndForget​(Command request)
        fireAndForget function.
        Parameters:
        request - the request
      • getOutStream

        public DataOutputStream getOutStream()
        Gets the out stream.
        Returns:
        the out stream