Package de.tudresden.sumo.util

Examples of de.tudresden.sumo.util.SumoCommand


   *
   * @return a list of IDs of all TLS
   */

  public static SumoCommand getIDList(){
    return new SumoCommand(Constants.CMD_GET_TL_VARIABLE, Constants.ID_LIST, "", Constants.RESPONSE_GET_TL_VARIABLE, Constants.TYPE_STRINGLIST);
  }
View Full Code Here


   * @param tlsID a string identifying the traffic light
   * @return absolute time, counting from simulation start, at which TLS may change
   */

  public static SumoCommand getNextSwitch(String tlsID){
    return new SumoCommand(Constants.CMD_GET_TL_VARIABLE, Constants.TL_NEXT_SWITCH, tlsID, Constants.RESPONSE_GET_TL_VARIABLE, Constants.TYPE_INTEGER);
  }
View Full Code Here

   * @param tlsID a string identifying the traffic light
   * @return index of the current phase
   */

  public static SumoCommand getPhase(String tlsID){
    return new SumoCommand(Constants.CMD_GET_TL_VARIABLE, Constants.TL_CURRENT_PHASE, tlsID, Constants.RESPONSE_GET_TL_VARIABLE, Constants.TYPE_INTEGER);
  }
View Full Code Here

   * @param tlsID a string identifying the traffic light
   * @return index of the current program
   */

  public static SumoCommand getProgram(String tlsID){
    return new SumoCommand(Constants.CMD_GET_TL_VARIABLE, Constants.TL_CURRENT_PROGRAM, tlsID, Constants.RESPONSE_GET_TL_VARIABLE, Constants.TYPE_STRING);
  }
View Full Code Here

   *
   * @param tlsID a string identifying the traffic light
   */

  public static SumoCommand getRedYellowGreenState(String tlsID){
    return new SumoCommand(Constants.CMD_GET_TL_VARIABLE, Constants.TL_RED_YELLOW_GREEN_STATE, tlsID, Constants.RESPONSE_GET_TL_VARIABLE, Constants.TYPE_STRING);
  }
View Full Code Here

   * @param tls complete program definition
   */

  public static SumoCommand setCompleteRedYellowGreenDefinition(String tlsID, SumoTLSLogic tls){

    return new SumoCommand(Constants.CMD_SET_TL_VARIABLE, Constants.TL_COMPLETE_PROGRAM_RYG, tlsID, tls);
  }
View Full Code Here

   * @param index an integer identifying the phase (it must be between 0 and the number of phases known to the current program of the tls - 1)
   */

  public static SumoCommand setPhase(String tlsID, int index){

    return new SumoCommand(Constants.CMD_SET_TL_VARIABLE, Constants.TL_PHASE_INDEX, tlsID, index);
  }
View Full Code Here

   * @param phaseDuration remaining duration of the current phase
   */

  public static SumoCommand setPhaseDuration(String tlsID, int phaseDuration){

    return new SumoCommand(Constants.CMD_SET_TL_VARIABLE, Constants.TL_PHASE_DURATION, tlsID, phaseDuration);
  }
View Full Code Here

   * @param programID a string identifying the program
   */

  public static SumoCommand setProgram(String tlsID, String programID){

    return new SumoCommand(Constants.CMD_SET_TL_VARIABLE, Constants.TL_PROGRAM, tlsID, programID);
  }
View Full Code Here

   * @param state as a tuple of light definitions from rRgGyYoO, for red, green, yellow, off, where lower case letters mean that the stream has to decelerate
   */

  public static SumoCommand setRedYellowGreenState(String tlsID, String state){

    return new SumoCommand(Constants.CMD_SET_TL_VARIABLE, Constants.TL_RED_YELLOW_GREEN_STATE, tlsID, state);
  }
View Full Code Here

TOP

Related Classes of de.tudresden.sumo.util.SumoCommand

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.