Eclipse SUMO - Simulation of Urban MObility
|
A BT sender. More...
#include <MSDevice_BTsender.h>
Data Structures | |
class | VehicleInformation |
Stores the information of a vehicle. More... | |
class | VehicleState |
A single movement state of the vehicle. More... | |
Public Member Functions | |
~MSDevice_BTsender () | |
Destructor. | |
Methods inherited from MSMoveReminder. | |
bool | notifyEnter (SUMOTrafficObject &veh, MSMoveReminder::Notification reason, const MSLane *enteredLane=0) |
Adds the vehicle to running vehicles if it (re-) enters the network. | |
bool | notifyMove (SUMOTrafficObject &veh, double oldPos, double newPos, double newSpeed) |
Checks whether the reminder still has to be notified about the vehicle moves. | |
bool | notifyLeave (SUMOTrafficObject &veh, double lastPos, MSMoveReminder::Notification reason, const MSLane *enteredLane=0) |
Moves (the known) vehicle from running to arrived vehicles' list. | |
Static Public Member Functions | |
static void | cleanup () |
removes remaining vehicleInformation in sVehicles | |
static std::string | getLocation (const SUMOTrafficObject &o) |
return either lane or edge id (depending on availability) | |
Protected Member Functions | |
MSDevice_BTsender () | |
Constructor. | |
Static Protected Attributes | |
static std::map< std::string, VehicleInformation * > | sVehicles |
The list of arrived senders. | |
Private Member Functions | |
MSDevice_BTsender (const MSDevice_BTsender &) | |
Invalidated copy constructor. | |
MSDevice_BTsender & | operator= (const MSDevice_BTsender &) |
Invalidated assignment operator. | |
Friends | |
class | MSDevice_BTreceiver |
for accessing the maps of running/arrived vehicles | |
MSDevice_BTsender::~MSDevice_BTsender | ( | ) |
Destructor.
Definition at line 92 of file MSDevice_BTsender.cpp.
|
inlineprotected |
Constructor.
Definition at line 190 of file MSDevice_BTsender.h.
|
private |
Invalidated copy constructor.
|
static |
removes remaining vehicleInformation in sVehicles
Definition at line 79 of file MSDevice_BTsender.cpp.
References sVehicles.
Referenced by MSNet::clearAll().
|
static |
return either lane or edge id (depending on availability)
Definition at line 96 of file MSDevice_BTsender.cpp.
References SUMOTrafficObject::getEdge(), Named::getID(), and SUMOTrafficObject::getLane().
Referenced by MSDevice_BTreceiver::notifyEnter(), notifyEnter(), MSDevice_BTreceiver::notifyLeave(), notifyLeave(), MSDevice_BTreceiver::notifyMove(), and notifyMove().
bool MSDevice_BTsender::notifyEnter | ( | SUMOTrafficObject & | veh, |
MSMoveReminder::Notification | reason, | ||
const MSLane * | enteredLane = 0 |
||
) |
Adds the vehicle to running vehicles if it (re-) enters the network.
[in] | veh | The entering vehicle. |
[in] | reason | how the vehicle enters the lane |
Definition at line 101 of file MSDevice_BTsender.cpp.
References SUMOTrafficObject::getEdge(), Named::getID(), getLocation(), SUMOTrafficObject::getPosition(), SUMOTrafficObject::getPositionOnLane(), SUMOTrafficObject::getRoutePosition(), SUMOTrafficObject::getSpeed(), MSMoveReminder::NOTIFICATION_DEPARTED, MSMoveReminder::NOTIFICATION_JUNCTION, MSMoveReminder::NOTIFICATION_TELEPORT, and sVehicles.
Referenced by MSTransportableDevice_BTsender::notifyEnter(), and MSVehicleDevice_BTsender::notifyEnter().
bool MSDevice_BTsender::notifyLeave | ( | SUMOTrafficObject & | veh, |
double | lastPos, | ||
MSMoveReminder::Notification | reason, | ||
const MSLane * | enteredLane = 0 |
||
) |
Moves (the known) vehicle from running to arrived vehicles' list.
[in] | veh | The leaving vehicle. |
[in] | lastPos | Position on the lane when leaving. |
[in] | isArrival | whether the vehicle arrived at its destination |
[in] | isLaneChange | whether the vehicle changed from the lane |
Definition at line 129 of file MSDevice_BTsender.cpp.
References Named::getID(), getLocation(), SUMOTrafficObject::getPosition(), SUMOTrafficObject::getPositionOnLane(), SUMOTrafficObject::getRoutePosition(), SUMOTrafficObject::getSpeed(), MSMoveReminder::NOTIFICATION_ARRIVED, MSMoveReminder::NOTIFICATION_TELEPORT, sVehicles, TL, and WRITE_WARNINGF.
Referenced by MSTransportableDevice_BTsender::notifyLeave(), and MSVehicleDevice_BTsender::notifyLeave().
bool MSDevice_BTsender::notifyMove | ( | SUMOTrafficObject & | veh, |
double | oldPos, | ||
double | newPos, | ||
double | newSpeed | ||
) |
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 its 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. |
Definition at line 118 of file MSDevice_BTsender.cpp.
References Named::getID(), getLocation(), SUMOTrafficObject::getPosition(), SUMOTrafficObject::getRoutePosition(), sVehicles, TL, and WRITE_WARNINGF.
Referenced by MSDevice_BTreceiver::BTreceiverUpdate::execute(), MSVehicleDevice_BTsender::notifyMove(), and MSTransportableDevice_BTsender::notifyMove().
|
private |
Invalidated assignment operator.
|
friend |
for accessing the maps of running/arrived vehicles
Definition at line 60 of file MSDevice_BTsender.h.
|
staticprotected |
The list of arrived senders.
Definition at line 186 of file MSDevice_BTsender.h.
Referenced by cleanup(), MSDevice_BTreceiver::BTreceiverUpdate::execute(), notifyEnter(), notifyLeave(), notifyMove(), and MSDevice_BTreceiver::BTreceiverUpdate::~BTreceiverUpdate().