public class OTSIMBConnector
extends org.opentrafficsim.imb.connector.IMBConnector
Copyright (c) 2013-2019 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
| Modifier and Type | Field and Description |
|---|---|
static String |
PROPERTY_KEY
Key for compound property with IMB settings.
|
| Constructor and Description |
|---|
OTSIMBConnector(String host,
int port,
String modelName,
int modelId,
String federation)
Create a new OTSIMBConnector by specifying all the details.
|
OTSIMBConnector(nl.tno.imb.TConnection connection) |
| Modifier and Type | Method and Description |
|---|---|
static OTSIMBConnector |
create(nl.tudelft.simulation.dsol.model.inputparameters.InputParameterMap inputParameterMap,
String modelName)
Construct a new OTSIMBConnector from a InputParameterMap (preferably constructed with the
standardIMBProperties method of this class.
|
static OTSIMBConnector |
create(String modelName)
Create a new OTSIMBConnector expecting the IMB hub on localhost port 4000.
|
static nl.tudelft.simulation.dsol.model.inputparameters.InputParameterMap |
standardIMBProperties(int displayPriority)
Create a InputParameterMap with the settings for an IMB connection.
|
static nl.tudelft.simulation.dsol.model.inputparameters.InputParameterMap |
standardIMBProperties(int displayPriority,
String imbHost)
Create a InputParameterMap with the settings for an IMB connection.
|
public static String PROPERTY_KEY
public OTSIMBConnector(String host, int port, String modelName, int modelId, String federation) throws org.opentrafficsim.imb.IMBException
host - String; the host that runs the IMB hub serverport - int; the port number on the IMB hub hostmodelName - String; the name used to register on the hub hostmodelId - int; usually 1federation - String; usually "OTS_RT"org.opentrafficsim.imb.IMBException - when a connection to the IMB hub could not be establishedpublic OTSIMBConnector(nl.tno.imb.TConnection connection)
throws org.opentrafficsim.imb.IMBException
connection - TConnection; the IMB connectionorg.opentrafficsim.imb.IMBException - in case of connection problemspublic static OTSIMBConnector create(String modelName) throws org.opentrafficsim.imb.IMBException
modelName - String; the name used to register on the hub hostorg.opentrafficsim.imb.IMBException - when a connection to the IMB hub could not be establishedpublic static OTSIMBConnector create(nl.tudelft.simulation.dsol.model.inputparameters.InputParameterMap inputParameterMap, String modelName) throws org.opentrafficsim.imb.IMBException
inputParameterMap - InputParameterMap; the compound property with the settingsmodelName - String; the name used to register on the hub hostorg.opentrafficsim.imb.IMBException - when a connection to the IMB hub could not be establishedpublic static nl.tudelft.simulation.dsol.model.inputparameters.InputParameterMap standardIMBProperties(int displayPriority)
displayPriority - int; the displayPriority of the created InputParameterMappublic static nl.tudelft.simulation.dsol.model.inputparameters.InputParameterMap standardIMBProperties(int displayPriority,
String imbHost)
displayPriority - int; the displayPriority of the created InputParameterMapimbHost - String; host that runs the IMB hubCopyright © 2014–2019 Delft University of Technology. All rights reserved.