Class AbstractEventTransceiver
- java.lang.Object
-
- org.opentrafficsim.sim0mq.publisher.AbstractTransceiver
-
- org.opentrafficsim.sim0mq.publisher.AbstractEventTransceiver
-
- All Implemented Interfaces:
Identifiable
,TransceiverInterface
- Direct Known Subclasses:
GTUTransceiver
public abstract class AbstractEventTransceiver extends AbstractTransceiver
Transceiver for DJUNITS events.Copyright (c) 2020-2020 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 Summary
Constructors Constructor Description AbstractEventTransceiver(String id, MetaData addressFields, TimedEventType eventType)
Construct a new AbstractEventTransceiver.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static MetaData
constructResultFields(TimedEventType eventType)
Construct a Sim0MQ MetaData object that corresponds to the MetaData of DJUTILS EventType.-
Methods inherited from class org.opentrafficsim.sim0mq.publisher.AbstractTransceiver
getAddressFields, getId, getResultFields, toString, verifyMetaData
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.opentrafficsim.sim0mq.publisher.TransceiverInterface
get, getIdSource, hasIdSource
-
-
-
-
Constructor Detail
-
AbstractEventTransceiver
public AbstractEventTransceiver(String id, MetaData addressFields, TimedEventType eventType)
Construct a new AbstractEventTransceiver.- Parameters:
id
- String; name of the new AbstractEventTransceiveraddressFields
- MetaData; address format accepted by the new AbstractEventTransceivereventType
- TimedEventType; type of the event that the AbstractEventTransceiver can subscribe to in the network
-
-
Method Detail
-
constructResultFields
public static MetaData constructResultFields(TimedEventType 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
- TimedEventType; the event type- Returns:
- MetaData; a MetaData object that corresponds to the MetaData of the event type
- Throws:
ClassCastException
- when theeventType
contains a class that cannot be carried over Sim0MQ
-
-