View Javadoc
1   package org.opentrafficsim.road.network.lane.object.trafficlight;
2   
3   import org.djutils.event.TimedEventType;
4   import org.opentrafficsim.road.network.lane.object.LaneBasedObject;
5   
6   import nl.tudelft.simulation.dsol.animation.Locatable;
7   
8   /**
9    * <p>
10   * Copyright (c) 2013-2020 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved. <br>
11   * BSD-style license. See <a href="http://opentrafficsim.org/docs/current/license.html">OpenTrafficSim License</a>.
12   * </p>
13   * $LastChangedDate: 2015-07-24 02:58:59 +0200 (Fri, 24 Jul 2015) $, @version $Revision: 1147 $, by $Author: averbraeck $,
14   * initial version Oct 6, 2016 <br>
15   * @author <a href="http://www.tbm.tudelft.nl/averbraeck">Alexander Verbraeck</a>
16   * @author <a href="http://www.tudelft.nl/pknoppers">Peter Knoppers</a>
17   * @author <a href="http://www.transport.citg.tudelft.nl">Wouter Schakel</a>
18   */
19  public interface TrafficLight extends Locatable, LaneBasedObject
20  {
21      /** @return the trafficLightColor */
22      TrafficLightColor getTrafficLightColor();
23  
24      /**
25       * Set the new traffic light color.
26       * @param trafficLightColor TrafficLightColor; set the trafficLightColor
27       */
28      void setTrafficLightColor(TrafficLightColor trafficLightColor);
29  
30      /**
31       * The <b>timed</b> event type for pub/sub indicating the change of color of a traffic light. <br>
32       * Payload: Object[] {String trafficLightId, TrafficLight trafficLight, TrafficLightColor newColor}
33       */
34      TimedEventType TRAFFICLIGHT_CHANGE_EVENT = new TimedEventType("TRAFFICLIGHT.CHANGE");
35  
36  }