Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
MSDevice_BTreceiver Class Reference

A BT receiver. More...

#include <MSDevice_BTreceiver.h>

Inheritance diagram for MSDevice_BTreceiver:
[legend]
Collaboration diagram for MSDevice_BTreceiver:
[legend]

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 SumoRNGgetRecognitionRNG ()
 
static SumoRNGgetRNG ()
 
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_BTreceiveroperator= (const MSDevice_BTreceiver &)
 Invalidated assignment operator.
 

Detailed Description

A BT receiver.

See also
MSDevice

Definition at line 47 of file MSDevice_BTreceiver.h.

Constructor & Destructor Documentation

◆ ~MSDevice_BTreceiver()

MSDevice_BTreceiver::~MSDevice_BTreceiver ( )

Destructor.

Definition at line 396 of file MSDevice_BTreceiver.cpp.

◆ MSDevice_BTreceiver() [1/2]

MSDevice_BTreceiver::MSDevice_BTreceiver ( )
inlineprotected

Constructor.

Parameters
[in]holderThe vehicle that holds this device
[in]idThe ID of the device

Definition at line 209 of file MSDevice_BTreceiver.h.

◆ MSDevice_BTreceiver() [2/2]

MSDevice_BTreceiver::MSDevice_BTreceiver ( const MSDevice_BTreceiver )
private

Invalidated copy constructor.

Member Function Documentation

◆ cleanUp()

static void MSDevice_BTreceiver::cleanUp ( std::map< std::string, SeenDevice * > &  c,
std::map< std::string, std::vector< SeenDevice * > > &  s 
)
static

Clears the given containers deleting the stored items.

Parameters
[in]cThe currently seen container to clear
[in]sThe seen container to clear

◆ getRange()

static double MSDevice_BTreceiver::getRange ( )
inlinestatic

Returns the configured range.

Returns
the device range

Definition at line 53 of file MSDevice_BTreceiver.h.

References myRange.

Referenced by GUIBaseVehicle::drawOnPos().

Here is the caller graph for this function:

◆ getRecognitionRNG()

static SumoRNG * MSDevice_BTreceiver::getRecognitionRNG ( )
inlinestatic

Definition at line 195 of file MSDevice_BTreceiver.h.

References sRecognitionRNG.

Referenced by NLBuilder::initRandomness().

Here is the caller graph for this function:

◆ getRNG()

static SumoRNG * MSDevice_BTreceiver::getRNG ( )
inlinestatic

Definition at line 58 of file MSDevice_BTreceiver.h.

References sRecognitionRNG.

Referenced by MSStateHandler::saveRNGs().

Here is the caller graph for this function:

◆ hasSendingPersons()

static void MSDevice_BTreceiver::hasSendingPersons ( )
inlinestatic

Definition at line 199 of file MSDevice_BTreceiver.h.

References myHasPersons.

Referenced by MSTransportableDevice_BTsender::buildDevices().

Here is the caller graph for this function:

◆ inquiryDelaySlots()

double MSDevice_BTreceiver::inquiryDelaySlots ( const int  backoffLimit)
staticprotected

Definition at line 453 of file MSDevice_BTreceiver.cpp.

References RandHelper::rand(), and sRecognitionRNG.

Referenced by MSDevice_BTreceiver::BTreceiverUpdate::addRecognitionPoint().

Here is the caller graph for this function:

◆ notifyEnter()

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.

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

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

Here is the caller graph for this function:

◆ notifyLeave()

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.

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

Here is the caller graph for this function:

◆ notifyMove()

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.

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

Here is the caller graph for this function:

◆ operator=()

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

Invalidated assignment operator.

Field Documentation

◆ myHasPersons

bool MSDevice_BTreceiver::myHasPersons = true
staticprotected

◆ myOffTime

double MSDevice_BTreceiver::myOffTime = -1.
staticprotected

◆ myRange

double MSDevice_BTreceiver::myRange = -1.
staticprotected

◆ myWasInitialised

bool MSDevice_BTreceiver::myWasInitialised = false
staticprotected

◆ sRecognitionRNG

SumoRNG MSDevice_BTreceiver::sRecognitionRNG
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().

◆ sVehicles

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

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