Package control.sigint
Class ControllerSignal
- java.lang.Object
-
- control.AbstractController
-
- control.sigint.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.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class control.AbstractController
AbstractController.Algorithm
-
-
Field Summary
Fields Modifier and Type Field Description intcurr_stage_indexList<control.sigint.Stage>stages-
Fields inherited from class control.AbstractController
actuator_by_usage, actuators, command, dt, end_time, event_output, id, scenario, sensor_by_usage, sensors, start_time, type
-
-
Constructor Summary
Constructors Constructor Description ControllerSignal(Scenario scenario, jaxb.Controller jaxb_controller)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Classget_actuator_class()control.command.CommandSignalget_command_for_stage_index(int index)Get the command that represents a given stage indexActuatorSignalget_signal()Retrieve the signal actuatorIntegerget_stage_index()Get the for the current stage within the stage listvoidset_stage_index(int index)Set the current stagevoidupdate_command(dispatch.Dispatcher dispatcher)voidvalidate_pre_init(error.OTMErrorLog errorLog)-
Methods inherited from class control.AbstractController
get_command_for_actuator_id, get_command_for_actuator_usage, getId, getSEType, initialize, is_inbuilt, poke, set_event_output, to_jaxb, validate_post_init
-
-
-
-
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
-
get_actuator_class
public Class get_actuator_class()
- Specified by:
get_actuator_classin classAbstractController
-
validate_pre_init
public void validate_pre_init(error.OTMErrorLog errorLog)
- Overrides:
validate_pre_initin classAbstractController
-
update_command
public void update_command(dispatch.Dispatcher dispatcher) throws error.OTMException- Specified by:
update_commandin classAbstractController- 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.OTMExceptionSet the current stage- Throws:
error.OTMException
-
-