Class SumoTraasConnection

java.lang.Object
real_time_traffic_simulation_with_java.wrapper.SumoTraasConnection

public class SumoTraasConnection extends Object
Wrapper class for SumoTraciConnection to manage connection with SUMO simulator using TraaS library
  • Constructor Details

    • SumoTraasConnection

      public SumoTraasConnection() throws Exception
      Constructor for SumoTraasConnection
      Throws:
      Exception
  • Method Details

    • getConnection

      public it.polito.appeal.traci.SumoTraciConnection getConnection()
      Getter for connection
      Returns:
      SumoTraciConnection connection object
    • startConnection

      public void startConnection() throws Exception
      Method to start the connection
      Throws:
      Exception
    • nextStep

      public void nextStep() throws Exception
      Make a Sumo-move-to-the-next-step method
      Throws:
      Exception
    • getCurrentStep

      public double getCurrentStep() throws Exception
      Get current simulation time in seconds
      Returns:
      double time in seconds
      Throws:
      Exception
    • closeConnection

      public void closeConnection() throws Exception
      Method to close the connection. Check if the connection is null or not. If yes then throw Exception.
      Throws:
      Exception