Class ControllerSignal

  • All Implemented Interfaces:
    core.InterfaceEventWriter, core.InterfaceScenarioElement, dispatch.Pokable

    public class ControllerSignal
    extends AbstractController
    Base class for stage-based instersection signal controllers. This class can be used to create controllers that update the stage according to some logic (e.g. ControllerSignalPretimed), or by direct manipulation through the API.
    • Field Detail

      • stages

        public List<control.sigint.Stage> stages
      • curr_stage_index

        public int curr_stage_index
    • Constructor Detail

      • ControllerSignal

        public ControllerSignal​(Scenario scenario,
                                jaxb.Controller jaxb_controller)
                         throws error.OTMException
        Throws:
        error.OTMException
    • Method Detail

      • update_command

        public void update_command​(dispatch.Dispatcher dispatcher)
                            throws error.OTMException
        Specified by:
        update_command in class AbstractController
        Throws:
        error.OTMException
      • get_signal

        public final ActuatorSignal get_signal()
        Retrieve the signal actuator
      • get_stage_index

        public final Integer get_stage_index()
        Get the for the current stage within the stage list
      • get_command_for_stage_index

        public final control.command.CommandSignal get_command_for_stage_index​(int index)
        Get the command that represents a given stage index
      • set_stage_index

        public final void set_stage_index​(int index)
                                   throws error.OTMException
        Set the current stage
        Throws:
        error.OTMException