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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SumoTrafficLightLogic.Phase
A helper class represents the switch phases of the traffic light.
-
Field Summary
-
Fields inherited from class org.eclipse.mosaic.fed.sumo.bridge.api.complex.AbstractSubscriptionResult
id
-
-
Constructor Summary
Constructors Constructor Description SumoTrafficLightLogic(String logicId, List<SumoTrafficLightLogic.Phase> phases, int currentPhase)
Creates a newSumoTrafficLightLogic
object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getCurrentPhase()
Getter for the Index of the phase.String
getLogicId()
Getter for the Id of the traffic light logic.List<SumoTrafficLightLogic.Phase>
getPhases()
Getter for the switch phases.
-
-
-
Constructor Detail
-
SumoTrafficLightLogic
public SumoTrafficLightLogic(String logicId, List<SumoTrafficLightLogic.Phase> phases, int currentPhase)
Creates a newSumoTrafficLightLogic
object.- Parameters:
logicId
- The id of the traffic light logic.phases
- List of switch phases.currentPhase
- The index of the phase.
-
-
Method Detail
-
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.
-
-