18 #ifndef MSDevice_BTreceiver_h 19 #define MSDevice_BTreceiver_h 180 : meetingBegin(meetingBegin_), meetingEnd(0), lastView(meetingBegin_.
t), nextView(-1.) {}
185 for (std::vector<MeetingPoint*>::iterator i = recognitionPoints.begin(); i != recognitionPoints.end(); ++i) {
188 recognitionPoints.clear();
220 static void cleanUp(std::map<std::string, SeenDevice*>& c, std::map<std::string, std::vector<SeenDevice*> >& s);
258 std::map<std::string, SeenDevice*>::iterator i;
259 for (i = currentlySeen.begin(); i != currentlySeen.end(); i++) {
262 std::map<std::string, std::vector<SeenDevice*> >::iterator j;
263 std::vector<SeenDevice*>::iterator k;
264 for (j = seen.begin(); j != seen.end(); j++) {
265 for (k = j->second.begin(); k != j->second.end(); k++) {
278 std::map<std::string, std::vector<SeenDevice*> >
seen;
325 std::map<std::string, SeenDevice*>& currentlySeen);
358 void writeOutput(
const std::string&
id,
const std::map<std::string, std::vector<SeenDevice*> >& seen,
359 bool allRecognitions);
373 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.
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.
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 double getRange()
Returns the configured range.
static void buildVehicleDevices(SUMOVehicle &v, std::vector< MSVehicleDevice *> &into)
Build devices for the given vehicle, if needed.
const std::string deviceName() const
return the name for this type of device
double lastView
Last recognition point.
MeetingPoint(double _t, const MSDevice_BTsender::VehicleState &_observerState, const MSDevice_BTsender::VehicleState &_seenState)
Constructor.
Base (microsim) event class.
MSDevice_BTreceiver(SUMOVehicle &holder, const std::string &id)
Constructor.
static double inquiryDelaySlots(const int backoffLimit)
bool notifyMove(SUMOVehicle &veh, double oldPos, double newPos, double newSpeed)
Checks whether the reminder still has to be notified about the vehicle moves.
static std::mt19937 sRecognitionRNG
A random number generator used to determine whether the opposite was recognized.
Class representing a single seen device.
double nextView
Next possible recognition point.
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.
~MSDevice_BTreceiver()
Destructor.
static std::map< std::string, VehicleInformation * > sVehicles
The list of arrived receivers.
Holds the information about exact positions/speeds/time of the begin/end of a meeting.
const double t
The time of the meeting.
static std::mt19937 * getRNG()
bool notifyEnter(SUMOVehicle &veh, Notification reason, const MSLane *enteredLane=0)
Adds the vehicle to running vehicles if it (re-) enters the network.
~MeetingPoint()
Destructor.
bool notifyLeave(SUMOVehicle &veh, double lastPos, Notification reason, const MSLane *enteredLane=0)
Moves (the known) vehicle from running to arrived vehicles' list.
A storage for options typed value containers)
Abstract in-vehicle device.
static double myRange
The range of the device.
static double myOffTime
The offtime of the device.
MeetingPoint * meetingEnd
Description of the meeting's end.
const MSDevice_BTsender::VehicleState observerState
The state the observer had at the time.
static void insertOptions(OptionsCont &oc)
Inserts MSDevice_BTreceiver-options.
Representation of a lane in the micro simulation.
MeetingPoint & operator=(const MeetingPoint &)
Invalidated assignment operator.