SUMO - Simulation of Urban MObility
|
Something on a lane to be noticed about vehicle movement. More...
#include <MSMoveReminder.h>
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 std::string & | getDescription () const |
const MSLane * | getLane () const |
Returns the lane the reminder works on. More... | |
MSMoveReminder (const std::string &description, MSLane *const lane=0, const bool doAdd=true) | |
Constructor. More... | |
virtual void | notifyMoveInternal (SUMOVehicle &veh, SUMOReal timeOnLane, SUMOReal speed) |
Internal notification about the vehicle moves. More... | |
void | setDescription (const std::string &description) |
virtual | ~MSMoveReminder () |
Destructor. More... | |
Interface methods, to be derived by subclasses | |
virtual bool | notifyEnter (SUMOVehicle &veh, Notification reason) |
Checks whether the reminder is activated by a vehicle entering the lane. More... | |
virtual bool | notifyMove (SUMOVehicle &veh, SUMOReal oldPos, SUMOReal newPos, SUMOReal newSpeed) |
Checks whether the reminder still has to be notified about the vehicle moves. More... | |
virtual bool | notifyLeave (SUMOVehicle &veh, SUMOReal lastPos, Notification reason) |
Called if the vehicle leaves the reminder's lane. More... | |
Protected Attributes | |
std::string | myDescription |
a description of this moveReminder More... | |
MSLane *const | myLane |
Lane on which the reminder works. More... | |
Private Member Functions | |
MSMoveReminder & | operator= (const MSMoveReminder &) |
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.
Definition at line 69 of file MSMoveReminder.h.
Definition of a vehicle state.
Definition at line 94 of file MSMoveReminder.h.
MSMoveReminder::MSMoveReminder | ( | const std::string & | description, |
MSLane *const | lane = 0 , |
||
const bool | doAdd = true |
||
) |
Constructor.
[in] | lane | Lane on which the reminder will work. |
[in] | doAdd | whether to add the reminder to the lane |
Definition at line 39 of file MSMoveReminder.cpp.
References MSLane::addMoveReminder(), and myLane.
|
inlinevirtual |
Destructor.
Definition at line 81 of file MSMoveReminder.h.
|
inline |
Definition at line 213 of file MSMoveReminder.h.
References myDescription.
|
inline |
Returns the lane the reminder works on.
Definition at line 88 of file MSMoveReminder.h.
References myLane.
Referenced by MSE2Collector::detectorUpdate(), TraCIServerAPI_InductionLoop::getPosition(), TraCIServerAPI_InductionLoop::getTree(), GUIInstantInductLoop::MyWrapper::MyWrapper(), GUI_E2_ZS_Collector::MyWrapper::MyWrapper(), GUIInductLoop::MyWrapper::MyWrapper(), MSDevice_BTreceiver::notifyEnter(), MSDevice_Tripinfo::notifyEnter(), MSDevice_BTsender::notifyEnter(), MSDevice_Tripinfo::notifyLeave(), MSDevice_BTreceiver::notifyLeave(), MSDevice_BTsender::notifyLeave(), MSDevice_BTreceiver::notifyMove(), MSDevice_BTsender::notifyMove(), TraCIServerAPI_InductionLoop::processGet(), and MSMeanData::writeEdge().
|
inlinevirtual |
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.
[in] | veh | The entering vehicle. |
[in] | reason | how the vehicle enters the lane |
Reimplemented in MSMeanData::MeanDataValueTracker, MSE2Collector, MSDevice_Routing, MSMeanData_Net::MSLaneMeanDataValues, MSCalibrator::VehicleRemover, MSTriggeredRerouter, MSDevice_Example, MSMeanData_Harmonoise::MSLaneMeanDataValues, MSMeanData::MeanDataValues, MSDevice_Vehroutes, MSRouteProbe, MSDevice_BTsender, MSDevice_Person, MSDevice_Tripinfo, and MSDevice_BTreceiver.
Definition at line 129 of file MSMoveReminder.h.
References UNUSED_PARAMETER.
|
inlinevirtual |
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.
[in] | veh | The leaving vehicle. |
[in] | lastPos | Position on the lane when leaving. |
[in] | reason | how the vehicle leaves the lane |
Reimplemented in MSMeanData::MeanDataValueTracker, MSE3Collector::MSE3LeaveReminder, MSE2Collector, MSInductLoop, MSMeanData::MeanDataValues, MSDevice_BTsender, MSDevice_BTreceiver, MSDevice_Example, MSInstantInductLoop, MSDevice_Vehroutes, MSE3Collector::MSE3EntryReminder, MSDevice_Person, MSDevice_Tripinfo, and MSMeanData_Net::MSLaneMeanDataValues.
Definition at line 174 of file MSMoveReminder.h.
References UNUSED_PARAMETER.
|
inlinevirtual |
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.
[in] | veh | Vehicle that asks this reminder. |
[in] | oldPos | Position before move. |
[in] | newPos | Position after move with newSpeed. |
[in] | newSpeed | Moving speed. |
Reimplemented in MSE3Collector::MSE3LeaveReminder, MSE2Collector, MSInductLoop, MSMeanData::MeanDataValues, MSDevice_BTsender, MSDevice_BTreceiver, MSDevice_Emissions, MSE3Collector::MSE3EntryReminder, MSInstantInductLoop, MSDevice_Example, MSDevice_Person, and MSDevice_Tripinfo.
Definition at line 149 of file MSMoveReminder.h.
References UNUSED_PARAMETER.
|
inlinevirtual |
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.
[in] | veh | Vehicle that asks this reminder. |
[in] | timeOnLane | time the vehicle spent on the lane. |
[in] | speed | Moving speed. |
Reimplemented in MSMeanData::MeanDataValueTracker, MSMeanData_Net::MSLaneMeanDataValues, MSMeanData_Harmonoise::MSLaneMeanDataValues, and MSMeanData_Emissions::MSLaneMeanDataValues.
Definition at line 201 of file MSMoveReminder.h.
References UNUSED_PARAMETER.
|
private |
|
inline |
Definition at line 209 of file MSMoveReminder.h.
References myDescription.
Referenced by MSCalibrator::MSCalibrator().
|
protected |
a description of this moveReminder
Definition at line 222 of file MSMoveReminder.h.
Referenced by getDescription(), and setDescription().
|
protected |
Lane on which the reminder works.
Definition at line 220 of file MSMoveReminder.h.
Referenced by MSE2Collector::detectorUpdate(), getLane(), MSE2Collector::MSE2Collector(), and MSMoveReminder().