Class AbstractIdTransceiver

java.lang.Object
org.opentrafficsim.sim0mq.publisher.AbstractTransceiver
org.opentrafficsim.sim0mq.publisher.AbstractIdTransceiver
All Implemented Interfaces:
org.djutils.base.Identifiable, TransceiverInterface
Direct Known Subclasses:
GtuIdTransceiver, LinkIdTransceiver, NodeIdTransceiver

public abstract class AbstractIdTransceiver extends AbstractTransceiver
Common code for id transceivers that use an empty address.

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

Author:
Alexander Verbraeck, Peter Knoppers, Wouter Schakel
  • Constructor Details

    • AbstractIdTransceiver

      public AbstractIdTransceiver(org.opentrafficsim.core.network.Network network, String id)
      Construct a GtuIdTransceiver.
      Parameters:
      network - Network; the OTS network
      id - String; name of the IdTransceiver
  • Method Details

    • getSet

      abstract org.djutils.immutablecollections.ImmutableSet<?> getSet()
      Retrieve the set of names of objects that can be individually subscribed to.
      Returns:
      Set<?>; the set of names of objects whose that can be subscribed to. Each object in this set should implement Identifiable
    • get

      public final Object[] get(Object[] address, ReturnWrapper returnWrapper) throws org.sim0mq.Sim0MQException, org.djutils.serialization.SerializationException
      Retrieve the data.
      Parameters:
      address - Object[]; the address of the data to retrieve
      returnWrapper - ReturnWrapper; to be used to report problems
      Returns:
      Object[]; the retrieved data, or null when no object with the address could be found
      Throws:
      org.sim0mq.Sim0MQException - when encoding an error message fails
      org.djutils.serialization.SerializationException - when encoding an error message fails
    • getNetwork

      final org.opentrafficsim.core.network.Network getNetwork()
      Retrieve the network.
      Returns:
      Network; the network