Class NodeTransceiver

java.lang.Object
nl.tudelft.simulation.event.EventProducer
org.opentrafficsim.imb.transceiver.AbstractTransceiver
org.opentrafficsim.imb.transceiver.urbanstrategy.NodeTransceiver
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 NodeTransceiver
extends AbstractTransceiver
OTS publishes events about the Nodes to IMB to be able to identify the nodes in the network.
At the start of the OTS simulation, or when a Node is added later, a NEW message is sent to IMB for each node to identify the node id. No CHANGE messages are posted. When a Node is removed from the network, a DELETE event is posted. The Node NEW messages are posted after the Network NEW message is posted.

NEW

 
Variable Type Comments
timestamp double time of the event, in simulation time seconds
networkId String Id of the Network where the Node resides
nodeId String id of the Node; unique within the Network
coordinate.x double x-coordinate of the Node
coordinate.y double y-coordinate of the Node
coordinate.z double z-coordinate of the Node

CHANGE

Not sent

DELETE

 
Variable Type Comments
timestamp double time of the event, in simulation time seconds
networkId String Id of the Network where the Node resides
nodeId String id of the Node that is removed from the Network

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
    NodeTransceiver​(org.opentrafficsim.imb.connector.Connector connector, DEVSSimulatorInterface.TimeDoubleUnit simulator, OTSNetwork network)
    Construct a new NodeTransceiver.
  • 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

    • NodeTransceiver

      public NodeTransceiver​(org.opentrafficsim.imb.connector.Connector connector, DEVSSimulatorInterface.TimeDoubleUnit simulator, OTSNetwork network) throws org.opentrafficsim.imb.IMBException
      Construct a new NodeTransceiver.
      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 Nodes 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