21 #ifndef MSDevice_BTreceiver_h 22 #define MSDevice_BTreceiver_h 183 : meetingBegin(meetingBegin_), meetingEnd(0), lastView(meetingBegin_.
t), nextView(-1.) {}
188 for (std::vector<MeetingPoint*>::iterator i = recognitionPoints.begin(); i != recognitionPoints.end(); ++i) {
191 recognitionPoints.clear();
223 static void cleanUp(std::map<std::string, SeenDevice*>& c, std::map<std::string, std::vector<SeenDevice*> >& s);
261 std::map<std::string, SeenDevice*>::iterator i;
262 for (i = currentlySeen.begin(); i != currentlySeen.end(); i++) {
265 std::map<std::string, std::vector<SeenDevice*> >::iterator j;
266 std::vector<SeenDevice*>::iterator k;
267 for (j = seen.begin(); j != seen.end(); j++) {
268 for (k = j->second.begin(); k != j->second.end(); k++) {
281 std::map<std::string, std::vector<SeenDevice*> >
seen;
328 std::map<std::string, SeenDevice*>& currentlySeen);
361 void writeOutput(
const std::string&
id,
const std::map<std::string, std::vector<SeenDevice*> >& seen,
362 bool allRecognitions);
376 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.
static void buildVehicleDevices(SUMOVehicle &v, std::vector< MSDevice *> &into)
Build devices for the given vehicle, if needed.
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.
const std::string deviceName() const
return the name for this type of device
static MTRand sRecognitionRNG
A random number generator used to determine whether the opposite was recognized.
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.
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.
Abstract in-vehicle device.
Holds the information about exact positions/speeds/time of the begin/end of a meeting.
const double t
The time of the meeting.
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)
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.