Class SensorGTUTransceiver

java.lang.Object
nl.tudelft.simulation.event.EventProducer
org.opentrafficsim.imb.transceiver.AbstractTransceiver
org.opentrafficsim.imb.transceiver.urbanstrategy.SensorGTUTransceiver
All Implemented Interfaces:
Serializable, EventListener, nl.tudelft.simulation.event.EventListenerInterface, nl.tudelft.simulation.event.EventProducerInterface, Identifiable, org.opentrafficsim.imb.transceiver.EventTransceiver, org.opentrafficsim.imb.transceiver.Transceiver

public class SensorGTUTransceiver
extends AbstractTransceiver
OTS publishes events about sensor triggers to IMB, e.g. to show that a vehicle has triggered a sensor for a traffic light.
At the start of the OTS simulation, or when a sensor is added later, a NEW message is sent to IMB to identify the sensor, the lane on which it resides, and the position on the lane. The CHANGE message is posted whenever a vehicle triggers the sensor. When a Sensor is removed from the network, a DELETE event is posted. The Sensor NEW messages are posted after the Network NEW, Node NEW, Link NEW, and Lane NEW messages are posted.

NEW

 
Variable Type Comments
timestamp double time of the event, in simulation time seconds
networkId String Id of the Network where the Link resides
linkId String id of the Link; unique within the Network
laneId String id of the Lane, unique within the Link
sensorId String id of the Sensor, unique within the Lane
longitudinalPosition double position on the center line of the lane, in meters
length double length of the sensor, in meters
sensorPosition.x double x-coordinate of the sensor position in (gis) coordinates
sensorPosition.y double y-coordinate of the sensor position in (gis) coordinates
sensorPosition.z double z-coordinate of the sensor position in (gis) coordinates
triggerPosition String Relative position of the vehicle that triggers this sensor. One of {FRONT, REAR, REFERENCE, CONTOUR, CENTER, DRIVER}

CHANGE

 
Variable Type Comments
timestamp double time of the event, in simulation time seconds
networkId String Id of the Network where the Lane resides
linkId String id of the Link to which the lane belongs
laneId String id of the Lane, unique within the Link
sensorId String id of the Sensor, unique within the Lane
gtuId String id of the vehicle that triggers the sensor
speed double speed of the vehicle that triggers the sensor, in m/s
triggerPosition String Relative position of the vehicle that triggers this sensor. One of {FRONT, REAR, REFERENCE, CONTOUR, CENTER, DRIVER}

DELETE

 
Variable Type Comments
timestamp double time of the event, in simulation time seconds
networkId String Id of the Network where the Link resides
linkId String id of the Link in the Network
laneId String id of the Lane in the Link
sensorId String id of the Sensor that is removed from the Lane

Copyright (c) 2013-2020 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.

Version:
$Revision$, $LastChangedDate$, by $Author$, initial version Sep 13, 2016
Author:
Alexander Verbraeck, Peter Knoppers, Wouter Schakel
See Also:
Serialized Form
  • Field Summary

    Fields inherited from class nl.tudelft.simulation.event.EventProducer

    listeners

    Fields inherited from interface nl.tudelft.simulation.event.EventProducerInterface

    FIRST_POSITION, LAST_POSITION
  • Constructor Summary

    Constructors 
    Constructor Description
    SensorGTUTransceiver​(org.opentrafficsim.imb.connector.Connector connector, DEVSSimulatorInterface.TimeDoubleUnit simulator, OTSNetwork network)
    Construct a new SensorGTUTransceiver.
  • Method Summary

    Modifier and Type Method Description
    void notify​(nl.tudelft.simulation.event.EventInterface event)

    Methods inherited from class nl.tudelft.simulation.event.EventProducer

    addListener, addListener, addListener, addListener, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, removeAllListeners, removeAllListeners, removeListener

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface nl.tudelft.simulation.event.EventProducerInterface

    addListener, addListener, addListener, addListener, removeListener
  • Constructor Details

    • SensorGTUTransceiver

      public SensorGTUTransceiver​(org.opentrafficsim.imb.connector.Connector connector, DEVSSimulatorInterface.TimeDoubleUnit simulator, OTSNetwork network) throws org.opentrafficsim.imb.IMBException
      Construct a new SensorGTUTransceiver.
      Parameters:
      connector - Connector; the IMB connector through which this transceiver communicates
      simulator - DEVSSimulatorInterface.TimeDoubleUnit; the simulator to schedule the incoming notifications on
      network - OTSNetwork; the OTS network on which Links for Lanes are registered
      Throws:
      org.opentrafficsim.imb.IMBException - when the registration of one of the channels fails
      NullPointerException - in case one of the arguments is null.
  • Method Details