SUMO - Simulation of Urban MObility
MSDevice_BTreceiver Class Reference

A BT receiver. More...

#include <MSDevice_BTreceiver.h>

Inheritance diagram for MSDevice_BTreceiver:
Inheritance graph
Collaboration diagram for MSDevice_BTreceiver:
Collaboration graph

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 Types

enum  Notification {
  NOTIFICATION_DEPARTED, NOTIFICATION_JUNCTION, NOTIFICATION_SEGMENT, NOTIFICATION_LANE_CHANGE,
  NOTIFICATION_TELEPORT, NOTIFICATION_PARKING, NOTIFICATION_ARRIVED, NOTIFICATION_VAPORIZED,
  NOTIFICATION_TELEPORT_ARRIVED, NOTIFICATION_PARKING_REROUTE
}
 Definition of a vehicle state. More...
 

Public Member Functions

void addTo (const StoringVisitor &cont) const
 Adds this object to the given container. More...
 
const std::string deviceName () const
 return the name for this type of device More...
 
virtual void generateOutput () const
 Called on writing tripinfo output. More...
 
const std::string & getDescription () const
 
SUMOVehiclegetHolder () const
 Returns the vehicle that holds this device. More...
 
const std::string & getID () const
 Returns the id. More...
 
const MSLanegetLane () const
 Returns the lane the reminder works on. More...
 
virtual std::string getParameter (const std::string &key) const
 try to retrieve the given parameter from this device. Throw exception for unsupported key More...
 
virtual void loadState (const SUMOSAXAttributes &attrs)
 Loads the state of the device from the given description. More...
 
virtual void notifyMoveInternal (const SUMOVehicle &veh, const double frontOnLane, const double timeOnLane, const double meanSpeedFrontOnLane, const double meanSpeedVehicleOnLane, const double travelledDistanceFrontOnLane, const double travelledDistanceVehicleOnLane, const double meanLengthOnLane)
 Internal notification about the vehicle moves. More...
 
virtual void saveState (OutputDevice &out) const
 Saves the state of the device. More...
 
void setDescription (const std::string &description)
 
void setID (const std::string &newID)
 resets the id More...
 
virtual void setParameter (const std::string &key, const std::string &value)
 try to set the given parameter for this device. Throw exception for unsupported key More...
 
 ~MSDevice_BTreceiver ()
 Destructor. More...
 
Methods inherited from MSMoveReminder.
bool notifyEnter (SUMOVehicle &veh, Notification reason, const MSLane *enteredLane=0)
 Adds the vehicle to running vehicles if it (re-) enters the network. More...
 
bool notifyMove (SUMOVehicle &veh, double oldPos, double newPos, double newSpeed)
 Checks whether the reminder still has to be notified about the vehicle moves. More...
 
bool notifyLeave (SUMOVehicle &veh, double lastPos, Notification reason, const MSLane *enteredLane=0)
 Moves (the known) vehicle from running to arrived vehicles' list. More...
 
Interface methods, to be derived by subclasses
void updateDetector (SUMOVehicle &veh, double entryPos, double leavePos, SUMOTime entryTime, SUMOTime currentTime, SUMOTime leaveTime, bool cleanUp)
 

Static Public Member Functions

static void buildVehicleDevices (SUMOVehicle &v, std::vector< MSDevice *> &into)
 Build devices for the given vehicle, if needed. More...
 
static bool checkOptions (OptionsCont &oc)
 check device-specific options More...
 
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. More...
 
static void cleanupAll ()
 perform cleanup for all devices More...
 
static std::mt19937 * getEquipmentRNG ()
 
template<class T >
static std::string getIDSecure (const T *obj, const std::string &fallBack="NULL")
 get an identifier for Named-like object which may be Null More...
 
static double getRange ()
 Returns the configured range. More...
 
static void insertOptions (OptionsCont &oc)
 Inserts MSDevice_BTreceiver-options. More...
 

Protected Member Functions

 MSDevice_BTreceiver (SUMOVehicle &holder, const std::string &id)
 Constructor. More...
 
void removeFromVehicleUpdateValues (SUMOVehicle &veh)
 

Static Protected Member Functions

Helper methods for device assignment
static void insertDefaultAssignmentOptions (const std::string &deviceName, const std::string &optionsTopic, OptionsCont &oc)
 Adds common command options that allow to assign devices to vehicles. More...
 
static bool equippedByDefaultAssignmentOptions (const OptionsCont &oc, const std::string &deviceName, SUMOVehicle &v)
 Determines whether a vehicle should get a certain device. More...
 

Protected Attributes

std::string myDescription
 a description of this moveReminder More...
 
SUMOVehiclemyHolder
 The vehicle that stores the device. More...
 
std::string myID
 The name of the object. More...
 
MSLane *const myLane
 Lane on which the reminder works. More...
 

Private Member Functions

 MSDevice_BTreceiver (const MSDevice_BTreceiver &)
 Invalidated copy constructor. More...
 
MSDevice_BTreceiveroperator= (const MSDevice_BTreceiver &)
 Invalidated assignment operator. More...
 

Static Private Member Functions

static double inquiryDelaySlots (const int backoffLimit)
 

Static Private Attributes

static double myOffTime = -1.
 The offtime of the device. More...
 
static double myRange = -1.
 The range of the device. More...
 
static bool myWasInitialised = false
 Whether the bt-system was already initialised. More...
 
static std::mt19937 sRecognitionRNG
 A random number generator used to determine whether the opposite was recognized. More...
 
static std::map< std::string, VehicleInformation * > sVehicles
 The list of arrived receivers. More...
 

Detailed Description

A BT receiver.

See also
MSDevice

Definition at line 56 of file MSDevice_BTreceiver.h.

Member Enumeration Documentation

◆ Notification

Definition of a vehicle state.

Enumerator
NOTIFICATION_DEPARTED 

The vehicle has departed (was inserted into the network)

NOTIFICATION_JUNCTION 

The vehicle arrived at a junction.

NOTIFICATION_SEGMENT 

The vehicle changes the segment (meso only)

NOTIFICATION_LANE_CHANGE 

The vehicle changes lanes (micro only)

NOTIFICATION_TELEPORT 

The vehicle is being teleported.

NOTIFICATION_PARKING 

The vehicle starts or ends parking.

NOTIFICATION_ARRIVED 

The vehicle arrived at its destination (is deleted)

NOTIFICATION_VAPORIZED 

The vehicle got vaporized.

NOTIFICATION_TELEPORT_ARRIVED 

The vehicle was teleported out of the net.

NOTIFICATION_PARKING_REROUTE 

The vehicle needs another parking area.

Definition at line 95 of file MSMoveReminder.h.

Constructor & Destructor Documentation

◆ ~MSDevice_BTreceiver()

MSDevice_BTreceiver::~MSDevice_BTreceiver ( )

Destructor.

Definition at line 387 of file MSDevice_BTreceiver.cpp.

Referenced by getRange().

◆ MSDevice_BTreceiver() [1/2]

MSDevice_BTreceiver::MSDevice_BTreceiver ( SUMOVehicle holder,
const std::string &  id 
)
protected

Constructor.

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

Definition at line 382 of file MSDevice_BTreceiver.cpp.

Referenced by buildVehicleDevices().

◆ MSDevice_BTreceiver() [2/2]

MSDevice_BTreceiver::MSDevice_BTreceiver ( const MSDevice_BTreceiver )
private

Invalidated copy constructor.

Member Function Documentation

◆ addTo()

void Named::addTo ( const StoringVisitor cont) const
inlineinherited

Adds this object to the given container.

Parameters

Definition at line 128 of file Named.h.

References Named::StoringVisitor::add().

◆ buildVehicleDevices()

void MSDevice_BTreceiver::buildVehicleDevices ( SUMOVehicle v,
std::vector< MSDevice *> &  into 
)
static

Build devices for the given vehicle, if needed.

The options are read and evaluated whether a bt-receiver-device shall be built for the given vehicle.

The built device is stored in the given vector.

Parameters
[in]vThe vehicle for which a device may be built

Definition at line 81 of file MSDevice_BTreceiver.cpp.

References MSDevice::equippedByDefaultAssignmentOptions(), OptionsCont::getFloat(), SUMOVehicle::getID(), OptionsCont::getInt(), OptionsCont::getOptions(), MSDevice_BTreceiver(), myOffTime, myRange, myWasInitialised, and sRecognitionRNG.

Referenced by MSDevice::buildVehicleDevices().

◆ checkOptions()

bool MSDevice::checkOptions ( OptionsCont oc)
staticinherited

check device-specific options

Parameters

Definition at line 73 of file MSDevice.cpp.

References MSDevice_Routing::checkOptions().

Referenced by MSFrame::checkOptions().

◆ 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

◆ cleanupAll()

void MSDevice::cleanupAll ( )
staticinherited

perform cleanup for all devices

Definition at line 95 of file MSDevice.cpp.

References MSDevice_Tripinfo::cleanup(), and MSDevice_Routing::cleanup().

Referenced by MSNet::clearAll(), and MSDevice::getEquipmentRNG().

◆ deviceName()

const std::string MSDevice_BTreceiver::deviceName ( ) const
inlinevirtual

return the name for this type of device

Implements MSDevice.

Definition at line 136 of file MSDevice_BTreceiver.h.

◆ equippedByDefaultAssignmentOptions()

◆ generateOutput()

virtual void MSDevice::generateOutput ( ) const
inlinevirtualinherited

Called on writing tripinfo output.

The device may write some statistics into the tripinfo output. It is assumed that the written information is a valid xml-snipplet, which will be embedded within the vehicle's information.

The device should use the openTag / closeTag methods of the OutputDevice for correct indentation.

Exceptions
IOErrornot yet implemented

Reimplemented in MSDevice_SSM, MSDevice_Tripinfo, MSDevice_Bluelight, MSDevice_Example, MSDevice_Vehroutes, and MSDevice_Emissions.

Definition at line 135 of file MSDevice.h.

References MSDevice::loadState(), and MSDevice::saveState().

◆ getDescription()

◆ getEquipmentRNG()

static std::mt19937* MSDevice::getEquipmentRNG ( )
inlinestaticinherited

◆ getHolder()

SUMOVehicle& MSDevice::getHolder ( ) const
inlineinherited

Returns the vehicle that holds this device.

Returns
The vehicle that holds this device

Definition at line 119 of file MSDevice.h.

References MSDevice::myHolder.

Referenced by MSChargingStation::addChargeValueForOutput().

◆ getID()

const std::string& Named::getID ( ) const
inlineinherited

Returns the id.

Returns
The stored id

Definition at line 65 of file Named.h.

References Named::myID.

Referenced by NIImporter_SUMO::_loadNetwork(), MSLCM_LC2013::adaptSpeedToPedestrians(), MSVehicle::adaptToLeader(), MSVehicle::adaptToLeaders(), LaneStoringVisitor::add(), MSPModel_Striping::add(), MSVehicleTransfer::add(), PCPolyContainer::add(), MSDetectorControl::add(), Named::StoringVisitor::add(), ShapeContainer::add(), IntermodalRouter< E, L, N, V >::addAccess(), NLTriggerBuilder::addAccess(), RORouteDef::addAlternative(), MSLane::addApproachingLane(), NBLoadedSUMOTLDef::addConnection(), NLHandler::addConnection(), NIXMLConnectionsHandler::addCrossing(), MSPModel_Striping::addCrossingVehs(), RODFDetectorCon::addDetector(), RONet::addEdge(), NBParkingCont::addEdges2Keep(), ROJTREdge::addFollowerProbability(), MSTLLogicControl::TLSLogicVariants::addLogic(), RONet::addNode(), NIImporter_SUMO::addPhase(), GUIEdge::addRerouter(), NBEdge::addRestrictedLane(), RONet::addRouteDef(), NBDistrict::addSink(), NBDistrict::addSource(), NIXMLEdgesHandler::addSplit(), NBTrafficLightLogic::addStep(), ROVehicle::addStop(), MSRouteHandler::addStop(), MSVehicle::addStop(), MSNet::addStoppingPlace(), NBEdge::addStraightConnections(), NIXMLTrafficLightsHandler::addTlConnection(), NIVissimDisturbance::addToNode(), MSVehicle::addTraciStop(), MSVehicle::addTraciStopAtStoppingPlace(), AGActivityTripWriter::addTrip(), NIXMLConnectionsHandler::addWalkingArea(), NBEdge::append(), NBPTStopCont::assignAndCreatNewPTStopAsNeeded(), NBPTStopCont::assignPTStopToEdgeOfClosestPlatform(), GUITrafficLightLogicWrapper::begin2TrackPhases(), MSTransportable::Stage_Waiting::beginEventOutput(), MSTransportable::Stage_Driving::beginEventOutput(), MSPModel_Striping::blockedAtDist(), MSLink::blockedAtTime(), MSLink::blockedByFoe(), NLEdgeControlBuilder::build(), NIVisumTL::build(), RODFNet::buildApproachList(), MSSOTLE2Sensors::buildContinueSensior(), MSSOTLE2Sensors::buildCountSensorForLane(), MSSOTLE2Sensors::buildCountSensorForOutLane(), NBNode::buildCrossings(), NBNode::buildCrossingsAndWalkingAreas(), NIImporter_VISUM::buildDistrictNode(), NLDetectorBuilder::buildE2Detector(), NIVissimConnection::buildEdgeConnections(), RODFNet::buildEdgeFlowMap(), GNETLSEditorFrame::buildIinternalLanes(), NBEdge::buildInnerEdges(), NGEdge::buildNBEdge(), NIVissimEdge::buildNBEdge(), NBRampsComputer::buildOffRamp(), NBRampsComputer::buildOnRamp(), MELoop::buildSegmentsFor(), MSSOTLE2Sensors::buildSensorForLane(), MSSOTLE2Sensors::buildSensorForOutLane(), NBNode::buildWalkingAreas(), MSBaseVehicle::calculateArrivalParams(), MSSwarmTrafficLightLogic::calculateEtaDiff(), MSSwarmTrafficLightLogic::calculateEtaRatio(), MSSOTLPolicyBasedTrafficLightLogic::canRelease(), MSLaneChanger::changeOpposite(), MELoop::changeSegment(), MSSimpleTrafficLightLogic::changeStepAndDuration(), MSEdge::checkAndRegisterBiDirEdge(), MSLane::checkForPedestrians(), NBEdge::checkGeometry(), NBEdgeCont::checkGrade(), MSVehicleTransfer::checkInsertions(), MSVehicle::checkLinkLeader(), NBEdgeCont::checkOverlap(), MSDevice_Battery::checkParam(), MSE2Collector::checkPositioning(), MSVehicle::checkRewindLinkLanes(), MSSwarmTrafficLightLogic::choosePolicy(), MSDevice_SSM::classifyEncounter(), NBTrafficLightLogic::closeBuilding(), ODDistrictHandler::closeDistrict(), NLHandler::closeEdge(), RORouteHandler::closeRouteDistribution(), RORouteHandler::closeVehicle(), NBTrafficLightDefinition::collectAllLinks(), NBLoadedSUMOTLDef::collectEdges(), NBTrafficLightDefinition::collectEdges(), NBLoadedSUMOTLDef::collectEdgeVectors(), NBLoadedTLDef::collectLinks(), ROJTRRouter::compute(), NBTrafficLightDefinition::compute(), NBEdge::computeAngle(), NBEdge::computeLaneShapes(), NBNode::computeLogic(), NBOwnTLDef::computeLogicAndConts(), NBNode::computeNodeShape(), NBNodeShapeComputer::computeNodeShapeDefault(), NBNodeShapeComputer::computeNodeShapeSmall(), RODFNet::computeRoutesFor(), NBTrafficLightLogicCont::computeSingleLogic(), NBNode::computeSmoothShape(), NBTurningDirectionsComputer::computeTurnDirectionsForNode(), NGNet::connect(), MSSOTLWaveTrafficLightLogic::countVehicles(), MSSOTLE2Sensors::countVehicles(), MSDevice_SSM::createEncounters(), GUINet::createTLWrapper(), MSDeterministicHiLevelTrafficLightLogic::decideNextPhase(), MSSOTLPolicyBasedTrafficLightLogic::decideNextPhase(), MSSwarmTrafficLightLogic::decideNextPhase(), MSDeterministicHiLevelTrafficLightLogic::decidePolicy(), MSSwarmTrafficLightLogic::decidePolicy(), MSLane::detectCollisionBetween(), MSLane::detectCollisions(), MSLane::detectPedestrianJunctionCollision(), NIVissimDistrictConnection::dict_BuildDistricts(), NBEdge::divideOnEdges(), NBEdge::divideSelectedLanesOnEdges(), MSTransportable::Stage_Waiting::endEventOutput(), MSTransportable::Stage_Driving::endEventOutput(), MSE3Collector::enter(), MSVehicle::enterLaneAtMove(), METriggeredCalibrator::execute(), MSCalibrator::execute(), Command_SaveTLSState::execute(), Command_SaveTLSSwitchStates::execute(), Command_SaveTLSSwitches::execute(), MSVTypeProbe::execute(), MSPModel_Striping::MovePedestrians::execute(), MSTrafficLightLogic::SwitchCommand::execute(), MSVehicle::executeMove(), MSLane::executeMovements(), NBNodeCont::extract(), NBTrafficLightLogicCont::extract(), NBEdgeCont::extract(), libsumo::Helper::findCloserLane(), MSDevice_SSM::findFoeConflictLane(), libsumo::Simulation::findIntermodalRoute(), MSDevice_SSM::findSurroundingVehicles(), MSDevice_SSM::flushConflicts(), NBTrafficLightDefinition::forbids(), NBRampsComputer::fulfillsRampConstraints(), RODFDetectorCon::getAggFlowFor(), RODFDetectorCon::getAnyDetectorForEdge(), MSPModel_Striping::getArbitraryPath(), GNEConnection::getAttribute(), MSVehicle::getBackPosition(), MSVehicle::getBackPositionOnLane(), libsumo::Vehicle::getBestLanes(), NBOwnTLDef::getBestPair(), MSVehicle::getCenterOnEdge(), MSDevice_Battery::getChargingStationID(), NBEdge::getConnection(), NBEdge::getConnectionRef(), libsumo::TrafficLight::getControlledLinks(), NBEdge::getCrossingAngle(), RODFNet::getDetectorEdge(), libsumo::Lane::getEdgeID(), MSMeanData::getEdgeID(), NBEdge::getFirstNonPedestrianLane(), MSLane::getFollower(), MSLane::getFollowersOnConsecutive(), libsumo::InductionLoop::getLaneID(), libsumo::LaneArea::getLaneID(), libsumo::Vehicle::getLaneID(), MSLane::getLastVehicleInformation(), MSVehicle::getLatOffset(), MSLane::getLeader(), MSLink::getLeaderInfo(), MSLane::getLeaderOnConsecutive(), MSLane::getLeadersOnConsecutive(), MSLink::getLengthBeforeCrossing(), libsumo::Lane::getLinks(), MSLane::getLinkTo(), MSTLLogicControl::TLSLogicVariants::getLogicInstantiatingOff(), MSDeterministicHiLevelTrafficLightLogic::getMeanSpeedForInputLanes(), MSDeterministicHiLevelTrafficLightLogic::getMeanSpeedForOutputLanes(), NIImporter_VISUM::getNamedEdgeContinuating(), MSPerson::getNextEdge(), MSPModel_Striping::getNextLane(), MSLane::getOppositeFollower(), MSLane::getOppositeLeader(), MSLane::getOppositePos(), GUITrafficLightLogicWrapper::getParameterWindow(), GUIInstantInductLoop::MyWrapper::getParameterWindow(), GUIMEInductLoop::MyWrapper::getParameterWindow(), GUIVehicle::getParameterWindow(), GUIE2Collector::MyWrapper::getParameterWindow(), GUIInductLoop::MyWrapper::getParameterWindow(), MSLane::getPartialBehind(), MSSOTLTrafficLightLogic::getPhaseIndexWithMaxCTS(), MSSwarmTrafficLightLogic::getPheromoneForInputLanes(), MSSwarmTrafficLightLogic::getPheromoneForOutputLanes(), GUITrafficLightLogicWrapper::getPopUpMenu(), NLTriggerBuilder::getPosition(), NLDetectorBuilder::getPositionChecking(), NBNode::getPossiblySplittedIncoming(), NBNode::getPossiblySplittedOutgoing(), NIImporter_VISUM::getReversedContinuating(), NBPTStopCont::getReverseStop(), libsumo::Person::getRoadID(), libsumo::Vehicle::getRoadID(), libsumo::Vehicle::getRouteID(), MSNet::getStoppingPlaceID(), MSDevice_SSM::getUpstreamVehicles(), MSDevice_SSM::getVehiclesOnJunction(), MSTransportable::Stage_Driving::getWaitingDescription(), MSVehicleControl::getWaitingVehicle(), MSLink::getZipperSpeed(), NBNode::guessCrossings(), RODFDetectorCon::guessEmptyFlows(), NBEdgeCont::guessSidewalks(), NBNodeCont::guessTLs(), GUITLLogicPhasesTrackerWindow::GUITLLogicPhasesTrackerWindow(), MSLane::handleCollisionBetween(), NBEdgeCont::ignoreFilterMatch(), MSVehicle::ignoreRed(), MSDeterministicHiLevelTrafficLightLogic::init(), MSRailSignal::init(), MSDelayBasedTrafficLightLogic::init(), MSActuatedTrafficLightLogic::init(), MSTrafficLightLogic::init(), MSSOTLTrafficLightLogic::init(), MSSwarmTrafficLightLogic::init(), NBEdge::init(), MSE2Collector::initAuxiliaries(), NIImporter_SUMO::initTrafficLightLogic(), NIXMLTrafficLightsHandler::initTrafficLightLogic(), NBDistrictCont::insert(), NBNodeCont::insert(), NBTrafficLightLogicCont::insert(), NBEdgeCont::insert(), MSEdge::insertVehicle(), MSLane::integrateNewVehicle(), IntermodalNetwork< E, L, N, V >::IntermodalNetwork(), GNEJunction::invalidateTLS(), NBNode::invalidateTLS(), MSTLLogicControl::isActive(), MSPedestrianPushButton::isActiveForEdge(), MSPedestrianPushButton::isActiveOnAnySideOfTheRoad(), RODFNet::isDestination(), RODFNet::isFalseSource(), MSLane::isInsertionSuccess(), RODFNet::isSource(), MSSOTLTrafficLightLogic::isThresholdPassed(), NBNodeCont::joinJunctions(), NBEdgeCont::joinSameNodeConnectingEdges(), MSAbstractLaneChangeModel::laneChangeOutput(), MSE3Collector::leave(), MSE3Collector::leaveFront(), MSDevice_BTreceiver::BTreceiverUpdate::leaveRange(), MSPedestrianPushButton::loadCrossingEdgeMap(), NIImporter_OpenDrive::loadNetwork(), MSPedestrianPushButton::loadPushButtons(), NBEdge::MainDirections::MainDirections(), ODDistrictCont::makeDistricts(), MSE2Collector::makeVehicleInfo(), GNEJunction::markAsModified(), MSSOTLE2Sensors::meanVehiclesSpeed(), METriggeredCalibrator::METriggeredCalibrator(), MSPModel_Striping::moveInDirection(), MSPModel_Striping::moveInDirectionOnLane(), NBRampsComputer::moveRampRight(), MSPModel_Striping::PState::moveToNextLane(), libsumo::Person::moveToXY(), libsumo::Vehicle::moveToXY(), libsumo::Helper::moveToXYMap(), MSCalibrator::MSCalibrator(), MSChargingStation::MSChargingStation(), MSDevice_Battery::MSDevice_Battery(), MSE2Collector::MSE2Collector(), NBLoadedTLDef::myCompute(), NIXMLEdgesHandler::myEndElement(), NIImporter_SUMO::myEndElement(), NIXMLConnectionsHandler::myStartElement(), MSCalibrator::myStartElement(), MSLaneSpeedTrigger::myStartElement(), MSTriggeredRerouter::myStartElement(), NBConnection::NBConnection(), NBRequest::NBRequest(), MSPModel_Striping::nextBlocking(), notifyEnter(), MSDevice_BTsender::notifyEnter(), MSMeanData::MeanDataValues::notifyEnter(), MSDevice_Bluelight::notifyEnter(), MSDevice_Example::notifyEnter(), MSMeanData_Net::MSLaneMeanDataValues::notifyEnter(), MSDevice_Tripinfo::notifyEnter(), MSTriggeredRerouter::notifyEnter(), MSMeanData::MeanDataValueTracker::notifyEnter(), MSE2Collector::notifyEnter(), MSDevice_SSM::notifyEnter(), MSDevice_Transportable::notifyLeave(), MSE3Collector::MSE3EntryReminder::notifyLeave(), MSDevice_Bluelight::notifyLeave(), MSDevice_Example::notifyLeave(), notifyLeave(), MSDevice_BTsender::notifyLeave(), MSDevice_Tripinfo::notifyLeave(), MSE3Collector::MSE3LeaveReminder::notifyLeave(), MSE2Collector::notifyLeave(), MSDevice_SSM::notifyLeave(), MSDevice_Example::notifyMove(), MSMeanData::MeanDataValues::notifyMove(), notifyMove(), MSDevice_BTsender::notifyMove(), MSE2Collector::notifyMove(), MSDevice_SSM::notifyMove(), MSMeanData_Net::MSLaneMeanDataValues::notifyMoveInternal(), GUIViewTraffic::onGamingClick(), GNEViewNet::onLeftBtnPress(), MSLink::opened(), RORouteHandler::openRoute(), Named::ComparatorIdLess::operator()(), NBTurningDirectionsComputer::combination_by_angle_sorter::operator()(), RODFNet::idComp::operator()(), NBNetBuilder::by_id_sorter::operator()(), NBOwnTLDef::edge_by_incoming_priority_sorter::operator()(), NBContHelper::same_connection_edge_sorter::operator()(), NBContHelper::edge_by_angle_to_nodeShapeCentroid_sorter::operator()(), NBNode::nodes_by_id_sorter::operator()(), MSEdge::by_id_sorter::operator()(), MSLane::incoming_lane_priority_sorter::operator()(), MSLane::outgoing_lane_priority_sorter::operator()(), NIImporter_VISUM::parse_EdgePolys(), NIImporter_VISUM::parse_Lanes(), NIImporter_VISUM::parse_LanesConnections(), NIImporter_VISUM::parse_Turns(), NIImporter_VISUM::parse_TurnsToSignalGroups(), NLTriggerBuilder::parseAndBuildCalibrator(), NIXMLConnectionsHandler::parseDeprecatedLaneDefinition(), NIXMLConnectionsHandler::parseLaneBound(), MSRouteHandler::parseWalkPositions(), NBLoadedSUMOTLDef::patchIfCrossingsAdded(), MSLCM_LC2013::patchSpeed(), MSLCM_SL2015::patchSpeed(), NBLoadedTLDef::SignalGroup::patchTYellow(), MSVehicle::planMove(), MSVehicle::planMoveInternal(), MSLane::planMovements(), MSInternalJunction::postloadInit(), MSRightOfWayJunction::postloadInit(), NBEdge::prepareEdgePriorities(), AGStreet::print(), MSDevice_SSM::processEncounters(), MSVehicle::processLinkAproaches(), MSVehicle::processNextStop(), TraCIServerAPI_Vehicle::processSet(), NIXMLNodesHandler::processTrafficLightDefinitions(), NWWriter_SUMO::prohibitionConnection(), MSDelayBasedTrafficLightLogic::proposeProlongation(), MSPModel_Striping::PState::PState(), NBEdgeCont::recheckLanes(), NBEdge::recheckLanes(), NBEdgeCont::recheckPostProcessConnections(), NIImporter_OpenStreetMap::reconstructLayerElevation(), NBLoadedSUMOTLDef::reconstructLogic(), NBNodeCont::remapIDs(), NBEdgeCont::remapIDs(), NBLoadedTLDef::SignalGroup::remapIncoming(), NBLoadedTLDef::SignalGroup::remapOutgoing(), MSLink::removeApproaching(), NBNodeCont::removeIsolatedRoads(), MSVehicle::removePassedDriveItems(), MSCalibrator::removePending(), NBNode::removeSelfLoops(), NBEdgeCont::removeUnwishedEdges(), NBNodeCont::rename(), NBEdgeCont::rename(), GNENet::renameEdge(), GNENet::renameJunction(), RORouteDef::repairCurrentRoute(), NBConnection::replaceFrom(), MSVehicle::replaceParkingArea(), MSBaseVehicle::replaceRouteEdges(), NBConnection::replaceTo(), NIImporter_DlrNavteq::TrafficlightsHandler::report(), NIImporter_DlrNavteq::ConnectedLanesHandler::report(), MSBaseVehicle::reroute(), MSTriggeredRerouter::rerouteParkingArea(), MSLane::resetManeuverReservation(), MSLane::resetPartialOccupation(), NBEdge::restoreRestrictedLane(), GNEEdge::retrieveGNEConnection(), NIXMLTrafficLightsHandler::retrieveLaneIndex(), RODFNet::revalidateFlows(), NBPTLineCont::reviseStops(), MSPerson::MSPersonStage_Walking::routeOutput(), MSPerson::MSPersonStage_Driving::routeOutput(), RONet::saveAndRemoveRoutesUntil(), MSDevice::saveState(), MSDevice_Vehroutes::saveState(), MSDevice_Tripinfo::saveState(), MSBaseVehicle::saveState(), MSLane::saveState(), GUIVehicle::selectBlockingFoes(), MSE2Collector::selectLanes(), MSLink::setApproaching(), NBNodeCont::setAsTLControlled(), GNEEdge::setAttribute(), MSChargingStation::setChargeDelay(), MSChargingStation::setChargingPower(), NBEdge::setControllingTLInformation(), MSChargingStation::setEfficency(), GNEJunction::setLogicValid(), MSLane::setManeuverReservation(), MSDevice_Battery::setMaximumBatteryCapacity(), NBEdge::setNodeBorder(), NIXMLEdgesHandler::setNodes(), MSLane::setPartialOccupation(), MSDevice_Battery::setPowerMax(), MSLink::setRequestInformation(), MSTLLogicControl::TLSLogicVariants::setStateInstantiatingOnline(), MSDevice_Battery::setStoppingTreshold(), NBLoadedSUMOTLDef::setTLControllingInformation(), NBOwnTLDef::setTLControllingInformation(), NBTrafficLightLogicCont::setTLControllingInformation(), NBLoadedTLDef::setTLControllingInformation(), NBEdge::shiftPositionAtNode(), NBEdgeCont::splitAt(), IntermodalRouter< E, L, N, V >::splitEdge(), MSLaneChangerSublane::startChangeSublane(), MSStopOut::stopEnded(), MSLane::succLinkSec(), GUITrafficLightLogicWrapper::switchTLSLogic(), MELoop::teleportVehicle(), METriggeredCalibrator::tryEmit(), MSSOTLTrafficLightLogic::trySwitch(), MSDevice_SSM::update(), MSVehicle::updateBestLanes(), MSLCM_SL2015::updateCFRelated(), MSSOTLTrafficLightLogic::updateCTS(), GNETLSEditorFrame::updateDescription(), MSVehicle::updateDriveItems(), MSSwarmTrafficLightLogic::updatePheromoneLevels(), MSSwarmTrafficLightLogic::updateSensitivities(), MSAbstractLaneChangeModel::updateTargetLane(), MSDevice_BTreceiver::BTreceiverUpdate::updateVisibility(), MSPModel_Striping::PState::walk(), MSLCM_LC2013::wantsChange(), MSLCM_SL2015::wantsChange(), MSLCM_SL2015::wantsChangeSublane(), NBParking::write(), MSEmissionExport::write(), MSBatteryExport::write(), MSFCDExport::write(), MSInstantInductLoop::write(), MSLink::writeApproaching(), NBSign::writeAsPOI(), NWWriter_DlrNavteq::writeConnectedLanes(), NWWriter_SUMO::writeConnection(), NWWriter_SUMO::writeDistrict(), MSFullExport::writeEdge(), MSXMLRawOut::writeEdge(), NWWriter_SUMO::writeEdge(), MSMeanData::writeEdge(), NWWriter_XML::writeEdgesAndConnections(), RODFDetector::writeEmitterDefinition(), RODFDetectorCon::writeEmitterPOIs(), RODFDetectorCon::writeEmitters(), RODFDetectorCon::writeEndRerouterDetectors(), NWWriter_SUMO::writeInternalConnections(), NWWriter_OpenDrive::writeInternalEdge(), writeInterval(), NWWriter_SUMO::writeJunction(), MSQueueExport::writeLane(), MSFullExport::writeLane(), NWWriter_DlrNavteq::writeLinksUnsplitted(), NWWriter_OpenDrive::writeNetwork(), NWWriter_XML::writeNodes(), NWWriter_DlrNavteq::writeNodesUnsplitted(), NWWriter_OpenDrive::writeNormalEdge(), NWWriter_DlrNavteq::writeProhibitedManoeuvres(), NWWriter_SUMO::writeRoundabout(), RODFDetectorCon::writeSpeedTrigger(), NWWriter_DlrNavteq::writeTrafficSignals(), MSFCDExport::writeTransportable(), RODFDetectorCon::writeValidationDetectors(), MSFullExport::writeVehicles(), SUMOPolygon::writeXML(), PointOfInterest::writeXML(), MSRouteProbe::writeXMLOutput(), MSInductLoop::writeXMLOutput(), MSE2Collector::writeXMLOutput(), and RONet::~RONet().

◆ getIDSecure()

◆ getLane()

◆ getParameter()

virtual std::string MSDevice::getParameter ( const std::string &  key) const
inlinevirtualinherited

try to retrieve the given parameter from this device. Throw exception for unsupported key

Reimplemented in MSDevice_Routing, MSDevice_Bluelight, MSDevice_Example, MSDevice_Transportable, and MSDevice_Battery.

Definition at line 154 of file MSDevice.h.

References MSDevice::deviceName().

◆ getRange()

static double MSDevice_BTreceiver::getRange ( )
inlinestatic

Returns the configured range.

Returns
the device range

Definition at line 80 of file MSDevice_BTreceiver.h.

References myRange, notifyEnter(), notifyLeave(), notifyMove(), and ~MSDevice_BTreceiver().

Referenced by GUIBaseVehicle::drawOnPos().

◆ inquiryDelaySlots()

double MSDevice_BTreceiver::inquiryDelaySlots ( const int  backoffLimit)
staticprivate

◆ insertDefaultAssignmentOptions()

void MSDevice::insertDefaultAssignmentOptions ( const std::string &  deviceName,
const std::string &  optionsTopic,
OptionsCont oc 
)
staticprotectedinherited

Adds common command options that allow to assign devices to vehicles.

Parameters
[in]deviceNameThe name of the device type
[in]optionsTopicThe options topic into which the options shall be added

!! describe

!! describe

!! describe

Definition at line 101 of file MSDevice.cpp.

References OptionsCont::addDescription(), OptionsCont::addSynonyme(), and OptionsCont::doRegister().

Referenced by MSDevice_Battery::insertOptions(), MSDevice_Bluelight::insertOptions(), MSDevice_Example::insertOptions(), MSDevice_BTsender::insertOptions(), insertOptions(), MSDevice_Emissions::insertOptions(), MSDevice_Routing::insertOptions(), MSDevice_SSM::insertOptions(), and MSDevice::setParameter().

◆ insertOptions()

void MSDevice_BTreceiver::insertOptions ( OptionsCont oc)
static

Inserts MSDevice_BTreceiver-options.

Parameters

Definition at line 64 of file MSDevice_BTreceiver.cpp.

References OptionsCont::addDescription(), OptionsCont::doRegister(), MSDevice::insertDefaultAssignmentOptions(), and myWasInitialised.

Referenced by MSDevice::insertOptions().

◆ loadState()

void MSDevice::loadState ( const SUMOSAXAttributes attrs)
virtualinherited

Loads the state of the device from the given description.

The default implementation does nothing.

Parameters
[in]attrsXML attributes describing the current state

Reimplemented in MSDevice_Tripinfo, and MSDevice_Vehroutes.

Definition at line 157 of file MSDevice.cpp.

Referenced by MSDevice::generateOutput().

◆ notifyEnter()

bool MSDevice_BTreceiver::notifyEnter ( SUMOVehicle veh,
Notification  reason,
const MSLane enteredLane = 0 
)
virtual

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

Reimplemented from MSMoveReminder.

Definition at line 392 of file MSDevice_BTreceiver.cpp.

References SUMOVehicle::getEdge(), Named::getID(), SUMOVehicle::getID(), MSVehicle::getLane(), SUMOVehicle::getPosition(), SUMOVehicle::getPositionOnLane(), MSVehicle::getRoutePosition(), SUMOVehicle::getSpeed(), myRange, MSMoveReminder::NOTIFICATION_DEPARTED, MSMoveReminder::NOTIFICATION_JUNCTION, MSMoveReminder::NOTIFICATION_TELEPORT, and sVehicles.

Referenced by getRange().

◆ notifyLeave()

bool MSDevice_BTreceiver::notifyLeave ( SUMOVehicle veh,
double  lastPos,
Notification  reason,
const MSLane enteredLane = 0 
)
virtual

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
leaveDetectorByLaneChange
MSMoveReminder
MSMoveReminder::notifyLeave

Reimplemented from MSMoveReminder.

Definition at line 422 of file MSDevice_BTreceiver.cpp.

References Named::getID(), SUMOVehicle::getID(), MSVehicle::getLane(), SUMOVehicle::getPosition(), SUMOVehicle::getPositionOnLane(), MSVehicle::getRoutePosition(), SUMOVehicle::getSpeed(), MSMoveReminder::NOTIFICATION_ARRIVED, MSMoveReminder::NOTIFICATION_TELEPORT, sVehicles, and WRITE_WARNING.

Referenced by getRange().

◆ notifyMove()

bool MSDevice_BTreceiver::notifyMove ( SUMOVehicle veh,
double  oldPos,
double  newPos,
double  newSpeed 
)
virtual

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.

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.

Reimplemented from MSMoveReminder.

Definition at line 410 of file MSDevice_BTreceiver.cpp.

References Named::getID(), SUMOVehicle::getID(), MSVehicle::getLane(), SUMOVehicle::getPosition(), MSVehicle::getRoutePosition(), sVehicles, and WRITE_WARNING.

Referenced by getRange().

◆ notifyMoveInternal()

virtual void MSMoveReminder::notifyMoveInternal ( const SUMOVehicle veh,
const double  frontOnLane,
const double  timeOnLane,
const double  meanSpeedFrontOnLane,
const double  meanSpeedVehicleOnLane,
const double  travelledDistanceFrontOnLane,
const double  travelledDistanceVehicleOnLane,
const double  meanLengthOnLane 
)
inlinevirtualinherited

Internal notification about the vehicle moves.

Note
meso uses this though it never calls notifyMove()

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.

Parameters
[in]vehVehicle that asks this reminder.
[in]frontOnLanetime the front of the vehicle spent on the lane.
[in]timeOnLanetime some part of the vehicle spent on the lane.
[in]meanSpeedFrontOnLaneAverage speed for the time that the front is on the lane.
[in]meanSpeedVehicleOnLaneAverage speed for the time that the vehicle is on the lane (with front or back).
[in]travelledDistanceFrontOnLanedistance travelled while overlapping with the lane.
[in]travelledDistanceVehicleOnLanedistance travelled while front was on the lane.
[in]meanLengthOnLanethe average length of the vehicle's part on the lane during the last step (==complete length in meso case)

Reimplemented in MSMeanData::MeanDataValueTracker, MSDevice_Tripinfo, MSMeanData_Net::MSLaneMeanDataValues, MSMeanData_Amitran::MSLaneMeanDataValues, MSMeanData_Harmonoise::MSLaneMeanDataValues, and MSMeanData_Emissions::MSLaneMeanDataValues.

Definition at line 212 of file MSMoveReminder.h.

References UNUSED_PARAMETER.

Referenced by MSMeanData::MeanDataValues::notifyMove(), and MSMoveReminder::updateDetector().

◆ operator=()

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

Invalidated assignment operator.

◆ removeFromVehicleUpdateValues()

void MSMoveReminder::removeFromVehicleUpdateValues ( SUMOVehicle veh)
protectedinherited

◆ saveState()

void MSDevice::saveState ( OutputDevice out) const
virtualinherited

Saves the state of the device.

The default implementation writes a warning and does nothing.

Parameters
[in]outThe OutputDevice to write the information into

Reimplemented in MSDevice_Tripinfo, and MSDevice_Vehroutes.

Definition at line 151 of file MSDevice.cpp.

References Named::getID(), and WRITE_WARNING.

Referenced by MSDevice::generateOutput().

◆ setDescription()

void MSMoveReminder::setDescription ( const std::string &  description)
inlineinherited

◆ setID()

void Named::setID ( const std::string &  newID)
inlineinherited

◆ setParameter()

virtual void MSDevice::setParameter ( const std::string &  key,
const std::string &  value 
)
inlinevirtualinherited

try to set the given parameter for this device. Throw exception for unsupported key

Reimplemented in MSDevice_Routing, MSDevice_Bluelight, MSDevice_Example, and MSDevice_Battery.

Definition at line 159 of file MSDevice.h.

References MSDevice::deviceName(), MSDevice::equippedByDefaultAssignmentOptions(), MSDevice::insertDefaultAssignmentOptions(), and UNUSED_PARAMETER.

◆ updateDetector()

void MSMoveReminder::updateDetector ( SUMOVehicle veh,
double  entryPos,
double  leavePos,
SUMOTime  entryTime,
SUMOTime  currentTime,
SUMOTime  leaveTime,
bool  cleanUp 
)
inherited

Field Documentation

◆ myDescription

std::string MSMoveReminder::myDescription
protectedinherited

a description of this moveReminder

Definition at line 246 of file MSMoveReminder.h.

Referenced by MSMoveReminder::getDescription(), and MSMoveReminder::setDescription().

◆ myHolder

◆ myID

std::string Named::myID
protectedinherited

The name of the object.

Definition at line 135 of file Named.h.

Referenced by MSE2Collector::addDetectorToLanes(), RODFDetector::buildDestinationDistribution(), NGEdge::buildNBEdge(), NGNode::buildNBNode(), MSSOTLTrafficLightLogic::checkPhases(), NBNode::computeNodeShape(), MSE2Collector::detectorUpdate(), METriggeredCalibrator::execute(), MSCalibrator::execute(), GNEPOI::getAttribute(), GNEPOILane::getAttribute(), GNEPoly::getAttribute(), MSLane::getCanonicalPredecessorLane(), MSLane::getCanonicalSuccessorLane(), Named::getID(), NBEdge::getLaneID(), NBEdge::getLaneIDInsecure(), ROEdge::getStoredEffort(), ROEdge::getTravelTime(), MSDelayBasedTrafficLightLogic::init(), MSActuatedTrafficLightLogic::init(), MSSOTLTrafficLightLogic::init(), MSCalibrator::init(), NBEdge::init(), MSLane::isInsertionSuccess(), MSCalibrator::myStartElement(), MSE2Collector::notifyEnter(), MSE2Collector::notifyLeave(), MSE2Collector::notifyMove(), MSMeanData::openInterval(), RORouteDef::preComputeCurrentRoute(), NBEdge::reinitNodes(), MSRoute::release(), GNEPOI::setAttribute(), GNEPOILane::setAttribute(), GNEPoly::setAttribute(), Named::setID(), MSSOTLTrafficLightLogic::setToATargetPhase(), NBEdge::splitGeometry(), Distribution_Parameterized::toStr(), MSChargingStation::writeChargingStationOutput(), RODFDetector::writeEmitterDefinition(), MSXMLRawOut::writeLane(), NBNode::writeLogic(), RODFDetector::writeSingleSpeedTrigger(), MEInductLoop::writeXMLOutput(), MSCalibrator::writeXMLOutput(), and MSE3Collector::writeXMLOutput().

◆ myLane

◆ myOffTime

double MSDevice_BTreceiver::myOffTime = -1.
staticprivate

The offtime of the device.

Definition at line 245 of file MSDevice_BTreceiver.h.

Referenced by MSDevice_BTreceiver::BTreceiverUpdate::addRecognitionPoint(), and buildVehicleDevices().

◆ myRange

double MSDevice_BTreceiver::myRange = -1.
staticprivate

The range of the device.

Definition at line 242 of file MSDevice_BTreceiver.h.

Referenced by buildVehicleDevices(), getRange(), and notifyEnter().

◆ myWasInitialised

bool MSDevice_BTreceiver::myWasInitialised = false
staticprivate

Whether the bt-system was already initialised.

Definition at line 239 of file MSDevice_BTreceiver.h.

Referenced by buildVehicleDevices(), and insertOptions().

◆ sRecognitionRNG

std::mt19937 MSDevice_BTreceiver::sRecognitionRNG
staticprivate

A random number generator used to determine whether the opposite was recognized.

Definition at line 373 of file MSDevice_BTreceiver.h.

Referenced by buildVehicleDevices(), and inquiryDelaySlots().

◆ sVehicles

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

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