Class TriggerSensor
- java.lang.Object
-
- org.djutils.event.EventProducer
-
- org.opentrafficsim.core.object.StaticObject
-
- org.opentrafficsim.road.network.lane.object.AbstractLaneBasedObject
-
- org.opentrafficsim.road.network.lane.object.sensor.AbstractSensor
-
- org.opentrafficsim.road.network.lane.TriggerSensor
-
- All Implemented Interfaces:
Serializable
,Comparable<SingleSensor>
,Locatable
,EventProducerInterface
,org.opentrafficsim.base.Identifiable
,org.opentrafficsim.core.animation.Drawable
,Compatible
,ObjectInterface
,LaneBasedObject
,Sensor
,SingleSensor
class TriggerSensor extends AbstractSensor
-
-
Field Summary
-
Fields inherited from class org.djutils.event.EventProducer
eventProducerImpl
-
Fields inherited from interface org.opentrafficsim.core.compatibility.Compatible
EVERYTHING, MINUS, PLUS
-
Fields inherited from interface org.djutils.event.EventProducerInterface
FIRST_POSITION, LAST_POSITION
-
Fields inherited from interface org.opentrafficsim.road.network.lane.object.sensor.SingleSensor
DEFAULT_SENSOR_ELEVATION, SENSOR_TRIGGER_EVENT
-
-
Constructor Summary
Constructors Constructor Description TriggerSensor(Lane lane, Length longitudinalPosition, RelativePosition.TYPE positionType, String name, OTSSimulatorInterface simulator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AbstractSensor
clone(CrossSectionElement newCSE, OTSSimulatorInterface newSimulator)
void
triggerResponse(LaneBasedGTU gtu)
-
Methods inherited from class org.opentrafficsim.road.network.lane.object.sensor.AbstractSensor
compareTo, equals, getDetectedGTUTypes, getPositionType, getSimulator, hashCode, isCompatible, makeGeometry, toString, trigger
-
Methods inherited from class org.opentrafficsim.road.network.lane.object.AbstractLaneBasedObject
clone, getDirection, getFullId, getLane, getLocation, getLongitudinalPosition, init
-
Methods inherited from class org.opentrafficsim.core.object.StaticObject
create, create, getBounds, getGeometry, getHeight, getId, getSourceId
-
Methods inherited from class org.djutils.event.EventProducer
addListener, addListener, addListener, addListener, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireUnverifiedEvent, fireUnverifiedEvent, fireUnverifiedEvent, fireUnverifiedEvent, fireUnverifiedEvent, fireUnverifiedEvent, fireUnverifiedEvent, fireUnverifiedEvent, fireUnverifiedEvent, fireUnverifiedEvent, fireUnverifiedEvent, fireUnverifiedTimedEvent, fireUnverifiedTimedEvent, fireUnverifiedTimedEvent, fireUnverifiedTimedEvent, fireUnverifiedTimedEvent, fireUnverifiedTimedEvent, fireUnverifiedTimedEvent, fireUnverifiedTimedEvent, fireUnverifiedTimedEvent, fireUnverifiedTimedEvent, fireUnverifiedTimedEvent, getEventTypesWithListeners, getListenerReferences, hasListeners, numberOfListeners, removeAllListeners, removeAllListeners, removeListener
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.djutils.event.EventProducerInterface
addListener, addListener, addListener, addListener, getEventTypesWithListeners, getSourceId, hasListeners, numberOfListeners, removeListener
-
Methods inherited from interface org.opentrafficsim.road.network.lane.object.LaneBasedObject
getBounds, getDirection, getLane, getLocation, getLongitudinalPosition
-
Methods inherited from interface org.opentrafficsim.core.object.ObjectInterface
getFullId, getGeometry, getHeight
-
-
-
-
Constructor Detail
-
TriggerSensor
TriggerSensor(Lane lane, Length longitudinalPosition, RelativePosition.TYPE positionType, String name, OTSSimulatorInterface simulator) throws NetworkException
- Parameters:
lane
- lane of the sensorlongitudinalPosition
- position of the sensor on the lanepositionType
- trigger position of the GTUname
- name of the sensorsimulator
- the simulator- Throws:
NetworkException
- in case position is out of bounds
-
-
Method Detail
-
triggerResponse
public void triggerResponse(LaneBasedGTU gtu)
- Specified by:
triggerResponse
in classAbstractSensor
-
clone
public AbstractSensor clone(CrossSectionElement newCSE, OTSSimulatorInterface newSimulator) throws NetworkException
- Specified by:
clone
in classAbstractSensor
- Throws:
NetworkException
-
-