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 int
curr_stage_index
List<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 Class
get_actuator_class()
control.command.CommandSignal
get_command_for_stage_index(int index)
Get the command that represents a given stage indexActuatorSignal
get_signal()
Retrieve the signal actuatorInteger
get_stage_index()
Get the for the current stage within the stage listvoid
set_stage_index(int index)
Set the current stagevoid
update_command(dispatch.Dispatcher dispatcher)
void
validate_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_class
in classAbstractController
-
validate_pre_init
public void validate_pre_init(error.OTMErrorLog errorLog)
- Overrides:
validate_pre_init
in classAbstractController
-
update_command
public void update_command(dispatch.Dispatcher dispatcher) throws error.OTMException
- Specified by:
update_command
in 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.OTMException
Set the current stage- Throws:
error.OTMException
-
-