public class IMBSampler extends Sampler
Copyright (c) 2013-2018 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
Sampler.CompressionMethod| 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,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(KpiLaneDirection kpiLaneDirection) |
void |
initRecording(KpiLaneDirection kpiLaneDirection) |
static void |
main(String[] args)
Main program for IMBSampler.
|
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(Time time,
KpiLaneDirection kpiLaneDirection) |
void |
scheduleStopRecording(Time time,
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,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 void scheduleStartRecording(Time time, KpiLaneDirection kpiLaneDirection)
scheduleStartRecording in class Samplerpublic final void scheduleStopRecording(Time time, KpiLaneDirection kpiLaneDirection)
scheduleStopRecording in class Samplerpublic final void initRecording(KpiLaneDirection kpiLaneDirection)
initRecording in class Samplerpublic final void finalizeRecording(KpiLaneDirection kpiLaneDirection)
finalizeRecording in class 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.