Class AbstractEventTransceiver

java.lang.Object
org.opentrafficsim.sim0mq.publisher.AbstractTransceiver
org.opentrafficsim.sim0mq.publisher.AbstractEventTransceiver
All Implemented Interfaces:
org.djutils.base.Identifiable, TransceiverInterface
Direct Known Subclasses:
GtuTransceiver

public abstract class AbstractEventTransceiver extends AbstractTransceiver
Transceiver for DJUNITS events.

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

    • AbstractEventTransceiver

      public AbstractEventTransceiver(String id, org.djutils.metadata.MetaData addressFields, org.djutils.event.EventType eventType)
      Construct a new AbstractEventTransceiver.
      Parameters:
      id - String; name of the new AbstractEventTransceiver
      addressFields - MetaData; address format accepted by the new AbstractEventTransceiver
      eventType - EventType; type of the event that the AbstractEventTransceiver can subscribe to in the network
  • Method Details

    • constructResultFields

      public static org.djutils.metadata.MetaData constructResultFields(org.djutils.event.EventType eventType) throws ClassCastException
      Construct a Sim0MQ MetaData object that corresponds to the MetaData of DJUTILS EventType. Classes that do not have a corresponding Sim0MQ type will result in a ClassCastException.
      Parameters:
      eventType - EventType; the event type
      Returns:
      MetaData; a MetaData object that corresponds to the MetaData of the event type
      Throws:
      ClassCastException - when the eventType contains a class that cannot be carried over Sim0MQ