Class SimulatorStateTransceiver

java.lang.Object
org.opentrafficsim.sim0mq.publisher.AbstractTransceiver
org.opentrafficsim.sim0mq.publisher.SimulatorStateTransceiver
All Implemented Interfaces:
org.djutils.base.Identifiable, TransceiverInterface

public class SimulatorStateTransceiver extends AbstractTransceiver
Transceiver for simulator state change 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:
Peter Knoppers
  • Field Details

    • eventMultiplexer

      final org.djutils.event.EventProducer eventMultiplexer
      Multiplexes SimulatorInterface.START_EVENT and SimulatorInterface.STOP_EVENT.
    • SIMULATOR_STATE_CHANGED

      public static final org.djutils.event.EventType SIMULATOR_STATE_CHANGED
      The event that will be emitted for either the START_EVENT or the STOP_EVENT.
  • Constructor Details

    • SimulatorStateTransceiver

      public SimulatorStateTransceiver(org.opentrafficsim.core.dsol.OtsSimulatorInterface simulator) throws RemoteException
      Construct a new SimulatorStateTransceiver.
      Parameters:
      simulator - OtsSimulatorInterface; the simulator
      Throws:
      RemoteException - on network error
  • Method Details

    • get

      public Object[] get(Object[] address, ReturnWrapper returnWrapper) throws RemoteException, 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:
      RemoteException - when communication needed to retrieve the data failed
      org.sim0mq.Sim0MQException - when encoding an error message fails
      org.djutils.serialization.SerializationException - when encoding an error message fails
    • getLookupEventProducer

      public LookupEventProducer getLookupEventProducer()
      Retrieve the event LookupEventProducer.
      Returns:
      EventProducerInterface; the event multiplexer