Interface NonDirectionalOccupancySensor
-
- All Superinterfaces:
org.opentrafficsim.base.Identifiable
,Serializable
- All Known Implementing Classes:
TrafficLightSensor
public interface NonDirectionalOccupancySensor extends Serializable, org.opentrafficsim.base.Identifiable
An occupancy sensor is a lane-based object that can be triggered by a relative position of the GTU (e.g., front, back) when that relative position passes over the sensor location on the lane. XXXCopyright (c) 2013-2022 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.$LastChangedDate: 2015-09-14 01:33:02 +0200 (Mon, 14 Sep 2015) $, @version $Revision: 1401 $, by $Author: averbraeck $, initial version Dec 31, 2014
- Author:
- Alexander Verbraeck, Peter Knoppers
-
-
Field Summary
Fields Modifier and Type Field Description static TimedEventType
NON_DIRECTIONAL_OCCUPANCY_SENSOR_TRIGGER_ENTRY_EVENT
The timed event type for pub/sub indicating the triggering of the entry of a NonDirectionalOccupancySensor.static TimedEventType
NON_DIRECTIONAL_OCCUPANCY_SENSOR_TRIGGER_EXIT_EVENT
The timed event type for pub/sub indicating the triggering of the exit of an NonDirectionalOccupancySensor.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String
getId()
Length
getLanePositionA()
Return the A position of this NonDirectionalOccupancySensor.Length
getLanePositionB()
Return the B position of this NonDirectionalOccupancySensor.RelativePosition.TYPE
getPositionTypeEntry()
RelativePosition.TYPE
getPositionTypeExit()
OTSSimulatorInterface
getSimulator()
-
-
-
Field Detail
-
NON_DIRECTIONAL_OCCUPANCY_SENSOR_TRIGGER_ENTRY_EVENT
static final TimedEventType NON_DIRECTIONAL_OCCUPANCY_SENSOR_TRIGGER_ENTRY_EVENT
The timed event type for pub/sub indicating the triggering of the entry of a NonDirectionalOccupancySensor.
Payload: Object[] {String sensorId, NonDirectionalOccupancySensor sensor, LaneBasedGTU gtu, RelativePosition.TYPE relativePosition}
-
NON_DIRECTIONAL_OCCUPANCY_SENSOR_TRIGGER_EXIT_EVENT
static final TimedEventType NON_DIRECTIONAL_OCCUPANCY_SENSOR_TRIGGER_EXIT_EVENT
The timed event type for pub/sub indicating the triggering of the exit of an NonDirectionalOccupancySensor.
Payload: Object[] {String sensorId, NonDirectionalOccupancySensor sensor, LaneBasedGTU gtu, RelativePosition.TYPE relativePosition}
-
-
Method Detail
-
getPositionTypeEntry
RelativePosition.TYPE getPositionTypeEntry()
- Returns:
- the relative position type of the vehicle (e.g., FRONT, BACK) that triggers the sensor.
-
getPositionTypeExit
RelativePosition.TYPE getPositionTypeExit()
- Returns:
- the relative position type of the vehicle (e.g., FRONT, BACK) that triggers the sensor.
-
getLanePositionA
Length getLanePositionA()
Return the A position of this NonDirectionalOccupancySensor.- Returns:
- Length; the lane and position on the lane where GTU entry is detected
-
getLanePositionB
Length getLanePositionB()
Return the B position of this NonDirectionalOccupancySensor.- Returns:
- Length; the lane and position on the lane where GTU exit is detected
-
getId
String getId()
- Specified by:
getId
in interfaceorg.opentrafficsim.base.Identifiable
- Returns:
- The id of the sensor.
-
getSimulator
OTSSimulatorInterface getSimulator()
- Returns:
- The simulator.
-
-