Eclipse SUMO - Simulation of Urban MObility
MSDevice_BTsender Class Reference

A BT sender. More...

#include <MSDevice_BTsender.h>

Inheritance diagram for MSDevice_BTsender:
[legend]

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. More...
 
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. More...
 
bool notifyMove (SUMOTrafficObject &veh, double oldPos, double newPos, double newSpeed)
 Checks whether the reminder still has to be notified about the vehicle moves. More...
 
bool notifyLeave (SUMOTrafficObject &veh, double lastPos, MSMoveReminder::Notification reason, const MSLane *enteredLane=0)
 Moves (the known) vehicle from running to arrived vehicles' list. More...
 

Static Public Member Functions

static void cleanup ()
 removes remaining vehicleInformation in sVehicles More...
 
static std::string getLocation (const SUMOTrafficObject &o)
 return either lane or edge id (depending on availability) More...
 

Protected Member Functions

 MSDevice_BTsender ()
 Constructor. More...
 

Static Protected Attributes

static std::map< std::string, VehicleInformation * > sVehicles
 The list of arrived senders. More...
 

Private Member Functions

 MSDevice_BTsender (const MSDevice_BTsender &)
 Invalidated copy constructor. More...
 
MSDevice_BTsenderoperator= (const MSDevice_BTsender &)
 Invalidated assignment operator. More...
 

Friends

class MSDevice_BTreceiver
 for accessing the maps of running/arrived vehicles More...
 

Detailed Description

A BT sender.

See also
MSDevice

Definition at line 49 of file MSDevice_BTsender.h.

Constructor & Destructor Documentation

◆ ~MSDevice_BTsender()

MSDevice_BTsender::~MSDevice_BTsender ( )

Destructor.

Definition at line 92 of file MSDevice_BTsender.cpp.

◆ MSDevice_BTsender() [1/2]

MSDevice_BTsender::MSDevice_BTsender ( )
inlineprotected

Constructor.

Definition at line 190 of file MSDevice_BTsender.h.

◆ MSDevice_BTsender() [2/2]

MSDevice_BTsender::MSDevice_BTsender ( const MSDevice_BTsender )
private

Invalidated copy constructor.

Member Function Documentation

◆ cleanup()

void MSDevice_BTsender::cleanup ( )
static

removes remaining vehicleInformation in sVehicles

Definition at line 79 of file MSDevice_BTsender.cpp.

References sVehicles.

Referenced by MSNet::clearAll().

Here is the caller graph for this function:

◆ getLocation()

std::string MSDevice_BTsender::getLocation ( const SUMOTrafficObject o)
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().

Here is the caller graph for this function:

◆ notifyEnter()

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.

Parameters
[in]vehThe entering vehicle.
[in]reasonhow the vehicle enters the lane
Returns
Always true
See also
MSMoveReminder::notifyEnter
MSMoveReminder::Notification

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().

Here is the caller graph for this function:

◆ notifyLeave()

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.

Parameters
[in]vehThe leaving vehicle.
[in]lastPosPosition on the lane when leaving.
[in]isArrivalwhether the vehicle arrived at its destination
[in]isLaneChangewhether the vehicle changed from the lane
See also
MSMoveReminder
MSMoveReminder::notifyLeave

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().

Here is the caller graph for this function:

◆ notifyMove()

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.

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.

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().

Here is the caller graph for this function:

◆ operator=()

MSDevice_BTsender& MSDevice_BTsender::operator= ( const MSDevice_BTsender )
private

Invalidated assignment operator.

Friends And Related Function Documentation

◆ MSDevice_BTreceiver

friend class MSDevice_BTreceiver
friend

for accessing the maps of running/arrived vehicles

Definition at line 60 of file MSDevice_BTsender.h.

Field Documentation

◆ sVehicles

std::map< std::string, MSDevice_BTsender::VehicleInformation * > MSDevice_BTsender::sVehicles
staticprotected

The documentation for this class was generated from the following files: