Class SumoTrafficLightLogic

java.lang.Object
org.eclipse.mosaic.fed.sumo.bridge.api.complex.AbstractSubscriptionResult
org.eclipse.mosaic.fed.sumo.bridge.api.complex.SumoTrafficLightLogic

public class SumoTrafficLightLogic extends AbstractSubscriptionResult
This class represents a traffic light program based on SUMO definition as described on https://sumo.dlr.de/docs/Simulation/Traffic_Lights.html#defining_new_tls-programs.
  • Constructor Details

    • SumoTrafficLightLogic

      public SumoTrafficLightLogic(String logicId, List<SumoTrafficLightLogic.Phase> phases, int currentPhase)
      Creates a new SumoTrafficLightLogic object.
      Parameters:
      logicId - The id of the traffic light logic.
      phases - List of switch phases.
      currentPhase - The index of the phase.
  • Method Details

    • getLogicId

      public String getLogicId()
      Getter for the Id of the traffic light logic.
      Returns:
      The logic Id.
    • getPhases

      public List<SumoTrafficLightLogic.Phase> getPhases()
      Getter for the switch phases.
      Returns:
      List of switch phases.
    • getCurrentPhase

      public int getCurrentPhase()
      Getter for the Index of the phase.
      Returns:
      the index of the phase.