Class LaneGTUTransceiver
- java.lang.Object
-
- org.djutils.event.EventProducer
-
- org.opentrafficsim.imb.transceiver.AbstractTransceiver
-
- org.opentrafficsim.imb.transceiver.urbanstrategy.LaneGTUTransceiver
-
- All Implemented Interfaces:
java.io.Serializable,java.util.EventListener,EventListenerInterface,EventProducerInterface,Identifiable,org.opentrafficsim.imb.transceiver.EventTransceiver,org.opentrafficsim.imb.transceiver.Transceiver
public class LaneGTUTransceiver extends AbstractTransceiver
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.djutils.event.EventProducer
eventProducerImpl
-
Fields inherited from interface org.djutils.event.EventProducerInterface
FIRST_POSITION, LAST_POSITION
-
-
Constructor Summary
Constructors Constructor Description LaneGTUTransceiver(org.opentrafficsim.imb.connector.Connector connector, DEVSSimulatorInterface.TimeDoubleUnit simulator, OTSNetwork network)Construct a new LaneGTUTransceiver.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.io.SerializablegetSourceId()voidnotify(EventInterface event)java.lang.Object[]transformChange(EventInterface event)Transform the GTU added or removed event content to a corresponding IMB message.java.lang.Object[]transformDelete(EventInterface event)Transform the removal of a Lane from the network to a corresponding IMB message.java.lang.Object[]transformNew(EventInterface event)Transform the addition of a Lane to the network to a corresponding IMB message.-
Methods inherited from class org.opentrafficsim.imb.transceiver.AbstractTransceiver
addIMBtoOTSChannel, addIMBtoOTSChannel, addOTSToIMBChannel, getConnector, getId, getSimulator, handleMessageFromIMB, removeOTSToIMBChannel, toString
-
Methods inherited from class org.djutils.event.EventProducer
addListener, addListener, addListener, addListener, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireUnverifiedEvent, fireUnverifiedEvent, fireUnverifiedEvent, fireUnverifiedEvent, fireUnverifiedEvent, fireUnverifiedEvent, fireUnverifiedEvent, fireUnverifiedEvent, fireUnverifiedEvent, fireUnverifiedEvent, fireUnverifiedEvent, fireUnverifiedTimedEvent, fireUnverifiedTimedEvent, fireUnverifiedTimedEvent, fireUnverifiedTimedEvent, fireUnverifiedTimedEvent, fireUnverifiedTimedEvent, fireUnverifiedTimedEvent, fireUnverifiedTimedEvent, fireUnverifiedTimedEvent, fireUnverifiedTimedEvent, fireUnverifiedTimedEvent, getEventTypesWithListeners, getListenerReferences, hasListeners, numberOfListeners, removeAllListeners, removeAllListeners, removeListener
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.djutils.event.EventProducerInterface
addListener, addListener, addListener, addListener, getEventTypesWithListeners, hasListeners, numberOfListeners, removeListener
-
-
-
-
Constructor Detail
-
LaneGTUTransceiver
public LaneGTUTransceiver(org.opentrafficsim.imb.connector.Connector connector, DEVSSimulatorInterface.TimeDoubleUnit simulator, OTSNetwork network) throws org.opentrafficsim.imb.IMBExceptionConstruct a new LaneGTUTransceiver.- Parameters:
connector- Connector; the IMB connector through which this transceiver communicatessimulator- DEVSSimulatorInterface.TimeDoubleUnit; the simulator to schedule the incoming notifications onnetwork- OTSNetwork; the OTS network on which Links for Lanes are registered- Throws:
org.opentrafficsim.imb.IMBException- when the registration of one of the channels failsjava.lang.NullPointerException- in case one of the arguments is null.
-
-
Method Detail
-
notify
public void notify(EventInterface event) throws java.rmi.RemoteException
- Specified by:
notifyin interfaceEventListenerInterface- Overrides:
notifyin classAbstractTransceiver- Throws:
java.rmi.RemoteException
-
transformNew
public java.lang.Object[] transformNew(EventInterface event)
Transform the addition of a Lane to the network to a corresponding IMB message.- Parameters:
event- EventInterface; the event to transform to a NEW message.- Returns:
- the NEW payload
-
transformChange
public java.lang.Object[] transformChange(EventInterface event)
Transform the GTU added or removed event content to a corresponding IMB message.- Parameters:
event- EventInterface; the event to transform to a CHANGE message.- Returns:
- the CHANGE payload
-
transformDelete
public java.lang.Object[] transformDelete(EventInterface event)
Transform the removal of a Lane from the network to a corresponding IMB message.- Parameters:
event- EventInterface; the event to transform to a DELETE message.- Returns:
- the DELETE payload
-
getSourceId
public java.io.Serializable getSourceId()
- Specified by:
getSourceIdin interfaceEventProducerInterface- Specified by:
getSourceIdin classEventProducer
-
-