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
}
 Definition of a vehicle state. More...
 

Public Member Functions

void addTo (const StoringVisitor &cont) const
 Adds this object to the given container. 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 void notifyMoveInternal (SUMOVehicle &veh, SUMOReal timeOnLane, SUMOReal speed)
 Internal notification about the vehicle moves. More...
 
void setDescription (const std::string &description)
 
void setID (const std::string &newID)
 resets the id More...
 
 ~MSDevice_BTreceiver ()
 Destructor. More...
 
Methods inherited from MSMoveReminder.
bool notifyEnter (SUMOVehicle &veh, Notification reason)
 Adds the vehicle to running vehicles if it (re-) enters the network. More...
 
bool notifyMove (SUMOVehicle &veh, SUMOReal oldPos, SUMOReal newPos, SUMOReal newSpeed)
 Checks whether the reminder still has to be notified about the vehicle moves. More...
 
bool notifyLeave (SUMOVehicle &veh, SUMOReal lastPos, Notification reason)
 Moves (the known) vehicle from running to arrived vehicles' list. More...
 

Static Public Member Functions

static void buildVehicleDevices (SUMOVehicle &v, std::vector< MSDevice * > &into)
 Build devices for the given vehicle, if needed. 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...
 
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 SUMOReal 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...
 

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 SUMOReal inquiryDelaySlots (const int backoffLimit)
 

Static Private Attributes

static SUMOReal myOffTime = -1.
 The offtime of the device. More...
 
static SUMOReal myRange = -1.
 The range of the device. More...
 
static bool myWasInitialised = false
 Whether the bt-system was already initialised. More...
 
static MTRand 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

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.

Definition at line 95 of file MSMoveReminder.h.

Constructor & Destructor Documentation

MSDevice_BTreceiver::~MSDevice_BTreceiver ( )

Destructor.

Definition at line 391 of file MSDevice_BTreceiver.cpp.

Referenced by getRange().

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 386 of file MSDevice_BTreceiver.cpp.

Referenced by buildVehicleDevices().

MSDevice_BTreceiver::MSDevice_BTreceiver ( const MSDevice_BTreceiver )
private

Invalidated copy constructor.

Member Function Documentation

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

Adds this object to the given container.

Parameters

Definition at line 126 of file Named.h.

References Named::StoringVisitor::add().

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 85 of file MSDevice_BTreceiver.cpp.

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

Referenced by MSDevice::buildVehicleDevices().

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
bool MSDevice::equippedByDefaultAssignmentOptions ( const OptionsCont oc,
const std::string &  deviceName,
SUMOVehicle v 
)
staticprotectedinherited
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.

Parameters
[in]osThe stream to write the information into
Exceptions
IOErrornot yet implemented

Reimplemented in MSDevice_Tripinfo, MSDevice_Battery, MSDevice_Example, MSDevice_Vehroutes, and MSDevice_Emissions.

Definition at line 122 of file MSDevice.h.

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

const std::string& MSMoveReminder::getDescription ( ) const
inlineinherited

Definition at line 215 of file MSMoveReminder.h.

References MSMoveReminder::myDescription.

Referenced by MSBaseVehicle::addStops().

SUMOVehicle& MSDevice::getHolder ( ) const
inlineinherited

Returns the vehicle that holds this device.

Returns
The vehicle that holds this device

Definition at line 105 of file MSDevice.h.

References MSDevice::myHolder.

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(), MSVehicleTransfer::add(), TraCIServerAPI_Lane::StoringVisitor::add(), MSDetectorControl::add(), Named::StoringVisitor::add(), RORouteDef::addAlternative(), MSLane::addApproachingLane(), MSNet::addBusStop(), MSNet::addChargingStation(), NBLoadedSUMOTLDef::addConnection(), NLHandler::addConnection(), MSNet::addContainerStop(), NIXMLConnectionsHandler::addCrossing(), RODFDetectorCon::addDetector(), RONet::addEdge(), ROJTREdge::addFollowerProbability(), MSTLLogicControl::TLSLogicVariants::addLogic(), RONet::addNode(), NIImporter_SUMO::addPhase(), GUIEdge::addRerouter(), NBEdge::addRestrictedLane(), RONet::addRouteDef(), NBDistrict::addSink(), NBDistrict::addSource(), NIXMLEdgesHandler::addSplit(), NBTrafficLightLogic::addStep(), MSRouteHandler::addStop(), MSVehicle::addStop(), NIXMLTrafficLightsHandler::addTlConnection(), NIVissimDisturbance::addToNode(), MSVehicle::addTraciBusOrContainerStop(), MSVehicle::addTraciStop(), AGActivityTripWriter::addTrip(), GUITrafficLightLogicWrapper::begin2TrackPhases(), MSContainer::MSContainerStage_Driving::beginEventOutput(), MSContainer::MSContainerStage_Waiting::beginEventOutput(), MSPerson::MSPersonStage_Driving::beginEventOutput(), MSPerson::MSPersonStage_Waiting::beginEventOutput(), NLEdgeControlBuilder::build(), NIVisumTL::build(), RODFNet::buildApproachList(), MS_E2_ZS_CollectorOverLanes::buildCollector(), NBNode::buildCrossings(), NBNode::buildCrossingsAndWalkingAreas(), NIImporter_VISUM::buildDistrictNode(), NIVissimConnection::buildEdgeConnections(), RODFNet::buildEdgeFlowMap(), GNEConnector::buildIinternalLanes(), GNETLSEditor::buildIinternalLanes(), NBEdge::buildInnerEdges(), NGEdge::buildNBEdge(), NIVissimEdge::buildNBEdge(), NBRampsComputer::buildOffRamp(), NBRampsComputer::buildOnRamp(), NBNode::buildWalkingAreas(), MSBaseVehicle::calculateArrivalParams(), MSSimpleTrafficLightLogic::changeStepAndDuration(), NBEdge::checkGeometry(), MSVehicleTransfer::checkInsertions(), ODDistrictHandler::closeDistrict(), NLHandler::closeEdge(), RORouteHandler::closeRouteDistribution(), RORouteHandler::closeVehicle(), NBTrafficLightDefinition::collectAllLinks(), NBLoadedSUMOTLDef::collectEdges(), NBTrafficLightDefinition::collectEdges(), ROJTRRouter::compute(), NBTrafficLightDefinition::compute(), NBNode::computeInternalLaneShape(), NBEdge::computeLaneShapes(), NBNode::computeLogic(), NBOwnTLDef::computeLogicAndConts(), NBNode::computeNodeShape(), RODFNet::computeRoutesFor(), NBTrafficLightLogicCont::computeSingleLogic(), NBTurningDirectionsComputer::computeTurnDirectionsForNode(), NGNet::connect(), MSAbstractLaneChangeModel::continueLaneChangeManeuver(), NLDetectorBuilder::convUncontE2PosLength(), GUINet::createTLWrapper(), NIVissimDistrictConnection::dict_BuildDistricts(), MSContainer::MSContainerStage_Driving::endEventOutput(), MSContainer::MSContainerStage_Waiting::endEventOutput(), MSPerson::MSPersonStage_Driving::endEventOutput(), MSPerson::MSPersonStage_Waiting::endEventOutput(), MSE3Collector::enter(), 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(), NBRampsComputer::fulfillsRampConstraints(), RODFDetectorCon::getAggFlowFor(), RODFDetectorCon::getAnyDetectorForEdge(), MSNet::getBusStopID(), MSNet::getChargingStationID(), NBEdge::getConnection(), MSNet::getContainerStopID(), NBEdge::getCrossingAngle(), GNEEdge::getDest(), RODFNet::getDetectorEdge(), MSMeanData::getEdgeID(), PedestrianEdge< E, L, N >::getEffort(), NBEdge::getFirstNonPedestrianLane(), MS_E2_ZS_CollectorOverLanes::getLanePredeccessorLanes(), MSTLLogicControl::TLSLogicVariants::getLogicInstantiatingOff(), NIImporter_VISUM::getNamedEdgeContinuating(), MSPerson::getNextEdge(), MSPModel_Striping::getNextLane(), GUIInstantInductLoop::MyWrapper::getParameterWindow(), GUI_E2_ZS_Collector::MyWrapper::getParameterWindow(), GUIVehicle::getParameterWindow(), GUIInductLoop::MyWrapper::getParameterWindow(), GUITrafficLightLogicWrapper::getPopUpMenu(), NLTriggerBuilder::getPosition(), NLDetectorBuilder::getPositionChecking(), NBNode::getPossiblySplittedIncoming(), NBNode::getPossiblySplittedOutgoing(), NIImporter_VISUM::getReversedContinuating(), GNEEdge::getSource(), MSVehicleControl::getWaitingVehicle(), MSLink::getZipperSpeed(), NBNode::guessCrossings(), RODFDetectorCon::guessEmptyFlows(), NBEdgeCont::guessSidewalks(), NBNodeCont::guessTLs(), GUITLLogicPhasesTrackerWindow::GUITLLogicPhasesTrackerWindow(), MSLane::handleCollision(), NBEdgeCont::ignoreFilterMatch(), MSRailSignal::init(), MSActuatedTrafficLightLogic::init(), MSTrafficLightLogic::init(), PedestrianEdge< E, L, N >::initPedestrianNetwork(), NIImporter_SUMO::initTrafficLightLogic(), NIXMLTrafficLightsHandler::initTrafficLightLogic(), NBDistrictCont::insert(), NBNodeCont::insert(), NBTrafficLightLogicCont::insert(), NBEdgeCont::insert(), MSEdge::insertVehicle(), GNEJunction::invalidateTLS(), NBNode::invalidateTLS(), MSTLLogicControl::isActive(), RODFNet::isDestination(), RODFNet::isFalseSource(), RODFNet::isSource(), NBNodeCont::joinJunctions(), NBEdgeCont::joinSameNodeConnectingEdges(), MSE3Collector::leave(), MSDevice_BTreceiver::BTreceiverUpdate::leaveRange(), NIImporter_OpenDrive::loadNetwork(), ODDistrictCont::makeDistricts(), MSPModel_Striping::moveInDirection(), MSPModel_Striping::moveInDirectionOnLane(), NBRampsComputer::moveRampRight(), MSPModel_Striping::PState::moveToNextLane(), MSCalibrator::MSCalibrator(), MSChargingStation::MSChargingStation(), MSDevice_Battery::MSDevice_Battery(), NBLoadedTLDef::myCompute(), NIXMLEdgesHandler::myEndElement(), NIImporter_SUMO::myEndElement(), NIXMLConnectionsHandler::myStartElement(), MSLaneSpeedTrigger::myStartElement(), MSTriggeredRerouter::myStartElement(), NBConnection::NBConnection(), NBRequest::NBRequest(), MSDevice_BTsender::notifyEnter(), notifyEnter(), MSDevice_Example::notifyEnter(), MSDevice_Tripinfo::notifyEnter(), MSTriggeredRerouter::notifyEnter(), MSDevice_Container::notifyLeave(), MSDevice_Person::notifyLeave(), MSE3Collector::MSE3EntryReminder::notifyLeave(), MSDevice_Example::notifyLeave(), MSDevice_Tripinfo::notifyLeave(), MSDevice_BTsender::notifyLeave(), notifyLeave(), MSDevice_Example::notifyMove(), MSDevice_BTsender::notifyMove(), notifyMove(), MSMeanData::MeanDataValues::notifyMove(), GUIViewTraffic::onGamingClick(), 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()(), MSEdge::by_id_sorter::operator()(), NBNode::nodes_by_id_sorter::operator()(), NIImporter_VISUM::parse_EdgePolys(), NIImporter_VISUM::parse_Lanes(), NIImporter_VISUM::parse_LanesConnections(), NIImporter_VISUM::parse_Turns(), NIImporter_VISUM::parse_TurnsToSignalGroups(), NIXMLConnectionsHandler::parseDeprecatedLaneDefinition(), NIXMLConnectionsHandler::parseLaneBound(), MSRouteHandler::parseWalkPositions(), NBLoadedSUMOTLDef::patchIfCrossingsAdded(), MSLCM_JE2013::patchSpeed(), NBLoadedTLDef::SignalGroup::patchTYellow(), MSRightOfWayJunction::postloadInit(), AGStreet::print(), TraCIServerAPI_InductionLoop::processGet(), TraCIServerAPI_ArealDetector::processGet(), TraCIServerAPI_TLS::processGet(), TraCIServerAPI_Vehicle::processGet(), TraCIServerAPI_Person::processGet(), TraCIServerAPI_Lane::processGet(), TraCIServerAPI_Vehicle::processSet(), NIXMLNodesHandler::processTrafficLightDefinitions(), NWWriter_SUMO::prohibitionConnection(), MSPModel_Striping::PState::PState(), NBEdgeCont::recheckPostProcessConnections(), NBLoadedTLDef::SignalGroup::remapIncoming(), NBLoadedTLDef::SignalGroup::remapOutgoing(), NBLoadedSUMOTLDef::removeConnection(), NBNodeCont::removeIsolatedRoads(), MSCalibrator::removePending(), NBNode::removeSelfLoops(), NBEdgeCont::removeUnwishedEdges(), NBNodeCont::removeUnwishedNodes(), NBNodeCont::rename(), NBEdgeCont::rename(), GNENet::renameEdge(), GNENet::renameJunction(), RORouteDef::repairCurrentRoute(), NBConnection::replaceFrom(), MSBaseVehicle::replaceRouteEdges(), NBConnection::replaceTo(), NIImporter_DlrNavteq::TrafficlightsHandler::report(), NIXMLTrafficLightsHandler::retrieveLaneIndex(), RODFNet::revalidateFlows(), RONet::saveAndRemoveRoutesUntil(), MSBaseVehicle::saveState(), MSDevice_Battery::setActualBatteryCapacity(), MSDevice_Battery::setAirDragCoefficient(), NBNodeCont::setAsTLControlled(), MSChargingStation::setChrgPower(), MSDevice_Battery::setConstantPowerIntake(), NBEdge::setControllingTLInformation(), MSChargingStation::setEfficency(), MSDevice_Battery::setFrontSurfaceArea(), MSDevice_Battery::setInternalMomentOfInertia(), GNEJunction::setLogicValid(), MSDevice_Battery::setMass(), MSDevice_Battery::setMaximumBatteryCapacity(), NIXMLEdgesHandler::setNodes(), MSDevice_Battery::setPowerMax(), MSDevice_Battery::setPropulsionEfficiency(), MSDevice_Battery::setRadialDragCoefficient(), MSDevice_Battery::setRecuperationEfficiency(), MSLink::setRequestInformation(), MSDevice_Battery::setRollDragCoefficient(), MSTLLogicControl::TLSLogicVariants::setStateInstantiatingOnline(), NBOwnTLDef::setTLControllingInformation(), NBLoadedSUMOTLDef::setTLControllingInformation(), NBTrafficLightLogicCont::setTLControllingInformation(), NBLoadedTLDef::setTLControllingInformation(), NBEdgeCont::splitAt(), MSLane::succLinkSec(), GUITrafficLightLogicWrapper::switchTLSLogic(), GNETLSEditor::updateDescription(), MSDevice_BTreceiver::BTreceiverUpdate::updateVisibility(), TraCIServerAPI_Vehicle::vtdMap(), TraCIServerAPI_Vehicle::vtdMap_matchingRoutePosition(), MSPModel_Striping::PState::walk(), MSLCM_JE2013::wantsChange(), MSBatteryExport::write(), MSEmissionExport::write(), MSFCDExport::write(), MSInstantInductLoop::write(), NBSign::writeAsPOI(), 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(), writeInterval(), NWWriter_SUMO::writeJunction(), MSQueueExport::writeLane(), MSFullExport::writeLane(), NWWriter_DlrNavteq::writeLinksUnsplitted(), NWWriter_OpenDrive::writeNetwork(), NWWriter_XML::writeNodes(), NWWriter_DlrNavteq::writeNodesUnsplitted(), NWWriter_SUMO::writeRoundabout(), RODFDetectorCon::writeSpeedTrigger(), NWWriter_DlrNavteq::writeTrafficSignals(), MSInductLoop::writeTypedXMLOutput(), RODFDetectorCon::writeValidationDetectors(), MSFullExport::writeVehicles(), PointOfInterest::writeXML(), SUMO::Polygon::writeXML(), MSRouteProbe::writeXMLOutput(), and MSE2Collector::writeXMLOutput().

template<class T >
static std::string Named::getIDSecure ( const T *  obj,
const std::string &  fallBack = "NULL" 
)
inlinestaticinherited

get an identifier for Named-like object which may be Null

Definition at line 58 of file Named.h.

static SUMOReal 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(), SUMOReal, and ~MSDevice_BTreceiver().

Referenced by GUIBaseVehicle::drawGL().

SUMOReal MSDevice_BTreceiver::inquiryDelaySlots ( const int  backoffLimit)
staticprivate
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 88 of file MSDevice.cpp.

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

Referenced by MSDevice::generateOutput(), MSDevice_Example::insertOptions(), MSDevice_BTsender::insertOptions(), insertOptions(), MSDevice_Battery::insertOptions(), MSDevice_Emissions::insertOptions(), and MSDevice_Routing::insertOptions().

void MSDevice_BTreceiver::insertOptions ( OptionsCont oc)
static

Inserts MSDevice_BTreceiver-options.

Parameters

Definition at line 68 of file MSDevice_BTreceiver.cpp.

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

Referenced by MSDevice::insertOptions().

bool MSDevice_BTreceiver::notifyEnter ( SUMOVehicle veh,
Notification  reason 
)
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 396 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().

bool MSDevice_BTreceiver::notifyLeave ( SUMOVehicle veh,
SUMOReal  lastPos,
Notification  reason 
)
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 426 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().

bool MSDevice_BTreceiver::notifyMove ( SUMOVehicle veh,
SUMOReal  oldPos,
SUMOReal  newPos,
SUMOReal  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 414 of file MSDevice_BTreceiver.cpp.

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

Referenced by getRange().

virtual void MSMoveReminder::notifyMoveInternal ( SUMOVehicle veh,
SUMOReal  timeOnLane,
SUMOReal  speed 
)
inlinevirtualinherited

Internal notification 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]timeOnLanetime the vehicle spent on the lane.
[in]speedMoving speed.

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

Definition at line 203 of file MSMoveReminder.h.

References UNUSED_PARAMETER.

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

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

Invalidated assignment operator.

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

Definition at line 211 of file MSMoveReminder.h.

References MSMoveReminder::myDescription.

Referenced by MSMeanData::init(), and MSCalibrator::MSCalibrator().

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

resets the id

Parameters
[in]newIDThe new id of this object

Definition at line 73 of file Named.h.

References Named::myID.

Referenced by NBNodeCont::rename(), and NBEdgeCont::rename().

Field Documentation

std::string MSMoveReminder::myDescription
protectedinherited

a description of this moveReminder

Definition at line 229 of file MSMoveReminder.h.

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

SUMOReal MSDevice_BTreceiver::myOffTime = -1.
staticprivate

The offtime of the device.

Definition at line 241 of file MSDevice_BTreceiver.h.

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

SUMOReal MSDevice_BTreceiver::myRange = -1.
staticprivate

The range of the device.

Definition at line 238 of file MSDevice_BTreceiver.h.

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

bool MSDevice_BTreceiver::myWasInitialised = false
staticprivate

Whether the bt-system was already initialised.

Definition at line 235 of file MSDevice_BTreceiver.h.

Referenced by buildVehicleDevices(), and insertOptions().

MTRand MSDevice_BTreceiver::sRecognitionRNG
staticprivate

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

Definition at line 357 of file MSDevice_BTreceiver.h.

Referenced by buildVehicleDevices(), and inquiryDelaySlots().

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

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