41 #ifdef CHECK_MEMORY_LEAKS
43 #endif // CHECK_MEMORY_LEAKS
71 std::vector<std::string> ids;
76 std::vector<std::string> ids;
120 tempContent.
writeInt((
int) vd.size());
122 for (
int i = 0; i < (int)vd.size(); ++i) {
178 for (std::map<std::string, MSDetectorFileOutput*>::const_iterator i = dets.begin(); i != dets.end(); ++i) {
181 const float cmin[2] = {(float) p.
x(), (float) p.
y()};
182 const float cmax[2] = {(float) p.
x(), (float) p.
y()};
183 t->
Insert(cmin, cmax, il);
#define LAST_STEP_MEAN_SPEED
void Insert(const float a_min[2], const float a_max[2], Named *const &a_data)
Insert entry.
#define CMD_GET_INDUCTIONLOOP_VARIABLE
#define LAST_STEP_VEHICLE_DATA
A RT-tree for efficient storing of SUMO's Named objects.
SUMOReal getPosition() const
Returns the position of the detector on the lane.
int getCurrentPassedNumber() const
Returns the number of vehicles that have passed the detector.
static MSNet * getInstance()
Returns the pointer to the unique instance of MSNet (singleton).
virtual std::vector< VehicleData > collectVehiclesOnDet(SUMOTime t, bool leaveTime=false) const
Returns vehicle data for vehicles that have been on the detector starting at the given time...
SUMOReal getCurrentOccupancy() const
Returns the current occupancy.
virtual void writeUnsignedByte(int)
bool writeErrorStatusCmd(int commandId, const std::string &description, tcpip::Storage &outputStorage)
Writes a status command to the given storage with status = RTYPE_ERR.
SUMOReal x() const
Returns the x-position.
const MSLane * getLane() const
Returns the lane the reminder works on.
virtual void writeInt(int)
SUMOReal lengthM
Length of the vehicle.
virtual int readUnsignedByte()
static bool getPosition(const std::string &id, Position &p)
Returns the named inductive loop's position.
T get(const std::string &id) const
Retrieves an item.
std::vector< std::string > getCurrentVehicleIDs() const
Returns the ids of vehicles that have passed the detector.
const std::string & getID() const
Returns the id.
const NamedObjectCont< MSDetectorFileOutput * > & getTypedDetectors(SumoXMLTag type) const
Returns the list of detectors of the given type.
#define LAST_STEP_TIME_SINCE_DETECTION
SUMOReal leaveTimeM
Leave-time of the vehicle in [s].
SUMOReal entryTimeM
Entry-time of the vehicle in [s].
A point in 2D or 3D with translation and scaling methods.
void insertIDs(std::vector< std::string > &into) const
virtual void writeStringList(const std::vector< std::string > &s)
Position positionAtOffset(SUMOReal pos, SUMOReal lateralOffset=0) const
Returns the position at the given length.
virtual std::string readString()
std::string idM
The id of the vehicle.
static bool processGet(TraCIServer &server, tcpip::Storage &inputStorage, tcpip::Storage &outputStorage)
Processes a get value command (Command 0xa0: Get Induction Loop Variable)
TraCI server used to control sumo by a remote TraCI client.
MSDetectorControl & getDetectorControl()
Returns the detector control.
#define RESPONSE_GET_INDUCTIONLOOP_VARIABLE
virtual void writeStorage(tcpip::Storage &store)
SUMOReal getCurrentSpeed() const
Returns the speed of the vehicle on the detector.
void writeResponseWithLength(tcpip::Storage &outputStorage, tcpip::Storage &tempMsg)
const IDMap & getMyMap() const
#define LAST_STEP_VEHICLE_NUMBER
virtual void writeString(const std::string &s)
#define LAST_STEP_VEHICLE_ID_LIST
Struct to store the data of the counted vehicle internally.
std::string toHex(const T i, std::streamsize numDigits=0)
SUMOReal y() const
Returns the y-position.
static NamedRTree * getTree()
Returns a tree filled with inductive loop instances.
virtual void writeDouble(double)
const PositionVector & getShape() const
Returns this lane's shape.
SUMOReal getTimestepsSinceLastDetection() const
Returns the time since the last vehicle left the detector.
void writeStatusCmd(int commandId, int status, const std::string &description, tcpip::Storage &outputStorage)
Writes a status command to the given storage.
#define LAST_STEP_OCCUPANCY
SUMOReal getCurrentLength() const
Returns the length of the vehicle on the detector.
std::string typeIDM
Type of the vehicle in.
An unextended detector measuring at a fixed position on a fixed lane.