public class OTSIMBConnector
extends org.opentrafficsim.imb.connector.IMBConnector
Copyright (c) 2013-2016 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.
|
Modifier and Type | Method and Description |
---|---|
static OTSIMBConnector |
create(org.opentrafficsim.base.modelproperties.CompoundProperty compoundProperty,
String modelName)
Construct a new OTSIMBConnector from a CompoundProperty (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 org.opentrafficsim.base.modelproperties.CompoundProperty |
standardIMBProperties(int displayPriority)
Create a CompoundProperty 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
- integer; usually 1federation
- string; usually "OTS_RT"org.opentrafficsim.imb.IMBException
- when a connection to the IMB hub could not be establishedpublic 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(org.opentrafficsim.base.modelproperties.CompoundProperty compoundProperty, String modelName) throws org.opentrafficsim.imb.IMBException
compoundProperty
- CompoundProperty; 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 org.opentrafficsim.base.modelproperties.CompoundProperty standardIMBProperties(int displayPriority)
displayPriority
- int; the displayPriority of the created CompoundPropertyCopyright © 2014–2016 Delft University of Technology. All rights reserved.