SUMO - Simulation of Urban MObility

MSMoveReminder Class Reference

Something on a lane to be noticed about vehicle movement. More...

#include <MSMoveReminder.h>

Inheritance diagram for MSMoveReminder:
MSDevice MSE2Collector MSE3Collector::MSE3EntryReminder MSE3Collector::MSE3LeaveReminder MSInductLoop MSInstantInductLoop MSMeanData::MeanDataValues MSRouteProbe MSTriggeredRerouter

Public Types

enum  Notification {
  NOTIFICATION_DEPARTED, NOTIFICATION_JUNCTION, NOTIFICATION_SEGMENT, NOTIFICATION_LANE_CHANGE,
  NOTIFICATION_TELEPORT, NOTIFICATION_PARKING, NOTIFICATION_ARRIVED, NOTIFICATION_VAPORIZED,
  NOTIFICATION_TELEPORT_ARRIVED
}
 

Definition of a vehicle state.

More...

Public Member Functions

const MSLane * getLane () const throw ()
 Returns the lane the reminder works on.
 MSMoveReminder (MSLane *const lane=0, const bool doAdd=true) throw ()
 Constructor.
virtual void notifyMoveInternal (SUMOVehicle &veh, SUMOReal timeOnLane, SUMOReal speed) throw ()
 Internal notification about the vehicle moves.
virtual ~MSMoveReminder () throw ()
 Destructor.
Interface methods, to be derived by subclasses
virtual bool notifyEnter (SUMOVehicle &veh, Notification reason) throw ()
 Checks whether the reminder is activated by a vehicle entering the lane.
virtual bool notifyMove (SUMOVehicle &veh, SUMOReal oldPos, SUMOReal newPos, SUMOReal newSpeed) throw ()
 Checks whether the reminder still has to be notified about the vehicle moves.
virtual bool notifyLeave (SUMOVehicle &veh, SUMOReal lastPos, Notification reason) throw ()
 Called if the vehicle leaves the reminder's lane.

Protected Attributes

MSLane *const myLane
 Lane on which the reminder works.

Private Member Functions

MSMoveReminder & operator= (const MSMoveReminder &)

Detailed Description

Something on a lane to be noticed about vehicle movement.

Base class of all move-reminders. During move, the vehicles call notifyMove() for all reminders on their current lane (all lanes they pass during one step). If a vehicle enters the lane the reminder is positioned at during insertion or lanechange notifyEnter() is called. If a vehicle leaves the reminder lane it calls notifyLeave().

The reminder knows whom to tell about move, insertion and lanechange. The vehicles will remove the reminder that is not notifyMove() from their reminder container.

See also:
MSLane::addMoveReminder
MSLane::getMoveReminder

Definition at line 64 of file MSMoveReminder.h.


Member Enumeration Documentation

Definition of a vehicle state.

Enumerator:
NOTIFICATION_DEPARTED 

The vehicle has departed (was inserted into the network)

NOTIFICATION_JUNCTION 

The vehicle arrived at a junction.

NOTIFICATION_SEGMENT 

The vehicle changes the segment (meso only)

NOTIFICATION_LANE_CHANGE 

The vehicle changes lanes (micro only)

NOTIFICATION_TELEPORT 

The vehicle is being teleported.

NOTIFICATION_PARKING 

The vehicle starts or ends parking.

NOTIFICATION_ARRIVED 

The vehicle arrived at its destination (is deleted)

NOTIFICATION_VAPORIZED 

The vehicle got vaporized.

NOTIFICATION_TELEPORT_ARRIVED 

The vehicle was teleported out of the net.

Definition at line 89 of file MSMoveReminder.h.


Constructor & Destructor Documentation

MSMoveReminder::MSMoveReminder ( MSLane *const  lane = 0,
const bool  doAdd = true 
) throw ()

Constructor.

Parameters:
[in]laneLane on which the reminder will work.
[in]doAddwhether to add the reminder to the lane

Definition at line 38 of file MSMoveReminder.cpp.

virtual MSMoveReminder::~MSMoveReminder ( ) throw () [inline, virtual]

Destructor.

Definition at line 76 of file MSMoveReminder.h.


Member Function Documentation

const MSLane* MSMoveReminder::getLane ( ) const throw () [inline]

Returns the lane the reminder works on.

Returns:
The lane the reminder works on.

Definition at line 83 of file MSMoveReminder.h.

References myLane.

Referenced by GUIInstantInductLoop::buildDetectorGUIRepresentation(), GUIInductLoop::buildDetectorGUIRepresentation(), TraCIServerAPI_InductionLoop::processGet(), and MSMeanData::writeEdge().

virtual bool MSMoveReminder::notifyEnter ( SUMOVehicle &  veh,
Notification  reason 
) throw () [inline, virtual]

Checks whether the reminder is activated by a vehicle entering the lane.

Lane change means in this case that the vehicle changes to the lane the reminder is placed at.

Parameters:
[in]vehThe entering vehicle.
[in]reasonhow the vehicle enters the lane
Returns:
True if vehicle enters the reminder.
See also:
Notification

Reimplemented in MSDevice_Person, MSDevice_Routing, MSDevice_Tripinfo, MSDevice_Vehroutes, MSE2Collector, MSInductLoop, MSInstantInductLoop, MSMeanData::MeanDataValues, MSMeanData::MeanDataValueTracker, MSMeanData_Harmonoise::MSLaneMeanDataValues, MSMeanData_Net::MSLaneMeanDataValues, MSRouteProbe, and MSTriggeredRerouter.

Definition at line 124 of file MSMoveReminder.h.

References UNUSED_PARAMETER.

virtual bool MSMoveReminder::notifyLeave ( SUMOVehicle &  veh,
SUMOReal  lastPos,
Notification  reason 
) throw () [inline, virtual]

Called if the vehicle leaves the reminder's lane.

Informs if vehicle leaves reminder lane (due to lane change, removal from the network, or leaving to the next lane). The default is to do nothing.

Parameters:
[in]vehThe leaving vehicle.
[in]lastPosPosition on the lane when leaving.
[in]reasonhow the vehicle leaves the lane
See also:
Notification
Returns:
True if the reminder wants to receive further info.

Reimplemented in MSDevice_Person, MSDevice_Tripinfo, MSDevice_Vehroutes, MSE2Collector, MSE3Collector::MSE3EntryReminder, MSInductLoop, MSInstantInductLoop, MSMeanData::MeanDataValues, MSMeanData::MeanDataValueTracker, and MSMeanData_Net::MSLaneMeanDataValues.

Definition at line 169 of file MSMoveReminder.h.

References UNUSED_PARAMETER.

virtual bool MSMoveReminder::notifyMove ( SUMOVehicle &  veh,
SUMOReal  oldPos,
SUMOReal  newPos,
SUMOReal  newSpeed 
) throw () [inline, virtual]

Checks whether the reminder still has to be notified about the vehicle moves.

Indicator if the reminders is still active for the passed vehicle/parameters. If false, the vehicle will erase this reminder from it's reminder-container.

Parameters:
[in]vehVehicle that asks this reminder.
[in]oldPosPosition before move.
[in]newPosPosition after move with newSpeed.
[in]newSpeedMoving speed.
Returns:
True if vehicle hasn't passed the reminder completely.

Reimplemented in MSDevice_HBEFA, MSDevice_Person, MSDevice_Tripinfo, MSE2Collector, MSE3Collector::MSE3EntryReminder, MSE3Collector::MSE3LeaveReminder, MSInductLoop, MSInstantInductLoop, and MSMeanData::MeanDataValues.

Definition at line 144 of file MSMoveReminder.h.

References UNUSED_PARAMETER.

virtual void MSMoveReminder::notifyMoveInternal ( SUMOVehicle &  veh,
SUMOReal  timeOnLane,
SUMOReal  speed 
) throw () [inline, virtual]

Internal notification about the vehicle moves.

Indicator if the reminders is still active for the passed vehicle/parameters. If false, the vehicle will erase this reminder from it's reminder-container.

Parameters:
[in]vehVehicle that asks this reminder.
[in]timeOnLanetime the vehicle spent on the lane.
[in]speedMoving speed.

Reimplemented in MSMeanData::MeanDataValueTracker, MSMeanData_Harmonoise::MSLaneMeanDataValues, MSMeanData_HBEFA::MSLaneMeanDataValues, and MSMeanData_Net::MSLaneMeanDataValues.

Definition at line 196 of file MSMoveReminder.h.

References UNUSED_PARAMETER.

MSMoveReminder& MSMoveReminder::operator= ( const MSMoveReminder &  ) [private]

Field Documentation

MSLane* const MSMoveReminder::myLane [protected]

Lane on which the reminder works.

Definition at line 211 of file MSMoveReminder.h.

Referenced by getLane().


The documentation for this class was generated from the following files:
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Defines