public class IMBSampler
extends org.opentrafficsim.kpi.sampling.Sampler
Copyright (c) 2013-2017 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 |
|---|---|
protected GtuTypeData |
defaultGtuType
the default gtu type (for now).
|
protected RouteData |
defaultRoute
the default route (for now).
|
protected Map<String,GtuData> |
gtus
the gtus.
|
protected Map<String,LaneData> |
lanes
the lanes.
|
protected Map<String,org.opentrafficsim.kpi.sampling.KpiLaneDirection> |
lastLanes
last lane of gtus.
|
protected Map<String,LinkData> |
links
the links.
|
protected Map<String,NodeData> |
nodes
the nodes.
|
| Constructor and Description |
|---|
IMBSampler(org.opentrafficsim.imb.connector.IMBConnector imbConnector)
Constructor with listeners for nodes, links, lanes and gtu's.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addImbKpiTransceiver(ImbKpiTransceiver imbKpiTransceiver) |
void |
finalizeRecording(org.opentrafficsim.kpi.sampling.KpiLaneDirection kpiLaneDirection) |
void |
initRecording(org.opentrafficsim.kpi.sampling.KpiLaneDirection kpiLaneDirection) |
static void |
main(String[] args)
Main program for IMBSampler.
|
org.djunits.value.vdouble.scalar.Time |
now() |
protected void |
sample(double timeStamp,
String gtuId,
String laneId,
boolean forward,
double longitudinalPosition,
double speed,
double acceleration)
Sample the data received from a GTU.
|
void |
scheduleStartRecording(org.djunits.value.vdouble.scalar.Time time,
org.opentrafficsim.kpi.sampling.KpiLaneDirection kpiLaneDirection) |
void |
scheduleStopRecording(org.djunits.value.vdouble.scalar.Time time,
org.opentrafficsim.kpi.sampling.KpiLaneDirection kpiLaneDirection) |
protected void |
updateClock(double timeStamp)
Updates clock and triggers timed events.
|
contains, contains, equals, getTrajectoryGroup, hashCode, processGtuAddEvent, processGtuMoveEvent, processGtuRemoveEvent, processGtuRemoveEvent, registerExtendedDataType, registerMetaDataTypes, registerSpaceTimeRegion, startRecording, stopRecording, writeToFile, writeToFileprotected final Map<String,org.opentrafficsim.kpi.sampling.KpiLaneDirection> lastLanes
protected final GtuTypeData defaultGtuType
protected final RouteData defaultRoute
public IMBSampler(org.opentrafficsim.imb.connector.IMBConnector imbConnector)
throws org.opentrafficsim.imb.IMBException
imbConnector - IMB connectionorg.opentrafficsim.imb.IMBException - on connection errorpublic static void main(String[] args) throws org.opentrafficsim.imb.IMBException
args - the arguments with [0]=IP address, [1]=portorg.opentrafficsim.imb.IMBException - in case of invalid argumentspublic final org.djunits.value.vdouble.scalar.Time now()
now in class org.opentrafficsim.kpi.sampling.Samplerpublic final void scheduleStartRecording(org.djunits.value.vdouble.scalar.Time time,
org.opentrafficsim.kpi.sampling.KpiLaneDirection kpiLaneDirection)
scheduleStartRecording in class org.opentrafficsim.kpi.sampling.Samplerpublic final void scheduleStopRecording(org.djunits.value.vdouble.scalar.Time time,
org.opentrafficsim.kpi.sampling.KpiLaneDirection kpiLaneDirection)
scheduleStopRecording in class org.opentrafficsim.kpi.sampling.Samplerpublic final void initRecording(org.opentrafficsim.kpi.sampling.KpiLaneDirection kpiLaneDirection)
initRecording in class org.opentrafficsim.kpi.sampling.Samplerpublic final void finalizeRecording(org.opentrafficsim.kpi.sampling.KpiLaneDirection kpiLaneDirection)
finalizeRecording in class org.opentrafficsim.kpi.sampling.Samplerprotected void sample(double timeStamp,
String gtuId,
String laneId,
boolean forward,
double longitudinalPosition,
double speed,
double acceleration)
timeStamp - time of the samplinggtuId - gtulaneId - laneforward - driving directionlongitudinalPosition - positionspeed - speedacceleration - accelerationpublic void addImbKpiTransceiver(ImbKpiTransceiver imbKpiTransceiver)
imbKpiTransceiver - add imbKpiTransceiver.protected void updateClock(double timeStamp)
timeStamp - most recent time stampCopyright © 2014–2018 Delft University of Technology. All rights reserved.