21 #ifndef MSDevice_BTreceiver_h
22 #define MSDevice_BTreceiver_h
220 static void cleanUp(std::map<std::string, SeenDevice*>& c, std::map<std::string, std::vector<SeenDevice*> >& s);
266 std::map<std::string, std::vector<SeenDevice*> >
seen;
313 std::map<std::string, SeenDevice*>& currentlySeen);
346 void writeOutput(
const std::string&
id,
const std::map<std::string, std::vector<SeenDevice*> >& seen,
347 bool allRecognitions);
361 static std::map<std::string, VehicleInformation*>
sVehicles;
std::string receiverRoute
string of travelled receiver edges
const MeetingPoint meetingBegin
Description of the meeting's begin.
A global update performer.
const MSDevice_BTsender::VehicleState seenState
The state the seen vehicle had at the time.
SeenDevice(const MeetingPoint &meetingBegin_)
Constructor.
Notification
Definition of a vehicle state.
std::vector< MeetingPoint * > recognitionPoints
List of recognition points.
static MTRand sRecognitionRNG
A random number generator used to determine whether the opposite was recognized.
MSDevice_BTreceiver & operator=(const MSDevice_BTreceiver &)
Invalidated assignment operator.
bool notifyLeave(SUMOVehicle &veh, SUMOReal lastPos, Notification reason)
Moves (the known) vehicle from running to arrived vehicles' list.
SUMOReal lastView
Last recognition point.
Base (microsim) event class.
MSDevice_BTreceiver(SUMOVehicle &holder, const std::string &id)
Constructor.
static SUMOReal myRange
The range of the device.
static SUMOReal inquiryDelaySlots(const int backoffLimit)
Class representing a single seen device.
~BTreceiverUpdate()
Destructor.
std::string senderRoute
string of travelled sender edges
Representation of a vehicle.
static bool myWasInitialised
Whether the bt-system was already initialised.
A single movement state of the vehicle.
SUMOReal nextView
Next possible recognition point.
void writeOutput(const std::string &id, const std::map< std::string, std::vector< SeenDevice * > > &seen, bool allRecognitions)
Writes the output.
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.
bool notifyEnter(SUMOVehicle &veh, Notification reason)
Adds the vehicle to running vehicles if it (re-) enters the network.
~MSDevice_BTreceiver()
Destructor.
SUMOTime execute(SUMOTime currentTime)
Performs the update.
static std::map< std::string, VehicleInformation * > sVehicles
The list of arrived receivers.
void leaveRange(VehicleInformation &receiverInfo, const MSDevice_BTsender::VehicleState &receiverState, MSDevice_BTsender::VehicleInformation &senderInfo, const MSDevice_BTsender::VehicleState &senderState, SUMOReal tOffset)
Removes the sender from the currently seen devices to past episodes.
const SUMOReal t
The time of the meeting.
Abstract in-vehicle device.
Holds the information about exact positions/speeds/time of the begin/end of a meeting.
SeenDevice & operator=(const SeenDevice &)
Invalidated assignment operator.
void enterRange(SUMOReal atOffset, const MSDevice_BTsender::VehicleState &receiverState, const std::string &senderID, const MSDevice_BTsender::VehicleState &senderState, std::map< std::string, SeenDevice * > ¤tlySeen)
Informs the receiver about a sender entering it's radius.
~MeetingPoint()
Destructor.
void addRecognitionPoint(const SUMOReal tEnd, const MSDevice_BTsender::VehicleState &receiverState, const MSDevice_BTsender::VehicleState &senderState, SeenDevice *senderDevice) const
Adds a point of recognition.
static SUMOReal myOffTime
The offtime of the device.
A storage for options typed value containers)
MeetingPoint(SUMOReal _t, const MSDevice_BTsender::VehicleState &_observerState, const MSDevice_BTsender::VehicleState &_seenState)
Constructor.
void updateVisibility(VehicleInformation &receiver, MSDevice_BTsender::VehicleInformation &sender)
Rechecks the visibility for a given receiver/sender pair.
static SUMOReal getRange()
Returns the configured range.
MeetingPoint * meetingEnd
Description of the meeting's end.
static void buildVehicleDevices(SUMOVehicle &v, std::vector< MSDevice * > &into)
Build devices for the given vehicle, if needed.
const MSDevice_BTsender::VehicleState observerState
The state the observer had at the time.
static void insertOptions(OptionsCont &oc)
Inserts MSDevice_BTreceiver-options.
bool notifyMove(SUMOVehicle &veh, SUMOReal oldPos, SUMOReal newPos, SUMOReal newSpeed)
Checks whether the reminder still has to be notified about the vehicle moves.
BTreceiverUpdate()
Constructor.
MeetingPoint & operator=(const MeetingPoint &)
Invalidated assignment operator.