Class Sim0mqPublisher

java.lang.Object
org.opentrafficsim.sim0mq.swing.Sim0mqPublisher

public final class Sim0mqPublisher extends Object
Sim0MQPublisher - make many OTS simulation controls and observations available over Sim0MQ.

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
  • Constructor Details

    • Sim0mqPublisher

      public Sim0mqPublisher(org.zeromq.ZContext zContext, String controlInput, String resultOutput)
      Create a new Sim0MQPublisher that is operated through //inproc sockets.
      Parameters:
      zContext - ZContext; needed to create the sockets
      controlInput - String; PULL socket for control input
      resultOutput - String; PUSH socket to output results
    • Sim0mqPublisher

      public Sim0mqPublisher(int port)
      Create a new Sim0MQPublisher that uses TCP transport.
      Parameters:
      port - int; port number to bind to
    • Sim0mqPublisher

      public Sim0mqPublisher(int port, AbstractSimulationScript preloadedSimulation, List<SubscriptionHandler> additionalSubscriptionHandlers, List<IncomingDataHandler> incomingDataHandlers) throws RemoteException
      Create a new Sim0MQPublisher that uses TCP transport.
      Parameters:
      port - int; port number to bind to
      preloadedSimulation - AbstractSimulationScript; a fully loaded (but not started) simulation
      additionalSubscriptionHandlers - List<SubscriptionHandler>; list of additional subscription handlers (may be null)
      incomingDataHandlers - List<IncomfingDataHandler>; list of additional handlers for incoming data that is not handled by the standard Sim0MQPublisher (may be null)
      Throws:
      RemoteException - when construction of the Publisher failed
    • Sim0mqPublisher

      public Sim0mqPublisher(int port, AbstractSimulationScript preloadedSimulation, List<SubscriptionHandler> additionalSubscriptionHandlers) throws RemoteException
      Create a new Sim0MQPublisher that uses TCP transport.
      Parameters:
      port - int; port number to bind to
      preloadedSimulation - AbstractSimulationScript; a fully loaded (but not started) simulation
      additionalSubscriptionHandlers - List<SubscriptionHandler>; list of additional subscription handlers (may be null)
      Throws:
      RemoteException - when construction of the Publisher failed