Class Query

    • Constructor Detail

      • Query

        public Query​(java.net.Socket sock)
              throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • doQuery

        protected ResponseMessage doQuery​(RequestMessage msg)
                                   throws java.io.IOException
        Sends a request message to SUMO and returns a response message.
        Parameters:
        msg -
        Throws:
        java.io.IOException
      • doQuerySingle

        protected ResponseContainer doQuerySingle​(Command request)
                                           throws java.io.IOException
        Like doQuery(RequestMessage), but good for one-command/ one-response queries.
        Parameters:
        request -
        Throws:
        java.io.IOException
      • doSetOrder

        protected void doSetOrder​(int index)
                           throws java.io.IOException
        Set multi-client ordering index
        Parameters:
        index -
        Throws:
        java.io.IOException
      • doClose

        protected void doClose()
                        throws java.io.IOException
        Disconnect client from the sumo server
        Throws:
        java.io.IOException
      • doSimulationStep

        protected void doSimulationStep​(double targetTime)
                                 throws java.io.IOException
        Do next time step and update subscription results
        Parameters:
        targetTime -
        Throws:
        java.io.IOException
      • queryAndVerifySingle

        protected ResponseContainer queryAndVerifySingle​(Command request)
                                                  throws java.io.IOException
        Like queryAndVerify(RequestMessage), but good for one-command/ one-response queries.
        Parameters:
        request -
        Returns:
        the response container for the specified request
        Throws:
        java.io.IOException
      • fireAndForget

        protected void fireAndForget​(Command request)
        fireAndForget function
        Parameters:
        request -
        Throws:
        java.io.IOException
      • getOutStream

        public java.io.DataOutputStream getOutStream()