SUMO - Simulation of Urban MObility
MSDevice_BTreceiver::BTreceiverUpdate Class Reference

A global update performer. More...

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

Public Member Functions

void addRecognitionPoint (const double tEnd, const MSDevice_BTsender::VehicleState &receiverState, const MSDevice_BTsender::VehicleState &senderState, SeenDevice *senderDevice) const
 Adds a point of recognition. More...
 
 BTreceiverUpdate ()
 Constructor. More...
 
void enterRange (double atOffset, const MSDevice_BTsender::VehicleState &receiverState, const std::string &senderID, const MSDevice_BTsender::VehicleState &senderState, std::map< std::string, SeenDevice *> &currentlySeen)
 Informs the receiver about a sender entering it's radius. More...
 
SUMOTime execute (SUMOTime currentTime)
 Performs the update. More...
 
void leaveRange (VehicleInformation &receiverInfo, const MSDevice_BTsender::VehicleState &receiverState, MSDevice_BTsender::VehicleInformation &senderInfo, const MSDevice_BTsender::VehicleState &senderState, double tOffset)
 Removes the sender from the currently seen devices to past episodes. More...
 
void updateVisibility (VehicleInformation &receiver, MSDevice_BTsender::VehicleInformation &sender)
 Rechecks the visibility for a given receiver/sender pair. More...
 
void writeOutput (const std::string &id, const std::map< std::string, std::vector< SeenDevice *> > &seen, bool allRecognitions)
 Writes the output. More...
 
 ~BTreceiverUpdate ()
 Destructor. More...
 

Detailed Description

A global update performer.

Definition at line 297 of file MSDevice_BTreceiver.h.

Constructor & Destructor Documentation

◆ BTreceiverUpdate()

MSDevice_BTreceiver::BTreceiverUpdate::BTreceiverUpdate ( )

◆ ~BTreceiverUpdate()

MSDevice_BTreceiver::BTreceiverUpdate::~BTreceiverUpdate ( )

Member Function Documentation

◆ addRecognitionPoint()

void MSDevice_BTreceiver::BTreceiverUpdate::addRecognitionPoint ( const double  tEnd,
const MSDevice_BTsender::VehicleState receiverState,
const MSDevice_BTsender::VehicleState senderState,
SeenDevice senderDevice 
) const

Adds a point of recognition.

Parameters
[in]tEndThe time of the recognition
[in]receiverStateThe position, speed, lane etc. the observer had at the time
[in]senderStateThe position, speed, lane etc. the seen vehicle had at the time
[in]senderDeviceThe device of the entering sender

Definition at line 321 of file MSDevice_BTreceiver.cpp.

References MSDevice_BTreceiver::inquiryDelaySlots(), MSDevice_BTreceiver::SeenDevice::lastView, MSDevice_BTreceiver::myOffTime, MSDevice_BTreceiver::SeenDevice::nextView, and MSDevice_BTreceiver::SeenDevice::recognitionPoints.

◆ enterRange()

void MSDevice_BTreceiver::BTreceiverUpdate::enterRange ( double  atOffset,
const MSDevice_BTsender::VehicleState receiverState,
const std::string &  senderID,
const MSDevice_BTsender::VehicleState senderState,
std::map< std::string, SeenDevice *> &  currentlySeen 
)

Informs the receiver about a sender entering it's radius.

Parameters
[in]atOffsetThe time offset to the current time step
[in]receiverStateThe position, speed, lane etc. the observer had at the time
[in]senderIDThe ID of the entering sender
[in]senderStateThe position, speed, lane etc. the seen vehicle had at the time
[in]currentlySeenThe container storing episodes

Definition at line 261 of file MSDevice_BTreceiver.cpp.

References SIMTIME.

◆ execute()

◆ leaveRange()

void MSDevice_BTreceiver::BTreceiverUpdate::leaveRange ( VehicleInformation receiverInfo,
const MSDevice_BTsender::VehicleState receiverState,
MSDevice_BTsender::VehicleInformation senderInfo,
const MSDevice_BTsender::VehicleState senderState,
double  tOffset 
)

Removes the sender from the currently seen devices to past episodes.

Parameters
[in]receiverInfoThe static information of the observer (id, route, etc.)
[in]receiverStateThe position, speed, lane etc. the observer had at the time
[in]senderInfoThe static information of the seen vehicle (id, route, etc.)
[in]senderStateThe position, speed, lane etc. the seen vehicle had at the time
[in]tOffsetThe time offset to the current time step

Definition at line 272 of file MSDevice_BTreceiver.cpp.

References MSDevice_BTreceiver::VehicleInformation::currentlySeen, Named::getID(), MSNet::getInstance(), MSDevice_BTsender::VehicleInformation::route, MSDevice_BTsender::VehicleState::routePos, MSDevice_BTreceiver::VehicleInformation::seen, SIMTIME, and STEPS2TIME.

◆ updateVisibility()

void MSDevice_BTreceiver::BTreceiverUpdate::updateVisibility ( MSDevice_BTreceiver::VehicleInformation receiver,
MSDevice_BTsender::VehicleInformation sender 
)

◆ writeOutput()

void MSDevice_BTreceiver::BTreceiverUpdate::writeOutput ( const std::string &  id,
const std::map< std::string, std::vector< SeenDevice *> > &  seen,
bool  allRecognitions 
)

Writes the output.

Parameters
[in]idThe id of the receiver
[in]seenThe information about seen senders
[in]allRecognitionsWhether all recognitions shall be written

Definition at line 337 of file MSDevice_BTreceiver.cpp.

References OutputDevice::closeTag(), OutputDevice::getDeviceByOption(), MSDevice_BTsender::VehicleState::laneID, MSDevice_BTsender::VehicleState::lanePos, OutputDevice::openTag(), MSDevice_BTsender::VehicleState::position, MSDevice_BTsender::VehicleState::speed, and OutputDevice::writeAttr().


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