View Javadoc
1   package org.opentrafficsim.trafficcontrol;
2   
3   import java.awt.Container;
4   import java.util.Optional;
5   
6   /**
7    * Interface for actuated traffic controllers.
8    * <p>
9    * Copyright (c) 2013-2024 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved. <br>
10   * BSD-style license. See <a href="https://opentrafficsim.org/docs/license.html">OpenTrafficSim License</a>.
11   * </p>
12   * @author <a href="https://github.com/averbraeck">Alexander Verbraeck</a>
13   * @author <a href="https://github.com/peter-knoppers">Peter Knoppers</a>
14   * @author <a href="https://github.com/wjschakel">Wouter Schakel</a>
15   */
16  public interface ActuatedTrafficController extends TrafficController
17  {
18  
19      /**
20       * Tell the traffic controller that the state of a detector has changed.
21       * @param detectorId id of the detector
22       * @param detectingGTU detecting GTU
23       */
24      void updateDetector(String detectorId, boolean detectingGTU);
25  
26      /**
27       * Retrieve the Swing (for now) container in which the controller displays its current state.
28       * @return the display of the current state; may return empty
29       */
30      Optional<Container> getDisplayContainer();
31  
32  }