Eclipse SUMO - Simulation of Urban MObility
|
A BT receiver. More...
#include <MSDevice_BTreceiver.h>
Data Structures | |
class | BTreceiverUpdate |
A global update performer. More... | |
class | MeetingPoint |
Holds the information about exact positions/speeds/time of the begin/end of a meeting. More... | |
class | SeenDevice |
Class representing a single seen device. More... | |
class | VehicleInformation |
Stores the information of a vehicle. More... | |
Public Member Functions | |
~MSDevice_BTreceiver () | |
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 (std::map< std::string, SeenDevice * > &c, std::map< std::string, std::vector< SeenDevice * > > &s) |
Clears the given containers deleting the stored items. | |
static double | getRange () |
Returns the configured range. | |
static SumoRNG * | getRecognitionRNG () |
static SumoRNG * | getRNG () |
static void | hasSendingPersons () |
Protected Member Functions | |
MSDevice_BTreceiver () | |
Constructor. | |
Static Protected Member Functions | |
static double | inquiryDelaySlots (const int backoffLimit) |
Static Protected Attributes | |
static bool | myHasPersons = true |
Whether the bt-system includes persons. | |
static double | myOffTime = -1. |
The offtime of the device. | |
static double | myRange = -1. |
The range of the device. | |
static bool | myWasInitialised = false |
Whether the bt-system was already initialised. | |
static SumoRNG | sRecognitionRNG |
A random number generator used to determine whether the opposite was recognized. | |
static std::map< std::string, VehicleInformation * > | sVehicles |
The list of arrived receivers. | |
Private Member Functions | |
MSDevice_BTreceiver (const MSDevice_BTreceiver &) | |
Invalidated copy constructor. | |
MSDevice_BTreceiver & | operator= (const MSDevice_BTreceiver &) |
Invalidated assignment operator. | |
MSDevice_BTreceiver::~MSDevice_BTreceiver | ( | ) |
Destructor.
Definition at line 396 of file MSDevice_BTreceiver.cpp.
|
inlineprotected |
Constructor.
[in] | holder | The vehicle that holds this device |
[in] | id | The ID of the device |
Definition at line 209 of file MSDevice_BTreceiver.h.
|
private |
Invalidated copy constructor.
|
static |
Clears the given containers deleting the stored items.
[in] | c | The currently seen container to clear |
[in] | s | The seen container to clear |
|
inlinestatic |
Returns the configured range.
Definition at line 53 of file MSDevice_BTreceiver.h.
References myRange.
Referenced by GUIBaseVehicle::drawOnPos().
|
inlinestatic |
Definition at line 195 of file MSDevice_BTreceiver.h.
References sRecognitionRNG.
Referenced by NLBuilder::initRandomness().
|
inlinestatic |
Definition at line 58 of file MSDevice_BTreceiver.h.
References sRecognitionRNG.
Referenced by MSStateHandler::saveRNGs().
|
inlinestatic |
Definition at line 199 of file MSDevice_BTreceiver.h.
References myHasPersons.
Referenced by MSTransportableDevice_BTsender::buildDevices().
|
staticprotected |
Definition at line 453 of file MSDevice_BTreceiver.cpp.
References RandHelper::rand(), and sRecognitionRNG.
Referenced by MSDevice_BTreceiver::BTreceiverUpdate::addRecognitionPoint().
bool MSDevice_BTreceiver::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 401 of file MSDevice_BTreceiver.cpp.
References SUMOTrafficObject::getEdge(), Named::getID(), MSDevice_BTsender::getLocation(), SUMOTrafficObject::getPosition(), SUMOTrafficObject::getPositionOnLane(), SUMOTrafficObject::getRoutePosition(), SUMOTrafficObject::getSpeed(), myRange, MSMoveReminder::NOTIFICATION_DEPARTED, MSMoveReminder::NOTIFICATION_JUNCTION, MSMoveReminder::NOTIFICATION_TELEPORT, and sVehicles.
Referenced by MSTransportableDevice_BTreceiver::notifyEnter(), and MSVehicleDevice_BTreceiver::notifyEnter().
bool MSDevice_BTreceiver::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 431 of file MSDevice_BTreceiver.cpp.
References Named::getID(), MSDevice_BTsender::getLocation(), SUMOTrafficObject::getPosition(), SUMOTrafficObject::getPositionOnLane(), SUMOTrafficObject::getRoutePosition(), SUMOTrafficObject::getSpeed(), MSMoveReminder::NOTIFICATION_ARRIVED, MSMoveReminder::NOTIFICATION_TELEPORT, sVehicles, TL, and WRITE_WARNINGF.
Referenced by MSTransportableDevice_BTreceiver::notifyLeave(), and MSVehicleDevice_BTreceiver::notifyLeave().
bool MSDevice_BTreceiver::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 419 of file MSDevice_BTreceiver.cpp.
References Named::getID(), MSDevice_BTsender::getLocation(), SUMOTrafficObject::getPosition(), SUMOTrafficObject::getRoutePosition(), sVehicles, TL, and WRITE_WARNINGF.
Referenced by MSDevice_BTreceiver::BTreceiverUpdate::execute(), MSVehicleDevice_BTreceiver::notifyMove(), and MSTransportableDevice_BTreceiver::notifyMove().
|
private |
Invalidated assignment operator.
|
staticprotected |
Whether the bt-system includes persons.
Definition at line 216 of file MSDevice_BTreceiver.h.
Referenced by MSTransportableDevice_BTreceiver::buildDevices(), MSDevice_BTreceiver::BTreceiverUpdate::execute(), hasSendingPersons(), and MSVehicleDevice_BTreceiver::insertOptions().
|
staticprotected |
The offtime of the device.
Definition at line 222 of file MSDevice_BTreceiver.h.
Referenced by MSDevice_BTreceiver::BTreceiverUpdate::addRecognitionPoint(), MSTransportableDevice_BTreceiver::buildDevices(), and MSVehicleDevice_BTreceiver::buildVehicleDevices().
|
staticprotected |
The range of the device.
Definition at line 219 of file MSDevice_BTreceiver.h.
Referenced by MSTransportableDevice_BTreceiver::buildDevices(), MSVehicleDevice_BTreceiver::buildVehicleDevices(), getRange(), and notifyEnter().
|
staticprotected |
Whether the bt-system was already initialised.
Definition at line 213 of file MSDevice_BTreceiver.h.
Referenced by MSTransportableDevice_BTreceiver::buildDevices(), MSVehicleDevice_BTreceiver::buildVehicleDevices(), and MSVehicleDevice_BTreceiver::insertOptions().
|
staticprotected |
A random number generator used to determine whether the opposite was recognized.
Definition at line 350 of file MSDevice_BTreceiver.h.
Referenced by MSTransportableDevice_BTreceiver::buildDevices(), MSVehicleDevice_BTreceiver::buildVehicleDevices(), getRecognitionRNG(), getRNG(), and inquiryDelaySlots().
|
staticprotected |
The list of arrived receivers.
Definition at line 353 of file MSDevice_BTreceiver.h.
Referenced by MSDevice_BTreceiver::BTreceiverUpdate::execute(), notifyEnter(), notifyLeave(), notifyMove(), and MSDevice_BTreceiver::BTreceiverUpdate::~BTreceiverUpdate().