21 #ifndef MSDevice_BTreceiver_h 22 #define MSDevice_BTreceiver_h 179 : meetingBegin(meetingBegin_), meetingEnd(0), lastView(meetingBegin_.
t), nextView(-1.) {}
184 for (std::vector<MeetingPoint*>::iterator i = recognitionPoints.begin(); i != recognitionPoints.end(); ++i) {
187 recognitionPoints.clear();
219 static void cleanUp(std::map<std::string, SeenDevice*>& c, std::map<std::string, std::vector<SeenDevice*> >& s);
265 std::map<std::string, std::vector<SeenDevice*> >
seen;
312 std::map<std::string, SeenDevice*>& currentlySeen);
345 void writeOutput(
const std::string&
id,
const std::map<std::string, std::vector<SeenDevice*> >& seen,
346 bool allRecognitions);
360 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.
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.
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.
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.
static std::map< std::string, VehicleInformation * > sVehicles
The list of arrived receivers.
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.
~MeetingPoint()
Destructor.
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.
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.
MeetingPoint & operator=(const MeetingPoint &)
Invalidated assignment operator.