Interface SingleSensor

    • Field Detail

      • SENSOR_TRIGGER_EVENT

        static final TimedEventType SENSOR_TRIGGER_EVENT
        The timed event type for pub/sub indicating the triggering of a Sensor on a lane.
        Payload: Object[] {String sensorId, Sensor sensor, LaneBasedGTU gtu, RelativePosition.TYPE relativePosition}
      • DEFAULT_SENSOR_ELEVATION

        static final Length DEFAULT_SENSOR_ELEVATION
        Default elevation of a sensor; if the lane is not at elevation 0; this value is probably far off.
    • Method Detail

      • getPositionType

        RelativePosition.TYPE getPositionType()
        Returns:
        the relative position type of the vehicle (e.g., FRONT, BACK) that triggers the sensor.
      • trigger

        void trigger​(LaneBasedGTU gtu)
        Trigger an action on the GTU. Normally this is the GTU that triggered the sensor. The typical call therefore is sensor.trigger(this);.
        Parameters:
        gtu - LaneBasedGTU; the GTU for which to carry out the trigger action.